Distributing Consensus
Miguel Palhas
@naps62
B_{n}
=
\begin{cases}
Hash(B_{n-1})\\
TX_0\\
TX_1\\
TX_2\\
...\\
TX_n
\end{cases}
B_0
B_1
B_2
B_N
...
The Byzantine Generals' Problem
Proof-of-Work
(PoW)
A challenge that is:
- hard to solve
- trivial to verify
B=\begin{cases}
Hash(B_{n-1})\\
TX_0\\
TX_1\\
TX_2\\
...\\
TX_n
\end{cases}
B=\begin{cases}
Hash(B_{n-1})\\
TX_0\\
TX_1\\
TX_2\\
...\\
TX_n\\
NOnce = 0
\end{cases}
hash = sha256(sha256(B))
hash < 2^{32 - difficulty} \rightarrow \text{Block is valid}
hash >= 2^{32 - difficulty} \rightarrow NOnce++
- Nodes have to prove their commitment, by solving the puzzle
- Reverting blocks requires impractical amounts of resources
- Incentive to cooperate (mining fees) keeps the network healthy
- Hard to centralize control of the network (51% attack)
BTC total Hash-rate: 45,000,000 TH/s (that's 45e18)
BTC power consumption: 71.12 TW/h (~same as Chile)
Proof-of-Stake
(PoS)
“It takes 20 years to build a reputation and five minutes to ruin it. If you think about that, you’ll do things differently.”
Higher stakes in the network (coins owned, time spent, etc)
==
More voting power
==
Fewer incentives to misbehave
- Minimal energy waste compared to PoW
- Also does not solve the 51% problem
(but it arguably reduces it)
- Introduces new challenges
- nothing-at-stake problem
- initial distribution
- bribe attack
- Not 100% proven to be secure
objective
vs
weakly subjective
Delegated
Proof-of-Stake
(DPoS)
“Technological Democracy”
- Shareholders vote on Delegates
- Stake in the network determines voting power
- Delegates compete for the top spots, are rewarded for their duty, and punished for malicious behaviour
- Voting is an ongoing process
Back to the roots
Main issue with PoW:
wastes
too much energy
Main issue with PoW:
wastes
too much energy
- Competitive nature of PoW rewars miners for increasing their Hashing Power
- This only drivers total energy waste upwards
- BTC PoW (sha256) is 100% CPU-bound
- scales linearly with Moore's Law
Distributing Consensus
Miguel Palhas
@naps62
Distributing Consensus
By Miguel Palhas
Distributing Consensus
- 711