Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A night of consensus

A night of consensus

How do we think about Consensus on Celo

nambrot

July 22, 2019
Tweet

More Decks by nambrot

Other Decks in Technology

Transcript

  1. A Night of Consensus, July 22nd 2019 Nam Chu Hoai

    | @nambrot | @CeloHQ | celo.org
  2. • PoS blockchain with EVM • Stable coin platform, backed

    by diversified reserve • Lightweight, decentralized identity protocol • Decentralized Eigentrust-based reputation • Full on-chain governance OPEN PLATFORM APPLICATIONS e.g. Celo Wallet “Whatsapp for Money” Mobile-First Approach
  3. 50 Contributors + 20 Languages Spoken 6.4k Community Members 120

    User Research Interviews + 64 Community Events 80k Lines of Code
  4. “Life is not good. It is not bad. It’s just

    living — there is no other way.” Kaburu, Congolese Refugee in Tanzania
  5. ERC20 Compatible interface GasToken { function transfer(address, uint256) external returns

    (bool); function approve(address, uint256) external returns (bool); function transferFrom(address, address, uint256) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address) external view returns (uint256); function allowance(address, address) external view returns (uint256); function debitFrom(address, uint256) external; function creditTo(address, uint256) external; }
  6. • PBFT Based • PREPREPARE/PREPARE/COMMIT • Locking instead of roundchange

    certificates • Gossip for consensus messages Istanbul BFT
  7. Validator Tree (Global State) Older / More Trusted Newer /

    Less Trusted Validator 1 B 1 , PK 1 Validator 2 B 2 , PK 2 Validator 3 B 3 , PK 3 Validator 4 B 4 , PK 4 Virtual Validator 1-2 B 1-2 , PK 1-2 Virtual Validator 3-4 B 3-4 , PK 3-4 Virtual Validator 1-4 B 1-4 , PK 1-4 B N = Total stake for subtree. Used as a node weight in BFT algorithm PK N = Public key for multisig requiring signature of entire subtree to validate
  8. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 1 2 2 2 2 4 4 8 16 Red: disagreement / offline Labels: total stake size, same for all nodes for simplicity
  9. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 2 2 1) Disband all trees without unanimous consent 1
  10. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 2 2 1) Disband all trees without unanimous consent 2) Run BFT with virtual nodes Weighted BFT Algorithm 1
  11. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 2 2 1) Disband all trees without unanimous consent 2) Run BFT with virtual nodes Weighted BFT Algorithm 1
  12. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 2 2 1) Disband all trees without unanimous consent 2) Run BFT with virtual nodes 3) Move all misbehaving nodes to the right side 1
  13. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 2 2 1) Disband all trees without unanimous consent 2) Run BFT with virtual nodes 3) Move all misbehaving nodes to the right side (order them by reverse stake) 1
  14. Example Tree Rebuilding 1 1 1 1 1 1 1

    1 2 2 2 2 4 4 8 1 1 1 1 1 1 1 2 2 1) Disband all trees without unanimous consent 2) Run BFT with virtual nodes 3) Move all misbehaving nodes to the right side (order them by reverse stake) 4) Construct a new tree in this order 1 2 2 4 4 8 16
  15. Develop Contribute github.com/celo-org Run a Node Validator or Full Node

    docs.celo.org Fellowship Propose a project Events Host a meetup Jobs Join the team Get Involved
  16. Thanks, we value your time A Night of Consensus, July

    22nd 2019 Nam Chu Hoai | @nambrot | @CeloHQ