--- title: 'Consensus Algorithms' author: 'Hun Im' date: 2024-09-12T13:30:13+09:00 category: ['POSTS'] tags: ['Blockchain'] og_image: "/images/gamer.png" keywords: ['Blockchain'] --- ### Types of Major Consensus Algorithms 1. Proof of Work (PoW) * Description: A method where network participants compete to solve very complex mathematical problems to create blocks. The node that solves the problem first earns the right to add a new block. * Examples: Bitcoin, Ethereum (pre-2.0). * Pros: High security and operates in a decentralized network without centralized authority. * Cons: Extremely high energy consumption and slow transaction speeds. 2. Proof of Stake (PoS) * Description: A method where nodes obtain the right to create blocks based on the amount of cryptocurrency they hold (stake). The more stake, the higher the chance to add a new block. * Examples: Ethereum (2.0), Cardano, Polkadot. * Pros: Energy efficient and faster block generation compared to PoW. * Cons: Potential centralization by nodes with large stakes. 3. Delegated Proof of Stake (DPoS) * Description: Users elect a set number of delegates who are responsible for creating blocks. These representatives are chosen by network participants through voting, and they perform block verification and generation tasks. * Examples: EOS, Tron, Steem. * Pros: Faster transaction speeds than PoS and energy efficiency. * Cons: Risk of centralization due to reliance on a small number of elected nodes. 4. Proof of Authority (PoA) * Description: A small, trusted group of validators are responsible for creating blocks. These validators must be verified as trustworthy within the network and are responsible for adding blocks. * Examples: VeChain, certain private blockchains. * Pros: Very fast and operates efficiently in a trusted environment. * Cons: High likelihood of centralization and reliance on a small group of validators. 5. Delayed Proof of Work (dPoW) * Description: Provides an additional security layer by using the hash power of an existing PoW blockchain to secure a secondary chain. The secondary chain leverages the security of the primary PoW chain. * Example: Komodo. * Pros: Utilizes the security of existing PoW blockchains while increasing efficiency. * Cons: Dependency on an existing PoW chain. 6. Byzantine Fault Tolerance (BFT) * Description: A method to address the Byzantine Generals Problem, allowing the system to continue functioning correctly even if some nodes act maliciously or fail to respond. * Examples: Hyperledger, Tendermint. * Pros: Provides high security and ensures reliable outcomes even with untrustworthy nodes. * Cons: More complex than PoW or PoS and may slow down as the network grows. 7. Practical Byzantine Fault Tolerance (PBFT) * Example: Hyperledger Fabric. * Features: Requires more than half of the network nodes to reach the same state for consensus. 8. QBFT (Quorum-based Byzantine Fault Tolerance) * Description: QBFT is a consensus algorithm in the BFT family that requires the approval of more than half of the nodes in the network to reach consensus. Developed to maintain both security and efficiency while tolerating Byzantine faults, it is an evolution of the PBFT algorithm. * Example: Used in Hyperledger Besu, it is known to be well-suited for enterprise blockchains. * Pros: Even if malicious nodes are present, the network can securely reach consensus as long as there is a majority of trustworthy nodes. It also does not consume as much energy as PoW and can process transactions quickly. * Cons: As the network size grows, communication costs for consensus increase, which may degrade performance. The larger the number of nodes, the slower the network becomes. QBFT is primarily used in enterprise blockchain environments, where it balances Byzantine fault tolerance with performance and scalability. 9. Hybrid Consensus Algorithm * Example: Decred. * Features: Combines two or more consensus algorithms to maximize stability and efficiency. 10. Raft Algorithm * Description: Raft operates as a leader-based consensus algorithm in distributed systems to maintain consistency across multiple nodes. The leader handles client requests and replicates logs to follower nodes to maintain consistency. If the leader fails, a new leader is elected through voting. * Examples: Etcd, Consul. * Pros: Simple structure, easy to understand and implement, and fast, stable leader election and log replication. * Cons: Since the structure relies on the leader, frequent leader changes may degrade performance, and recovery time is needed if the leader fails. 11. Tendermint: * Example: Cosmos. * Features: A BFT-based algorithm that achieves fast and stable consensus. Often combined with PoS for use. ### Other Consensus Algorithms * Federated Byzantine Agreement (FBA): Used by Ripple and Stellar. * Leased Proof of Stake (LPoS): Used by Waves. * Proof of Burn (PoB): A method where a certain amount of cryptocurrency is burned to gain the right to create blocks.
Β
--- title: 'ν©μ μκ³ λ¦¬μ¦' author: 'μν' date: 2024-09-12T13:30:13+09:00 category: ['POSTS'] tags: ['Blockchain'] og_image: "/images/gamer.png" keywords: ['Blockchain'] --- ### μ£Όμ ν©μ μκ³ λ¦¬μ¦ μ’ λ₯ 1. μμ μ¦λͺ (Proof of Work, PoW) * λ€νΈμν¬ μ°Έμ¬μλ€μ΄ λ§€μ° λ³΅μ‘ν μνμ λ¬Έμ λ₯Ό ν΄κ²°νλ κ²½μμ ν΅ν΄ λΈλ‘μ μμ±νλ λ°©μμ λλ€. μ΄ λ¬Έμ λ₯Ό λ¨Όμ ν΄κ²°ν λ Έλκ° μλ‘μ΄ λΈλ‘μ μΆκ°ν κΆλ¦¬λ₯Ό μ»κ² λ©λλ€. * μμ: λΉνΈμ½μΈ, μ΄λ리μ(2.0 μ΄μ ). * μ₯μ : 보μμ±μ΄ λκ³ , μ€μνλ κΆν μμ΄ νμ€μνλ λ€νΈμν¬μμ λμ κ°λ₯. * λ¨μ : μλμ§ μλͺ¨κ° λ§€μ° ν¬κ³ , μ²λ¦¬ μλκ° λ릴 μ μμ. 2. μ§λΆ μ¦λͺ (Proof of Stake, PoS) * μ€λͺ : λ Έλκ° λ³΄μ ν μνΈννμ μ(μ§λΆ)μ λ°λΌ λΈλ‘ μμ± κΆνμ μ»λ λ°©μμ λλ€. μ§λΆμ΄ λ§μμλ‘ μλ‘μ΄ λΈλ‘μ μΆκ°ν νλ₯ μ΄ λμμ§λλ€. * μμ: μ΄λ리μ(2.0), μΉ΄λ₯΄λ€λ Έ(Cardano), ν΄μΉ΄λ·(Polkadot). * μ₯μ : μλμ§ ν¨μ¨μ΄ λκ³ , PoWμ λΉν΄ λΈλ‘ μμ± μλκ° λΉ λ¦. * λ¨μ : μ§λΆμ΄ λ§μ λ Έλμ μν μ€μν κ°λ₯μ±. 3. μμ μ§λΆ μ¦λͺ (Delegated Proof of Stake, DPoS) * μ€λͺ : μ¬μ©μκ° μΌμ μμ λνμλ₯Ό μ μΆνκ³ , μ΄ λνμλ€μ΄ λΈλ‘μ μμ±νλ λ°©μμ λλ€. λνμλ λ€νΈμν¬ μ°Έμ¬μλ€μ ν¬νμ μν΄ μ μ λλ©°, μ΄λ€μ΄ λΈλ‘ κ²μ¦κ³Ό μμ± μμ μ μνν©λλ€. * μμ: EOS, νΈλ‘ (Tron), μ€ν(Steem). * μ₯μ : PoSμ λΉν΄ λ λΉ λ₯Έ μ²λ¦¬ μλλ₯Ό μ 곡νλ©°, μλμ§ ν¨μ¨μ΄ μ’μ. * λ¨μ : μ μΆλ μμμ λ Έλμ μν΄ μ€μνλ κ°λ₯μ±μ΄ μμ. 4. κΆν μ¦λͺ (Proof of Authority, PoA) * μ€λͺ : μ λ’°ν μ μλ μμμ κ²μ¦μκ° λΈλ‘μ μμ±νλ λ°©μμ λλ€. κ²μ¦μλ λ€νΈμν¬ λ΄μμ μ λ’°ν μ μλ μΈλ¬Όλ‘ μΈμ¦λ μνμ¬μΌ νλ©°, μ΄λ€μ΄ λΈλ‘μ μΆκ°νλ μν μ ν©λλ€. * μμ: VeChain, μΌλΆ νλΌμ΄λΉ λΈλ‘체μΈ. * μ₯μ : λ§€μ° λΉ λ₯΄κ³ , μ λ’°ν μ μλ νκ²½μμ ν¨μ¨μ μΌλ‘ λμ. * λ¨μ : μ€μνλμ΄ μμ κ°λ₯μ±μ΄ λκ³ , μμμ κ²μ¦μμκ² μμ‘΄. 5. μ§μ°λ μμ μ¦λͺ (Delayed Proof of Work, dPoW) * μ€λͺ : λΈλ‘체μΈμ 보μμ κ°ννκΈ° μν΄ κΈ°μ‘΄ PoW λΈλ‘체μΈμ ν΄μλ₯Ό μ¬μ©νμ¬ μΆκ° 보μ λ μ΄μ΄λ₯Ό μ 곡νλ λ°©μμ λλ€. μ¦, 보쑰 체μΈμ΄ μ£Όμ PoW 체μΈμ 보μμ λΉλ €μ νμ©νλ ννμ λλ€. * μμ: Komodo. * μ₯μ : κΈ°μ‘΄ PoW λΈλ‘체μΈμ 보μμ±μ νμ©νλ©΄μλ ν¨μ¨μ±μ λμ. * λ¨μ : κΈ°μ‘΄ PoW 체μΈμ μμ‘΄μ±μ΄ μμ. 6. λΉμν΄ μ₯μ νμ© (Byzantine Fault Tolerance, BFT) * μ€λͺ : λΉμν΄ μ₯κ΅° λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν λ°©μμΌλ‘, λ€νΈμν¬ λ΄ μΌλΆ λ Έλκ° μ μμ μΈ νμλ₯Ό νκ±°λ μλ΅νμ§ μλ μν©μμλ μμ€ν μ΄ μ μμ μΌλ‘ λμν μ μκ² ν©λλ€. * μμ: Hyperledger, Tendermint. * μ₯μ : λμ 보μμ±μ μ 곡νκ³ , λ€νΈμν¬ λ΄μμ μ λ’°ν μ μλ λ Έλκ° μλλΌλ μ λ’°ν μ μλ κ²°κ³Όλ₯Ό μ»μ μ μμ. * λ¨μ : PoWλ PoSμ λΉν΄ 볡μ‘νλ©°, λ€νΈμν¬κ° 컀μ§μλ‘ μλκ° λλ €μ§ μ μμ. 7. μ€μ© λΉμν΄ μ₯μ νμ© (Practical Byzantine Fault Tolerance, PBFT): * μ¬μ© μμ: Hyperledger Fabric * νΉμ§: λ€νΈμν¬ λ΄μμ κ³Όλ°μ μ΄μμ λ Έλκ° λμΌν μνμ λλ¬ν΄μΌ ν©μκ° μ΄λ£¨μ΄μ§. 8. QBFT (Quorum-based Byzantine Fault Tolerance) * μ€λͺ : QBFTλ λΉμν΄ μ₯μ νμ©(Byzantine Fault Tolerance, BFT) κ³μ΄μ ν©μ μκ³ λ¦¬μ¦ μ€ νλλ‘, λ€νΈμν¬ λ΄μ λ Έλλ€μ΄ ν©μμ λλ¬νκΈ° μν΄ κ³Όλ°μ μ΄μμ λ Έλμ μΉμΈμ μꡬνλ λ°©μμ λλ€. λΉμν΄ μ₯μ λ₯Ό νμ©νλ©΄μλ λ€νΈμν¬μ μμ μ±κ³Ό ν¨μ¨μ±μ μ μ§νλ €λ λͺ©μ μμ κ°λ°λμμ΅λλ€. PBFT(Practical Byzantine Fault Tolerance) μκ³ λ¦¬μ¦μμ λ°μ λ ννμ λλ€. * μμ: Hyperledger Besuμμ μ¬μ©λλ©°, μ£Όλ‘ κΈ°μ μ© λΈλ‘체μΈμ μ ν©ν μκ³ λ¦¬μ¦μΌλ‘ μλ €μ Έ μμ΅λλ€. * μ₯μ : λ€νΈμν¬ λ΄ μ μμ μΈ λ Έλκ° μλλΌλ, κ³Όλ°μμ μ λ’°ν μ μλ λ Έλκ° μμΌλ©΄ μμ νκ² ν©μμ λλ¬ν μ μμ΅λλ€. λν, PoWμ²λΌ μλμ§ μλΉκ° ν¬μ§ μμΌλ©°, λΉ λ₯Έ νΈλμμ μ²λ¦¬κ° κ°λ₯ν©λλ€. * λ¨μ : λ€νΈμν¬ κ·λͺ¨κ° 컀μ§μλ‘ ν©μμ νμν ν΅μ λΉμ©μ΄ μ¦κ°νμ¬ μ±λ₯μ΄ μ νλ μ μμ΅λλ€. λ Έλ μκ° λ§μμ§μλ‘ λ€νΈμν¬μ μ²λ¦¬ μλκ° λλ €μ§ μ μμ΅λλ€. QBFTλ λΉμν΄ μ₯μ νμ©μ κΈ°λ°μΌλ‘ νλ©΄μλ μ±λ₯κ³Ό νμ₯μ±μ μ μ§νλ €λ μκ³ λ¦¬μ¦μΌλ‘, μ£Όλ‘ μν°νλΌμ΄μ¦ λΈλ‘μ²΄μΈ νκ²½μμ μ¬μ©λ©λλ€. 9. νΌν© ν©μ μκ³ λ¦¬μ¦ (Hybrid Consensus): * μ¬μ© μμ: Decred * νΉμ§: λ κ°μ§ μ΄μμ ν©μ μκ³ λ¦¬μ¦μ κ²°ν©νμ¬ μμ μ±κ³Ό ν¨μ¨μ±μ κ·Ήλν. 10. Raft μκ³ λ¦¬μ¦ * μ€λͺ : Raftλ λΆμ° μμ€ν μμ μ¬λ¬ λ Έλκ° μΌκ΄λ μνλ₯Ό μ μ§ν μ μλλ‘ λ¦¬λ κΈ°λ° κ΅¬μ‘°λ‘ λμνλ ν©μ μκ³ λ¦¬μ¦μ λλ€. 리λκ° ν΄λΌμ΄μΈνΈ μμ²μ μ²λ¦¬νκ³ , κ·Έ λ‘κ·Έλ₯Ό νλ‘μ λ Έλμ 볡μ νμ¬ μΌκ΄μ±μ μ μ§ν©λλ€. 리λκ° μ₯μ κ° λ°μνλ©΄ μλ‘μ΄ λ¦¬λκ° ν¬νλ₯Ό ν΅ν΄ μ μΆλ©λλ€. * μμ: Etcd, Consul. * μ₯μ : κ΅¬μ‘°κ° κ°λ¨νκ³ μ΄ν΄νκΈ° μ¬μ ꡬνμ΄ μ©μ΄νλ©°, 리λ μ μΆκ³Ό λ‘κ·Έ 볡μ κ° λΉ λ₯΄κ³ μμ μ μ λλ€. * λ¨μ : 리λμ μμ‘΄μ μΈ κ΅¬μ‘°μ΄κΈ° λλ¬Έμ 리λκ° μμ£Ό λ³κ²½λλ©΄ μ±λ₯μ΄ μ νλ μ μκ³ , 리λ μ₯μ μ 볡ꡬ μκ°μ΄ νμν©λλ€. 11. Tendermint: * μ¬μ© μμ: Cosmos * νΉμ§: BFT κΈ°λ°μΌλ‘ λΉ λ₯΄κ³ μμ μ μΌλ‘ ν©μλ₯Ό λ¬μ±νλ μκ³ λ¦¬μ¦. PoSμ κ²°ν©νμ¬ μ¬μ©. ### κΈ°ν ν©μ μκ³ λ¦¬μ¦ * Federated Byzantine Agreement (FBA): 리ν, μ€ν λΌμμ μ¬μ©. * Leased Proof of Stake (LPoS): μ¨μ΄λΈ(Waves)μμ μ¬μ©. * Proof of Burn (PoB): νΉμ μμ μνΈννλ₯Ό μκ°νμ¬ λΈλ‘ μμ± κΆνμ μ»λ λ°©μ.