Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
What to Upload to SlideShare
Loading in …3
×
1 of 10

Consensus models April 2018

1

Share

Download to read offline

A primer for the foundations of blockchain and consensus models;
1. Proof of work
2. Proof of stake
3. Delegated proof of stake
4. Delegated Byzantine fault tolerance

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Consensus models April 2018

  1. 1. Consensus Models Barry O’Connor 9th April 2018
  2. 2. When? 1. Permissionless Blockchains 2. Permissioned Blockchains 1. A dynamic way of reaching agreement in a group 2. Not voting – majority rule 3. Consensus – for the good of the group
  3. 3. What? 1. Agreement Seeking: As much agreement from the group as possible. 2. Collaborative: Aim to work together to achieve a result that puts the best interest of the group first. 3. Cooperative: Should not put their own interests first and work as a team more than individuals. 4. Egalitarian: A group trying to achieve consensus should be as egalitarian as possible. 5. Inclusive: As many people as possible should be involved in the consensus process. 6. Participatory: It should be such that everyone should actively participate in the the overall process.
  4. 4. Byzantine Generals Problem(BGP) 1. A General 2. His lieutenants 3. Traitors • The generals are collectively known as processes. • The general who initiates the order is the source process, and the orders sent to the other processes are messages. • Traitorous generals and lieutenants are faulty processes, and loyal generals and lieutenants are correct processes. • The order to retreat or attack is a message with a 1 or 0. • In general, a solution to agreement problems must pass three tests: termination, agreement, and validity. As applied to the Byzantine General's problem, these three tests are: 1. A solution has to guarantee that all correct processes eventually reach a decision regarding the value of the order they have been given. 2. All correct processes have to decide on the same value of the order they have been given. 3. If the source process is a correct process, all processes have to decide on the value that was originally given by the source process. https://people.eecs.berkeley.edu/~luca/cs174/byzantine.pdf
  5. 5. How do you solve it? 1.Proof for work 2.Proof of stake 3.Delegated proof of stake 4.Delegated Byzantine fault tolerance
  6. 6. 1. Proof of work BGP 1. “Attack tonight” 2. Add a NONCE to the text – a random hex 3. They hash the text with the nonce and see the result. They only decide to share messages that start with “00000”. 4. If the hash is met, they send the messages. If not, they will randomly change the nonce until the hash works. 5. If it is intercepted and changed, a general can look for the 00000. This is BTC Mining using cryptographic puzzles.
  7. 7. 2. Proof of stake 1. The validators lock up some of their coins as stake. 2. After that, they will start validating the blocks. • Meaning, when they discover a block which they think can be added to the chain, they will validate it by placing a bet on it. 3. Validators take turns proposing and voting on the next block. 4. If the block gets appended to the chain, then the validators will get a reward proportionate to their bets. Ethereum is moving to this model with Casper.
  8. 8. 3. Delegated proof of stake 1. At the start of every round, 21 block producers(Witnesses) are chosen. • Top 20 are automatically chosen while the 21st one is chosen proportional to the number of their votes relative to the other producers. 2. The producers are then shuffled around using a pseudorandom number derived from the block time. • This is done to ensure that a balance connectivity to all other producers is maintained. 3. To ensure that regular block production is maintained and that block time is kept to 3 seconds, producers are punished for not participating by being removed from consideration. 4. A producer has to produce at least one block every 24 hours to be in consideration. EOS is using this to scale up to millions of TPS
  9. 9. 4. Delegated Byzantine fault tolerance 1. One of the delegates is randomly chosen as a speaker. 1. The Speaker then look at all the demands of the citizens and creates a law. 2. They then calculate a “Happiness Factor” of these laws to see if the number is enough to satisfy the citizen’s needs or not. 3. They then pass that down to the delegates. 2. The delegates then individually check the Speaker’s calculations. 1. If the the speaker’s number matches the Delegate’s then they give their approval, if not then they give their disapproval. 2. 66% of the delegates need to give their approval for the law to pass. 3. If the majority is not sealed, then a new leader is chosen and the process starts again. 4. The citizens are whoever owns tokens aka ordinary nodes. 5. Delegates are the bookkeeping nodes. The NEO network uses this model
  10. 10. Thank you.

×