Basic of Blockchain Architecture
Basic of Blockchain Architecture
✓ Example: Bitcoin can handle about 7 ✓ Example: Bitcoin mining consumes energy
transactions per second, compared to Visa’s
equivalent to small countries.
24,000 transactions per second.
✓ Example: If a single entity controls 51% of ✓ Example: Financial transactions on Bitcoin are
computational power, they can manipulate
pseudonymous, not anonymous.
transactions.
✓ Example: Ethereum and Bitcoin cannot ✓ Example: GDPR compliance for data privacy in
directly share data. the EU.
✓ Solution: Cross-chain protocols like Polkadot ✓ Solution: Building compliance tools and
and Cosmos. frameworks.
Challenges in Blockchain Architecture
✓ Example: Bitcoin takes 10 minutes for a block ✓ Example: Ethereum’s growing ledger size
confirmation. requires expensive hardware.
• Financial Services
• Supply Chain Management
✓ Cryptocurrencies: Bitcoin, Ethereum, and
others operate on blockchain networks. ✓ Traceability: Tracking products from origin to
✓ Payments and Transfers: Instant and low-cost consumer.
cross-border payments (e.g., Ripple). ✓ Counterfeit Prevention: Authenticating goods
✓ Smart Contracts: Automating agreements (e.g., luxury items, pharmaceuticals).
(e.g., Ethereum's smart contracts). ✓ Transparency: Improving trust between
✓ Trade Finance: Streamlining and securing parties in the supply chain.
trade processes (e.g., We.trade).
Applications of Blockchain Architecture
✓ Voting Systems: Secure and transparent e- ✓ Peer-to-Peer Energy Trading: Direct energy
trading between users (e.g., Power Ledger).
voting platforms.
✓ Land Registration: Immutable property ✓ Grid Management: Decentralized systems for
efficient grid operations.
records (e.g., Sweden's Lantmäteriet).
✓ Public Records: Tamper-proof birth, marriage, ✓ Renewable Energy Certificates: Ensuring
authenticity and transparency in energy
and death records.
credits.
Applications of Blockchain Architecture
✓Benefits:
o Increases fault tolerance (no single point of failure).
o Enhances transparency and trust.
o Mitigates risks of censorship or data tampering.
✓Benefits:
o Builds trust among participants.
o Ensures a tamper-proof history of records.
✓Key Aspects:
o Hashing: Ensures data is stored securely with unique identifiers.
o Encryption: Protects sensitive information from unauthorized access.
o Consensus Protocols: Prevents malicious activities (e.g., 51% attacks).
✓Benefits:
o Ensures consistency across the network.
o Prevents double-spending and fraud.
✓Benefits:
o Enhances reliability and availability.
o Reduces the risk of data loss or corruption.
✓Challenges:
o Network latency and bandwidth limitations.
o Trade-offs between scalability, security, and decentralization (Blockchain Trilemma).
✓Solutions:
o Layer-2 scaling (e.g., Lightning Network).
o Sharding and sidechains.
✓Key Methods:
o Public-key cryptography.
o Zero-knowledge proofs (e.g., zk-SNARKs).
✓Benefits:
o Protects user identity and transaction details.
✓Benefits:
o Removes intermediaries.
o Executes predefined actions based on conditions.
• Fault Tolerance
✓Description: Blockchain systems are designed to operate effectively even
if some nodes fail or act maliciously.
✓Benefits:
o Ensures continuity and robustness.
o Achieves consensus despite faults (Byzantine Fault Tolerance).
✓Solutions:
o Cross-chain bridges.
o Standards like Polkadot and Cosmos.
✓Benefits:
o Enables collaboration between blockchains.
o Facilitates a unified ecosystem.
✓Example: Polkadot connects multiple blockchains for data and asset transfers.
• Blockchain Design Principles:
• Energy Efficiency
✓Examples:
o Transition from Proof of Work to Proof of Stake.
o Energy-efficient protocols like Algorand and Cardano.
• Blockchain Design Principles:
• Governance
✓Types of Governance:
o On-chain (e.g., voting mechanisms).
o Off-chain (e.g., discussions and community proposals).
✓Benefits:
o Enables adaptability and innovation.
o Prevents centralization of power.
• Blockchain Design Principles:
• Modularity
2. Fault Tolerance: Some nodes may fail or act maliciously (e.g., Byzantine faults). The
system must function correctly despite these issues.
• Properties of Consensus:
• Termination: The process eventually reaches a decision.
• Validity: The agreed-upon value is a valid input from one of the nodes.
• Challenges:
✓Achieving consensus often involves trade-offs between
factors like fault tolerance, latency, and scalability.
• BFT algorithms are designed to tolerate Byzantine failures by ensuring that the
system can reach consensus even if some nodes are providing incorrect
information.
• BFT algorithms work by dividing nodes in the network into groups
and requiring them to exchange messages with each other.
Disadvantages
• One of the main drawbacks of PBFT is that it requires a high level of
network connectivity between nodes. If nodes are not able to communicate
with each other quickly and reliably, consensus may not be reached, and
the network may become fragmented.
Disadvantages
• One of the main limitations of FBA is that it is more complex than PBFT, as it
requires nodes to manage multiple sub-networks and consensus mechanisms.
This can make it more difficult to implement and maintain, particularly for
smaller networks with limited resources.
• Additionally, FBA is still a relatively new technology, and there is limited real-
world experience with using it in large-scale blockchain networks. As a result, it is
not yet clear how well FBA will perform in practice, particularly in networks with
a large number of nodes or in networks with high levels of network congestion.
• Asynchronous Byzantine Agreement
• The goal of ABA is to ensure that all non-faulty nodes agree on a single
value, even in the presence of Byzantine faults, without relying on timing
assumptions.
• Asynchronous Byzantine Agreement
3. Validity:
✓If all honest nodes propose the same value, that value must be the consensus.
4. Consistency:
✓All honest nodes agree on the same value, even if some nodes are malicious.
• Asynchronous Byzantine Agreement
• Challenges in Asynchronous Byzantine Agreement
1.Timing Uncertainty:
✓ Messages may be delayed indefinitely, making it difficult to distinguish between slow nodes
and malicious nodes.
2.Faulty Nodes:
✓ Malicious nodes can send conflicting information to different parts of the network.
2.Faulty Nodes:
✓ Malicious nodes can send conflicting information to different parts of the network.
2. Threshold Cryptography
• Nodes collectively generate cryptographic signatures that require a threshold number of
honest nodes to function.
• Example: Threshold signatures in protocols like PBFT.
4. Gossip Protocols
• Nodes share information with a subset of peers, ensuring eventual propagation of
messages.
• Useful in asynchronous environments to mitigate message delays.
5. Reliable Broadcast
• Ensures that all honest nodes receive the same set of messages, even if some nodes are
Byzantine.
• AAP (Asynchronous Authentication Protocol) Protocol
✓Key Features:
• Non-repudiation: Ensures the authenticity of the sender.
• Confidentiality: Data is encrypted and unreadable to unauthorized parties.
• Integrity: Data cannot be altered without detection.
• Scalability: Suitable for large systems due to the use of public-key
cryptography.
• AAP (Asynchronous Authentication Protocol) Protocol
1. Security Analysis
✓Strengths:
• Resistance to replay attacks due to unique challenges (nonces).
• Strong authentication due to asymmetric encryption.
• The private key never leaves the user's device, ensuring safety.
• Weaknesses:
• Performance may degrade on resource-constrained devices.
• Vulnerable to man-in-the-middle attacks if the public key is not properly
validated.
• Analysis of the AAP Protocol
1. Performance Analysis
✓Efficiency:
• Asynchronous operations can be computationally intensive but are highly
secure.
• Modern algorithms like ECC reduce the computational overhead compared to
RSA.
• Scalability:
• Can handle large-scale systems, such as blockchain networks or IoT
ecosystems.
• Key management and revocation processes must be optimized for scalability.
• GARAY Model
4. Communication Model:
• Assumes a synchronous or partially synchronous network, meaning there
may be some delays in message delivery, but messages eventually reach their
destinations.
• Honest nodes reliably propagate blocks and transactions, though adversaries
may delay or selectively broadcast information.
• GARAY Model
5. Security Goals:
• Persistence: Once a transaction is added to the blockchain and confirmed by a sufficient
number of blocks, it becomes immutable (prevents double-spending).
• Liveness: Valid transactions submitted by honest nodes are eventually included in the
blockchain.
• GARAY Model
2. Actors
• The adversary controls 30% of the network's mining power (a computational
limitation as assumed in the model).
• They try to broadcast a fake chain to overwrite Bob's transaction after it’s
added to the blockchain.
• GARAY Model
How the Model Properties Work
a) Chain Growth
• Definition: Honest miners ensure the blockchain continues to grow over time
by solving PoW puzzles and adding valid blocks.
• Real Example: Suppose the average block time for Bitcoin is 10 minutes. Even
if an adversary delays some messages, honest miners will consistently add
blocks to the chain. For instance:
• At time T0, a miner adds Block 100 containing Bob's transaction to the chain.
• At time T1 (10 minutes later), Block 101 is added, extending the chain.
• Over time, the chain grows steadily, making it harder for the adversary to catch up with a
fake chain.
• GARAY Model
b) Chain Quality
• Definition: A significant portion of blocks in the chain are created by honest
nodes, ensuring the adversary cannot dominate the blockchain.
• Real Example:
• Out of 10 blocks added in the last hour, 70% (7 blocks) are mined by honest miners, while
only 30% (3 blocks) might be adversarial.
• As long as honest miners control the majority of mining power, the adversary’s chain will
fall behind the honest chain.
• GARAY Model
How the Model Properties Work
c) Common Prefix
• Definition: Honest nodes will agree on the same chain up to a certain point,
ensuring no forks or inconsistencies in older parts of the chain.
• Real Example:
• At time T0, Block 100 is mined by an honest node and added to the chain.
• Even if an adversary tries to create a competing chain starting from Block 99, the honest
chain (Blocks 100, 101, 102, etc.) will grow faster.
• This ensures that all honest nodes agree on Block 100 as part of the "common prefix" of
the blockchain.
• GARAY Model
Ensuring Security for Bob’s Transaction
2. Transaction Liveness:
• If Bob’s transaction is valid, honest miners will include it in a block within a few
minutes.
• The Bitcoin network ensures that valid transactions are not ignored, even if the
adversary attempts to censor them.
• RLA Model
Ensuring Security for Bob’s Transaction
• Stake Proportionality
• The probability of being chosen as a leader may depend on the node’s stake in
the network. For example:
• If Node A holds 30% of the total stake, it has a 30% chance of being selected as a leader.
• Nodes with little or no stake have very low or zero chances of being selected.
• RLA Model
Key Components of the RLA Model
• Leader's Role
Once chosen, the leader is responsible for:
✓Proposing a new block: This includes validating transactions and appending them to the
blockchain.
✓Broadcasting the block: The leader broadcasts the new block to the network for
validation by other nodes.
• Adversary Model
✓The RLA model assumes an adversarial environment where malicious actors may try to:
✓Predict the leader in advance and target them.
✓Manipulate the randomness to increase their chances of being chosen.
✓Control a significant portion of the stake to bias the leader selection.
• RLA Model
Key Components of the RLA Model
• Security Guarantees
1.Stake Centralization:
Large stakeholders might dominate leader selection over time, potentially leading to
centralization.
2.Randomness Vulnerabilities:
If the randomness source is compromised, adversaries could manipulate leader selection.
3.Offline Leaders:
If a selected leader is offline or unavailable, block production for that slot may be delayed.