Presentation is loading. Please wait.

Presentation is loading. Please wait.

Consensus Algorithms So let’s talk about consensus algorithms.

Similar presentations


Presentation on theme: "Consensus Algorithms So let’s talk about consensus algorithms."— Presentation transcript:

1 Consensus Algorithms So let’s talk about consensus algorithms.

2 Administrivia HW1 due tonight!
HW2 out ~tonight (will be due in 2 weeks) Spoilers: it’s about hashing MUST be done in pairs Tonight’s clinic will cover more hashing stuff Quiz 2 also out today (will be due Friday night) Covers Thurs lecture on hashing and Tues lecture on consensus algorithms (not today!) Regular office hours schedule coming soon

3 Proof of Work (cont.) So let’s talk about consensus algorithms.

4 Proof of Work Miner

5 Proof of Work Also protection against fraud!
(So long as you don’t have 51% of computation power) Miner Evil Miner

6 Proof of Work Is the Miner incentive actually all that incentivizing?
What’s the expected time for any individual Miner to win the race? Alice owes Bob 100CC Bob owes Charlie 80CC Bob owes Deborah 30CC Alice owes Charlie 500CC Miner Miner receives 50CC +5CC +2CC +3CC

7 Proof of Work: Miner Pools
Alice owes Bob 100CC SHA-256 …. Bob owes Charlie 80CC Bob owes Deborah 30CC Alice owes Charlie 500CC Miner 37212

8 Proof of Work: Miner Pools
Miner Pool Coordinator

9 Proof of Work: Miner Pools
Alice Bob Alice owes Bob 100CC Bob owes Charlie 80CC Bob owes Deborah 30CC Miner Pool Coordinator Alice owes Charlie 500CC Miner 00021 Charlie Deborah

10 Proof of Work: Miner Pools
Miners do work on behalf of the pool As long as they can show that they’re helping, they get a cut Very roughly like tip sharing at a diner But… is there anything stopping you from being in multiple pools? Potential for abuse: can broadcast near misses but save actual hits for your “real” pool

11 Paxos Citation: Google Tech Talks video on Paxos
The first consensus algorithm we’re going to look at is Paxos. Citation: Google Tech Talks video on Paxos

12 Paxos What do we mean by consensus? Consensus is on one value.
Consensus is reached once a majority of participants agree. Once a consensus is reached, everyone can eventually know the result. Participants are happy to reach consensus on any result, not just the one they propose. Communication channels are not perfect (messages may be lost). So for our purposes, we’re going to be talking about a particular definition of consensus. In particular, we’re just going to be talking about consensus on a single “thing.” So for instance, this could be a decision amongst you and your friends about what restaurant to go to this evening, but it doesn’t involved a decision about what to order when you get there (although you could do another “round” of the decision making process on that… more on that later). We’re also not going to worry about uniform consensus (where ALL parties agree) and instead go for a “majority rules” consensus like in an election. Uniform consensus is necessarily harder (and less fault tolerant) since it has stronger requirements on a decision being made. If you’re interested it’s another area of study you can look into, but we’re not going to cover it in this course. Now, even though we’re sticking with majority consensus, it’s important that eventually all participants can find out what the majority decided. It’s also important that participants are happy to reach consensus on any value, not necessarily just the one they propose. In other words, no “rage quitting” :) And lastly (and sort of the point of why this is hard), we have to assume that communication channels are imperfect. This could mean that messages are lost because a connection is bad, or one of the machines goes down, etc.

13 Paxos “Sure, Finding Nemo is great” “What about Mission Impossible”
“Ugh, OK fine” Bob Charlie “Finding Nemooooooooo” “Let’s see Finding Nemo” Alice Debbie Erica “OK, I guess it’s Finding Nemo”

14 Paxos “Hey guys, wanna watch the Star Wars Holiday Special” Bob
Charlie Fred “NO. We already decided Finding Nemo” Alice Debbie Erica


Download ppt "Consensus Algorithms So let’s talk about consensus algorithms."

Similar presentations


Ads by Google