Hyperledger transaction verification

寵の児 提交于 2019-12-04 22:28:11

in HL v0.x, the consensus process 'validates' transactions in the sense that it orders transactions submitted at different peer nodes in the network into a global order. This consensus process is performed by the validating peers only, who use the PBFT protocol to ensure that there is a quorum of validating peers who get the same result for each transaction (i.e. the execution of a smart contract)- in a fairly involved set of message flows between them ("pre-prepare", "prepare", "commit" etc. (See more on PBFT in detail or summary).

If consensus is achieved, then each validating peer applies the transaction result at its node, otherwise the transaction is thrown out. Non-validating peers connected to these validating peers get the data and transaction updates replicated to them - they do not participate in the transaction process.

This whole process ensures that the ledger remains constant across all the peers (validating and non-validating), which of course is the meaning of consensus. In this way the double spend problem is avoided.

HL makes consensus a pluggable feature, so that in theory it's possible to have a different consensus model for different blockchains. That's quite tricky at the moment, but it remains a design principle. Note that the consensus mechanism doesn't affect how smart contracts are written, or the fact that the ledger remains consistent - it's a purely operational concern (but nonetheless important for that, of course).

Finally, there's work going on in HL v1 for a more sophisticated consensus protocol which includes which validating peers see which transactions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!