Transaction & Batch Building
Transactions & Batches In Sawtooth
In Hyperledger Sawtooth, the state of the blockchain can only be modified through transactions. As a user interacts with the application, transactions are constructed. The contents of a transaction are signed with the user’s private key in an irreversible, one-way hashing function (secp256k1 ECDSA).
The resulting signature can be decoded with the user’s public key. This decoding process is used to verify that a transaction was not modified after being signed by the user.
Transactions are then wrapped into a batch. Batches are the atomic unit of change in Sawtooth - either all of the transactions in a batch are committed together, or the entire batch is rejected. A batch is sent from the UI to the API, which is then forwarded to a Sawtooth validator node that verifies the signature and payload of each transaction before updating the blockchain state.
The state of the ConsenSource blockchain is updated by transactions wrapped in a batch that get sent to a validator node. The UI constructs and signs transactions on behalf of a user.
The diagram below provides an overview of the sturcture of transactions and batches in Sawtooth.
Transaction and Batch relationship
Building and Submitting Transactions
The ConsenSource Transaction Family is designed to model the existing business processes that occur when a factory receives a new certification. View the full specification at the link below.
Additional Sawtooth Docs
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.