1

I am a bit confused by one aspect regarding all full nodes validating a mined block. The descriptions say that the EVM in each full node runs any contracts contained within that block so that they all reach the same end state.

If I have a contract which pays out ether to a certain party, does it mean that all the nodes pay out ether to that party during the process of validation?

This seems unlikely; so who does the actual payout required by the contract? Is it only done once during the process of mining?

And, if so, what do the full nodes do when they reach the payout step in the code that they also run during validation?

Thanks in advance for your help explaining this to a newbie.

0

It seems contradictory if you're thinking in terms of actual coins/tokens, as if contract Alice pays Bob and node1 pays Bob, then node2 pays Bob, then node3, etc. It's not like physical items changing hands.

The nodes have a shared state - it's like identical copies of a spreadsheet. The nodes agree on the initial state of the world in which Alice has a certain balance, and so does Bob. Then, they all process the transaction they witnessed in which Alice pays a certain amount to Bob. Then, they all independently reach the same conclusion about Alice and Bob's new balances.

Hope it helps.

  • Thanks for clarifying. I keep falling onto the old mental model of thinking of transactions as actual transfers rather than entries in a ledger. – Dyons Nov 9 '17 at 2:19

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.