资源描述:
《区块链技术课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、区块链技术1BitcoinConsensusWhatdatadoeseachnodestoreatitslocalstorage?Whatdoestheydo?fullyvalidatingnodesCompleteblockchainThechainoftheblockheadsThetransactionsotheblockchainThelistofUTXO(UnspentTransactionOutput)ToproceedsthetransactionsquicklyTransactionPoolThenodew
2、illselecttransactionsfromtransactionpoolandmine.lightweightnodes(ThinClientsorSimplifiedPaymentVerification(SPV)Clients):ThecompletechainoftheblockheadsTheyonlystorethepiecesthattheyneedtoverifyspecifictransactionsthattheycareaboutDoesnotmine2Howdoeseachnodemakesu
3、rethathislocalblockchainisconsistentwiththatofthemajornodesinthesystem?DistributedConsensusDistributedConsensusProtocolTherearennodesthateachhaveaninputvalue.Someofthesenodesarefaultyormalicious.Adistributedconsensusprotocolhasthefollowingtwoproperties:Itmusttermi
4、natewithallhonestnodesinagreementonthevalueThevaluemusthavebeengeneratedbyanhonestnodeBitcoinConsensus3ThetargetofBitcoinconsensus:Atanymoment,allnodesintheBitcoinNetworkagreesonaseriesofblocks,andthetransactionsintheseblocks.Question:Anewblockcandidateisfoundandb
5、roadcast,somenodesreceiveandacceptthisnewblock,whileothersdidnot.Whatisthestate?Iftherearemultiplesuchblocks,whatisthestate?Itmusthappens,sinceitisap2pnetworkBitcoinConsensus401100……101Tx1Tx2102Tx3Tx4Tx21,Tx22,Tx2301100……101Tx1Tx2102Tx3Tx4Tx31,Tx32,Tx3301100……101T
6、x5Tx6102Tx7Tx8Tx51,Tx52,Tx53BitcoinConsensus5BitcoinConsensusWhoproposesthenewblock(thecontentoftheblockchain)?Theminerscompetebycomputinghash,andbroadcastthevalidcandidatetotheBitcoinNetworkWhodecideswhetherthenewblockisacceptedbywholebitcoinnetwork?Nodiscussiona
7、ndnegotiation,sincethenodesdoesnottrusteachotherImplicitconsensus:eachnodemakesitsowndecisiononwhetheracceptanewblockCheckthevalidityofthenewblockIfaccept,thenuptaelocalblockchainbyappendingthenewblocktothecurrentblockchain,andminebasedontheupdatedblockchainIfdono
8、taccept,stillminebasedoncurrentblockchainConsensusresult:Ifthemajoritynodesare`honest’,thenallthenodeshavethesamelocalconsensusblockchain.BitcoinConsens