1

I can easily visualise how consensus can be reached on transactions in systems such as Bitcoin, but I struggle to understand how consensus can work in a smart contract platform - i.e how can nodes reach consensus that code has been executed correctly.

My hunch is that this is based on the fact that each function call of a contract needs to amend account balances - and it is this which is validated for consensus?

2

function call actually will translate into a tnx so the consensus will be ensure as below

  1. tnx will be verified by merkle tree hash root in block header
  2. result of each tnx will might change the world state (account balance for instance) and this state will be verified by state root in the block header
  3. after tnx was confirm, a tnx receipts/logs will be created and it also be verified by receipt hash root in the block header.

All will ensure the consensus rule of the chain. Hope this make a bit clear for your understanding about the consensus engine.

  • It does thank you, is there any visual I can see and read a little more in depth which you may recommend? – dendog Aug 30 '18 at 7:55
  • I think this one is a good read hackernoon.com/… – Ha ĐANG Aug 30 '18 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.