Reputation: 1536
I'm trying so hard to find out exactly how organizations are connected with each other in Hyperledger.
For example, when an end user initiates a transaction and sends it to the client app, app sends it to endorser peer, endorser checks transaction validity, calls chaincode, simulates a transaction and creates read/write set. after that, endorser peer sends transaction response to client app again. Now client app sends it to orderer peer. Other organizations need this transaction in their ledger too right? but I can't find out how after that this transaction is connected with other organizations? can anyone help me to make it clear?
Upvotes: 1
Views: 114
Reputation: 73
The complete process is defined in 7 steps, you are asking about what happens after step 4 in the process.
Step 1 — a client (an application) , a user send a transactions proposal to the network (after going through the steps refer the diagram below)
Step 2 — this proposal is received by every endorsing peer in the network, they simulate it (via smart contracts hosted by endorsing peers) and creates a read write set. Read write (RW set) is what the transaction capture upon simulation from the current world state of ledger while reading and what would have been written to the ledger had the transaction been executed
Step 3 — this RW set is then signed by each endorsing peer and sent back to the client application
Step 4 — the application then forwards the RW set and the signed transaction to the ordering service
Step 5 –ordering service receives these endorsed transactions and RW sets and orders these in to blocks and delivers them to all committing peers in the network Ordering service only specifies the order in which transactions should be committed to the shared ledger, neither do they maintain a ledger nor they hold chaincodes or simulate transactions
Step 6- committing peers upon receiving blocks from ordering service validate each transaction in the blocks. How does it validate? it compares the received RW set with the current world state to check whether they match. Upon validation transaction is written to the ledger and world state updates as write data from RW set gets written to the ledger Committing peers may or may not hold smart contracts. They just update the world state of the ledger
Step 7 –each peer will notify the application about the success or the failure of the transaction
Upvotes: 2