Darshu Bc
Darshu Bc

Reputation: 546

Validation of Transactions in Hyperledger

How a transaction in Hyperledger is validated on a single channel and how does it solves double spending problem

Upvotes: 0

Views: 2151

Answers (1)

Artem Barger
Artem Barger

Reputation: 41232

When client submits transaction proposal to endorsing peer, the endorsing peer simulates aka tentatively executes a transaction invoking chaincode providing current world state.

After the execution endorsing peer generates read-write set - set of key/values pairs with versions based on current state.

Later client will submit endorsed results to the ordering service which will decide on order for transaction inside the block.

Next during the commit/validation phase peer will check the read-write set versions for conflicts, which in particular prevents the double spending issue, since it will have same key/value pair with same version. This also called an MVCC check in Fabric.

Upvotes: 2

Related Questions