Module-3 Block Chain and Its Applications
Module-3 Block Chain and Its Applications
Blockchain consensus is the process by which all participants (nodes) in a blockchain network
agree on the single, consistent state of the blockchain ledger. It ensures that every node has the
same copy of the data and that the data recorded is valid and trustworthy.
Permissioned consensus is closed, faster, and designed for trusted, private networks.
Transaction Slower due to wide participation Faster due to fewer nodes and simpler
Speed and complex validation consensus
Security Model Security relies on economic costs Security based on trust among known
or stake ownership participants
Transparency Fully transparent and public Transaction visibility limited to
authorized parties
Examples Bitcoin, Ethereum (public Hyperledger Fabric, R3 Corda
network)
3. Explain the Paxos consensus protocol.
Paxos is a family of consensus protocols used to achieve agreement among distributed systems
(e.g., databases, blockchain, cloud systems) where nodes may fail or send conflicting messages.
It was introduced by Leslie Lamport and is widely regarded as one of the most fundamental
consensus algorithms in distributed computing.
Paxos Phases:
1. Prepare Phase:
2. Accept Phase:
• Once the proposer receives promises from a majority, it sends an accept request with
a value and the same proposal number.
• Acceptors vote by accepting the proposal if it matches the highest number they've
promised not to override.
3. Learning Phase:
Features of Paxos:
• Fault Tolerant: Works correctly even if some nodes fail.
• Safety Guaranteed: Never produces conflicting decisions.
• No Guaranteed Liveness: In practical scenarios, progress may be delayed due to
conflicts or failures.
Advantages:
• Highly fault-tolerant.
• Proven correctness in asynchronous systems.
Disadvantages:
• Complex to implement.
• Slow compared to newer consensus methods like Raft or PBFT.
Key Components:
Step 2: Endorsement
Step 3: Ordering
The term originates from the Byzantine Generals Problem, a thought experiment that
illustrates the difficulty of achieving consensus in the presence of treacherous actors.
Imagine several generals of the Byzantine army surrounding a city. They must agree on a
common plan (attack or retreat), but some generals may be traitors who send false or conflicting
messages. The challenge is to reach a consensus despite these malicious participants.
1. Consistency (Safety): All honest nodes agree on the same value or state.
2. Liveness: The system continues to operate and make progress despite faults.
3. Fault Tolerance: Can tolerate up to (n−1)/3 faulty nodes in a network of n nodes.
Importance in Blockchain:
• Prevents dishonest nodes from corrupting the ledger.
• Ensures network security and reliability even when some participants are unreliable.
• Essential for permissioned blockchains with known participants.
Features:
Feature Byzantine Fault Tolerance (BFT)
1. Transaction Throughput
• Throughput refers to how many transactions the network can process per second
(TPS).
• Heavy consensus algorithms like Proof of Work (PoW) (used in Bitcoin) have low
throughput (e.g., ~7 TPS).
• Efficient consensus models like Proof of Stake (PoS) or PBFT offer higher
throughput (hundreds to thousands of TPS).
2. Latency
• Latency is the time taken to confirm and finalize a transaction.
• PoW involves solving complex puzzles, leading to high latency (10 minutes in Bitcoin).
• PBFT or PoS-based systems achieve faster confirmation, often within seconds.
3. Scalability
• Consensus limits how well the blockchain can scale as users grow.
• PoW struggles to scale due to high resource requirements.
• Sharded PoS and BFT-based models enable better horizontal scalability.
4. Energy Efficiency
Summary Table:
Security Trade-off PoW = high security, lower speed; BFT = fast, needs trust
• Nodes may receive messages at different times due to varying network speeds.
• Network partitioning can split nodes into isolated groups, causing temporary
disagreement on the ledger state.
2. Byzantine Faults
• Nodes can behave maliciously or unpredictably, e.g., lying, sending conflicting data.
• Systems must be Byzantine Fault Tolerant (BFT) to handle such behavior, which
adds complexity.
3. Scalability
• As the number of nodes increases, reaching consensus becomes slower and more
resource-intensive.
• Communication overhead grows exponentially in some consensus algorithms (like
PBFT).
4. Resource Consumption
• Mechanisms like Proof of Work (PoW) require massive computational power and
energy.
• This makes the network costly and environmentally inefficient.
• In some systems (e.g., Bitcoin), blocks may be added temporarily and then orphaned
(forks), leading to a lack of immediate finality.
• It creates confusion and potential inconsistencies for users and applications.
6. Sybil Attacks
• A malicious actor can create multiple fake identities (nodes) to gain control of the
network.
• Defending against Sybil attacks requires identity verification or economic deterrents
like staking or mining.
7. Trustless Environment
• Nodes do not trust each other, which means protocols must assume worst-case
behavior and design accordingly.
• This increases design complexity and overhead.
8. Incentive Alignment
Byzantine Agreement Protocols are better for permissioned environments where nodes are
known and trusted, offering faster and greener consensus.
Features:
1. Permissioned Network
2. Modular Architecture
• Supports private channels, where only selected members can view and participate in
specific transactions.
• Helps enterprises manage confidentiality among competing stakeholders.
• Hyperledger Fabric includes tools for policy enforcement, role-based access, and
auditability.
• Enterprises can define complex governance models for transaction approval and
membership.
7. Data Confidentiality
• With private data collections, specific data can be shared only among authorized
peers, even within a channel.
• Ensures data minimization and compliance with data protection regulations.
In permissioned blockchains, participants are known and vetted entities, unlike public
blockchains where anyone can join. This trusted environment allows for more efficient and
customized consensus mechanisms compared to public blockchains.
2. Raft
4. Proof-of-Authority (PoA)
• Used in permissioned Ethereum networks.
• A small group of trusted validators approve transactions.
• High throughput and low energy consumption.
1. Transaction Proposal
o A client submits a transaction to the network.
2. Endorsement
o Nodes designated as endorsers simulate the transaction and sign the result.
3. Ordering
o An ordering service arranges the endorsed transactions into a block.
4. Validation and Commitment
o Peers validate endorsement signatures and policy compliance.
o Valid blocks are added to the ledger.
Feature Benefit
Efficiency Faster consensus due to trusted nodes
Scalability Handles more transactions than PoW systems
Security Defends against internal misbehavior via BFT
Low Energy Use No mining or expensive computations