Proof-of-Stake
What is PoS?
Proof-of-stake is an alternative to Proof-of-Work
- PoW might lead to a low network security with block incentives that decline over time -> miner ⬇️
- PoS is one way of changing the miner's incentives for higher network security
In PoS based public blockchain, a set of validators take turns proposing and voting on the next block, and the weight of each validator's vote depends on the size of its deposit (=stake)
- Someone holding 1% of coins can mine 1% of the "Proof of Stake blocks"
- Anyone can become a validator by staking (= locking up their coins into a deposit)
- All current validators can participate in a consensus algorithm
Benefit
- No need to consume large quantities of electiricity for security
- Don't need to issue as many new coins in order to motivate parcipants to keep participating in the network
- negative net issuance is possible theoretically: a portion of transaction fees is burned and so the supply goes down over time
- Descourage centralized cartels, Reduce centralization risks
- Ability to use economic penalties to make various forms of 51% attacks vastly more expensive to carry out than PoW
Chain-based PoS
Chain-based PoS
- pseudo-randomly selects a validator during each time slot
- assings that validator the right to create a single block, and this block must point to a previous block(normally the block at the end of the previously longest chain)
- Therefore, over time most blocks converge into a single constantly growing chain.
Nothing-at-stake Problem
a scenario where block creators on generic proof-of-stake protocols have nothing to lose when the network forks.
- If there are only rewards for producing blocks and no penalties -> In the case that there are multiple competing chains, validators try to make blocks on top of every chain at once for incentives
Voting for both without any penalty
- If all actors are economically rational(acting for maximizing benefit), then a blockchain may never reach consensus even if there are no attackers.
- Attacker needs only overpower altruistic nodes and not rational node(who would stake on both the original chain and the attacker's chain)
Solution for Nothing-at-stake Problem
Penalizing validators if they simultaneously create blocks on multiple chains
Punishing validators for creating blocks on the wrong chain
These two solutions can be combined together
- Those solutions can replicate the economics of PoW inside of PoS
- In PoW, there is a penalty for creating a block on the wrong chain that is implicit in the external environment
- miners have to spend extra electricity and obtain or rent extra hardware
- Using those solutions, in PoS, it makes explicit penalties
- it imposes slightly more risk on validators (although the effect should be smoothed out over time)
BFT(Byzantine fault tolerance)-style PoS
BFT-style PoS
- Validators are randomly assigned the right to propose blocks, but agreeing on which block is canonical is done through multi-round processes where every validator sends a vote for some specific block during each round
- All validators permanently agree on whether or not any given block is part of the chain.
- Consensus on a block can come within one block, and doesn't depend on the length or size of the chain after it.
- 블록 제안과 블록 선택 과정이 분리 -> 블록 제안 과정에서는 랜덤하게 선택된 여러 검증자들이 블록을 선택. 이후 블록 선택 과정에서 지분 만큼 투표를 하고 가장 많은 투표를 받은 블록이 다음 블록으로 선택됨
Byzantine General's Problem
- In group of generals where they must only decide whether to attack or retreat
- Every general agress on a common descision, for a half-hearted attack by a few generals would become a rout
- Presense of traitorous generals -> cause problem
- EX) 9 generals are voting, four of whom suppport attacking while four others are supporting retreatiing, the ninth general may send a vote of retreat to those generals in favor of retreat, and a vote of attack to the rest.
- If the generals are physically separated and using messengers who may fail to deliver votes or may forge false votes, the problem is further complicated
Byzantine fault
- Formally defined:
- $n$ components, $t$ of which are dishonest, and assuming only point-to-point channels btw all components
- whenever a component $A$ tries to broadcast a value $x$, other componenets are allowed to discuss with each other and verify the consistency of $x$, and eventually settle on a common value $y$
- This system is said to resist Byzntine faults if a componenet $A$ can broadcast a value $x$ then,
- If A is honest, then all honest components agree on the value $x$
- In any case, all honest components agree on the same value $y$
'CS > 블록체인응용' 카테고리의 다른 글
9. Ethereum Transactions and Smart Contract (0) | 2023.11.29 |
---|---|
8. Ethereum Proof-of-Stake (1) | 2023.11.28 |
Lec 7-1: Ethereum (0) | 2023.10.20 |
Lec 6: Lightning Network (2) | 2023.10.20 |
Lec 5: Bitcoin Transaction (1) | 2023.10.19 |