Transaction Modes

There are two types of transactions in Miden: local transactions and network transactions.

For local transactions, clients executing the transactions also generate the proofs of their correct execution. So, no additional work needs to be performed by the network. Local transactions are useful for several reasons:

  1. They are cheaper (i.e., lower fees) as ZKPs are already generated by the clients.
  2. They allow fairly complex computations because the proof size doesn't grow linearly with the complexity of the computation.
  3. They enable privacy as neither the account state nor account code are needed to verify the ZKP.

For network transactions, the operator will execute the transaction and generate the proofs. Network transactions are useful for two reasons:

  1. Clients may not have sufficient resources to generate ZK proofs.
  2. Executing many transactions against the same public account by different clients would be challenging as the account state would change after every transaction. In this case, the Miden Node / Operator acts as a "synchronizer" as they can execute transactions sequentially and feed the output of the previous transaction into the subsequent one.