합의 알고리즘 (Consensus Algorithm)

데이터 합의 프로토콜.

Causes: 1. Network [latency](/ko/terms/network-latency) (Natural forks). 2. 51% Attacks (Malicious reorgs). 3. Buggy clients. Effects: Transaction reversals, increased confirmation times, potential for double-spending. Key metrics: Reorg depth, Orphan block rate.

        graph LR
  Center["합의 알고리즘 (Consensus Algorithm)"]:::main
  Rel_distributed_computing["distributed-computing"]:::related -.-> Center
  click Rel_distributed_computing "/terms/distributed-computing"
  Rel_double_spending["double-spending"]:::related -.-> Center
  click Rel_double_spending "/terms/double-spending"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 5살도 이해할 수 있게 설명

수만 명의 사람이 모여 있을 때, 누구 한 명의 말만 믿는 게 아니라 정해진 규칙에 따라 모두가 '이게 정답이야'라고 동의하게 만드는 방법입니다.

🤓 Expert Deep Dive

The probability of a reorg decreases exponentially with block depth. In Bitcoin, 6 confirmations (~1 hour) is considered statistically safe against deep reorgs. Technically, when a reorg occurs, the node identifies the 'Common Ancestor' of the two branches, rolls back the state to that point, and then reapplies the transactions from the new winning branch. Transactions from the discarded blocks are returned to the 'Mempool' and usually included in subsequent blocks. Modern Proof-of-Stake (PoS) systems like Ethereum 2.0 introduce 'Finality' (Casper FFG), where after a certain point (~12.8 minutes), a reorg becomes mathematically impossible without destroying a significant portion of the total staked capital (Slashing).

📚 출처