How Does a Blockchain Network Reach Consensus on the Outcome of a Smart Contract?

A blockchain network reaches consensus on the outcome of a smart contract through a consensus mechanism, such as Proof-of-Work (PoW) or Proof-of-Stake (PoS). When a smart contract is executed, the transaction is broadcast to the network.

Nodes (or validators) on the network independently execute the contract's code and compute the result. The consensus mechanism ensures that all honest nodes agree on the correct result and the new state of the blockchain.

This agreed-upon result is then added to a new block, making it a permanent and verifiable part of the ledger.

What Is the Role of a Consensus Mechanism in a Private Blockchain?
What Role Do Full Nodes Play in Validating and Preventing the Acceptance of a Malicious Re-Org?
How Does Decentralized Consensus Apply to Smart Contract Execution?
How Does Consensus Relate to Double-Spending?
What Are the Primary Security Trade-Offs between PoW and PoS?
Can Two Private Parties Agree to MTM Terms in a Forward Contract?
What Is the “Byzantine Generals Problem” That pBFT Aims to Solve?
What Is a ‘Byzantine Fault Tolerance’ (BFT) Consensus and How Does It Relate to PoS Finality?

Glossar