Bitcoins consensus chooses the deepest branch State BiPi the local blockchain

# Bitcoins consensus chooses the deepest branch state

• 67

This preview shows page 33 - 58 out of 67 pages.

Bitcoin’s consensus chooses the deepest branch State Bi,Pi the local blockchain view Each peer of the blockchain executes: Receive blocks Bj, Pj from j Bi = Bi Bj Pi = Pi Pj depth (b): if children(b) = then return 1 else return 1 + max c children(b) depth(c) Prune shortest branches at i b = genesis-block(Bi) while b.next ≠ block = argmax c children(b) { depth(c) } B = B {block} P = P { block,b } b = block Bi,Pi = B,P [Nak08] S. Nakamoto, “Bitcoin: a peer-to-peer electronic cash system,” 2008, . 33
When is a transaction committed?
Committed transaction Given a blockchain with parameter k , a block at index i is decided when the chain depth reaches i+k A transaction is committed if it belongs to a decided block 35
Quiz
Question 1 What assumption is needed here? 37
Question 1 What assumption is needed here? Synchrony Without synchrony, no one can distinguish a committed transaction from a transaction that is not yet committed and that can possibly be rolled back later on 38
The 51% attack
Impact of mining power 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s 40
b1 b1 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s Impact of mining power 41
b2 b2 b1 b1 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s Impact of mining power 42
b2 b1 b3 b3 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s Impact of mining power 43
b4 b2 b1 b4 b3 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s Impact of mining power 44
b5 b2 b1 b4 b3 b5 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s Impact of mining power 45
b5 b2 b1 b4 b3 b5 10MH/s 3MH/s 2MH/s 1MH/s 3MH/s [Ros12] M. Rosenfeld, “Analysis of hashrate- based double-spending,” 2012. Impact of mining power 46
Impact of network delay
Impact of communication delay 48
Blocks propagate fast b5 b1 b1 49
Impact of communication delay b1 b2 b3 b4 b5 b5 50
Impact of communication delay b1 b2 b3 b4 b5 b5 b4 b3 b2 b1 51
Quiz

#### You've reached the end of your free preview.

Want to read all 67 pages?

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern