blockchainhyperledgerhyperledger-sawtooth

Hyperledger Sawtooth Unmet Dependencies Transactions


Sawtooth Transaction headers have a dependencies field and which is an array of transaction headers that need to be added to the ledger before this transaction is processed. Where are transactions with unmet dependencies stored? Are they stored in the node that first received them or stored in every node in the network?


Solution

  • The Validator stores incoming transactions in the pending queue. The Validator consumes the transaction from the pending queue for execution. Execution of the Transaction is done either when a Block is created or Block is validated. Addition of a Transaction to the Block is triggered by the consensus engine action.

    A Transaction is broadcasted to other Validators part of that network as and when they arrive. It is removed from the pending queue if either the Transaction is evaluated, either failed or successful. If a Transaction is successful it should be either during the Block creation or the Block validation. If the created Block fails to be committed because of the consensus process, these Transactions are added back to the pending queue. There was nothing wrong with the Transaction as such, it just happened to be not part of the Block that is committed. A Transaction in other terms completely removed from the pending queue in successful case when it is committed to a Block.

    When I say Transaction is pended at the Validator, of-course what is received is a Batch. Dependency check is done by the Validator when it considers a Transaction be added to the Block.

    Hope this answers the question. Please add specific question if you're facing any issue or want to know in detail.