Module 5 - Private Blockchain
Module 5 - Private Blockchain
Module 5 - Private Blockchain
Advantages:
Disadvantages:
● Lack of Trust: External players have to trust a private blockchain network without
having control over the verification. These trusted parties would be responsible for
communicating newly verified transactions to the rest of the network.
● Centralization: With the presence of a few nodes it is possible that untrustworthy
individuals gain control over the network. These blockchains are generally
centralized as it is mostly used by business and enterprises. Although, blockchain is
made to avoid centralization private blockchain inherently becomes centralized.
● Integrity: Integrity depends on the standing authorized user/participants. It is
necessary to trust in order to validate the transaction. Confidentiality alone is not
sufficient to ensure the participant trusts the private blockchain. It also requires
integrity to get confidence in private blockchain
● Control: With fewer participants, it is easier for the hacker to take control of the
network and manipulate the data on it. It can happen when two minors are calculating
the hash of the block at the same time and get the same result. As a result, the
blockchain will split and users have two different blockchains.
● Limited network effects: Private blockchains are limited in terms of network effects.
Since they are only accessible to a limited number of participants, they may not have
the same level of network effects as public blockchains. This can limit their
usefulness and potential for growth.
● Interoperability issues: Private blockchains may have interoperability issues with
other blockchains, including public blockchains. This can limit the ability of
businesses to interact with other networks and may result in the need for costly and
complex integrations.
● Cost: While private blockchains can be cost-effective in some cases, they can also be
expensive to operate and maintain. Businesses may need to invest in hardware,
software, and personnel to manage and operate the network.
● Limited transparency: Private blockchains may lack transparency, as they are only
accessible to a limited number of participants. This can make it difficult for
businesses to demonstrate transparency and accountability to stakeholders.
● Governance issues: Private blockchains may face governance issues, particularly if
there are disagreements among participants over how the network should be operated.
This can lead to delays and other issues that can impact the effectiveness and
usefulness of the network.
Private blockchains restrict access to only authorized participants. This ensures that sensitive
business data remains private and is only shared with trusted entities within the network. This
feature is particularly valuable for industries like finance, healthcare, and supply chain
management, where privacy is paramount.
Private blockchains allow organizations to control who can join the network and what actions
they can perform. This is critical for business applications where only verified parties (e.g.,
partners, suppliers, customers) should be allowed to access or interact with the system.
Since private blockchains operate within a controlled environment with fewer participants, they
can achieve higher transaction throughput and faster confirmation times compared to public
blockchains. This improved performance is crucial for businesses that need to handle large
volumes of transactions in real-time.
4. Regulatory Compliance
Many industries have strict regulatory requirements regarding data sharing and privacy. Private
blockchains offer a controlled environment where companies can ensure compliance with
regulations like GDPR or financial reporting standards, allowing them to store and share data in
line with the law.
Unlike public blockchains, where consensus mechanisms (like Proof of Work) are
predetermined, private blockchains allow organizations to customize their consensus algorithm
to meet their specific needs. This can lead to more efficient and faster consensus in business
environments where trust between participants is already established.
6. Energy Efficiency
Private blockchains provide an immutable and tamper-proof record of transactions that can be
easily audited. This is crucial for organizations that need to maintain transparent and accountable
records of their operations while limiting data access to authorized parties.
In scenarios where multiple entities (e.g., companies in a supply chain) need to work together but
don't want to share sensitive data with the public, a private blockchain offers a way for these
entities to collaborate in a secure and trusted manner, while maintaining a common, immutable
record of their interactions.
Since private blockchains typically operate within a smaller network and use consensus
mechanisms tailored to their needs, transaction costs are lower compared to public blockchains.
This makes private blockchains more cost-effective for enterprise use.
10. Use in Consortiums
Private blockchains are commonly used by industry consortia, where several organizations
jointly operate the network. For example, a consortium of banks might use a private blockchain
to settle transactions or share customer data securely and efficiently.
1. Basic Concept
In a distributed system, the goal of State Machine Replication is to make multiple nodes behave
as a single coherent system by replicating the same state across all nodes. This means that each
node processes the same set of operations in the same order, ensuring that they maintain an
identical state at all times.
To achieve this:
● The system treats each node as a state machine—a model of computation where the
machine changes its state based on incoming inputs (operations).
● Every node starts with the same initial state.
● Nodes process the same sequence of inputs (or commands) in the same order.
● By applying the same sequence of operations, all nodes transition through the same
sequence of states, maintaining consistency across the system.
● Deterministic State Machine: The state machine must be deterministic, meaning that
given the same initial state and the same inputs, it will always produce the same final
state. This ensures that all replicas end up in the same state after processing the same
sequence of operations.
● Agreement on Order of Operations: All nodes (or replicas) must agree on the exact
order in which they process the operations. This is typically achieved through consensus
algorithms (like Paxos or Raft), which ensure that all replicas process operations in the
same order, even in the presence of node failures.
● Fault Tolerance: The system should be able to continue functioning even if some of the
nodes fail. SMR achieves fault tolerance by replicating the state across multiple nodes. If
one or more nodes fail, the remaining nodes can continue processing requests.
3. Consensus Algorithms
Consensus algorithms are at the heart of State Machine Replication, as they are responsible for
ensuring that all nodes agree on the same sequence of inputs. Popular consensus algorithms
include:
● Paxos: A widely used consensus algorithm that provides fault tolerance by allowing a
majority of nodes to reach consensus on the order of operations. Paxos is designed to
handle node failures and network partitions.
● Raft: A simpler alternative to Paxos, Raft is designed to be more understandable and
easier to implement. Like Paxos, it ensures that a majority of nodes agree on the order of
operations and can continue processing even if some nodes fail.
● Byzantine Fault Tolerant (BFT) Algorithms: These algorithms are designed to handle
not only node failures but also malicious or faulty nodes that may try to disrupt the
system. BFT algorithms (e.g., PBFT – Practical Byzantine Fault Tolerance) are used in
systems where stronger guarantees are needed, such as in blockchain networks.
1. Client Request: A client sends a request (input) to the system to perform a certain
operation.
2. Agreement: The system uses a consensus algorithm to ensure that all nodes agree on the
order of the operation relative to other pending operations.
3. Execution: Once the order is agreed upon, each node applies the operation to its state
machine, transitioning to a new state.
4. Response: Once the operation is executed, the nodes send the result of the operation back
to the client.
State Machine Replication is designed to tolerate failures in the system. Depending on the
consensus algorithm used, SMR can handle different types of failures:
● Crash Failures: SMR systems can tolerate nodes that crash or become unavailable. As
long as a majority (or some predefined quorum) of nodes are operational, the system can
continue functioning.
● Byzantine Failures: In more advanced systems, SMR can tolerate nodes that behave
maliciously or arbitrarily. This is achieved using Byzantine Fault Tolerant algorithms,
which ensure that even if some nodes act maliciously, the system can still maintain
consistency and availability.
State Machine Replication is used in a variety of distributed systems where fault tolerance and
consistency are critical:
● Distributed Databases: In distributed databases, SMR ensures that all replicas of the
database maintain the same state, even in the presence of failures. This allows the system
to continue serving requests even if some database nodes go down.
● Blockchain Systems: In blockchain networks, SMR ensures that all nodes in the network
agree on the same ledger of transactions. Each block of transactions is treated as an input
to the state machine, and consensus algorithms like PoW (Proof of Work) or PoS (Proof
of Stake) ensure agreement on the order of transactions.
● Distributed Storage Systems: Systems like Google Spanner or Amazon DynamoDB use
SMR to replicate state across geographically distributed nodes, ensuring that the system
remains available and consistent even in the event of network partitions or node failures.
PAXOS ALGORITHM
The Paxos algorithm is a consensus algorithm designed to achieve agreement among a group of
distributed or decentralized processes in a network, even if some of those processes are
unreliable. The Paxos algorithm, devised by Leslie Lamport, is a protocol for achieving
consensus in a network of unreliable processors (distributed systems). Below are the
fundamentals of Paxos:
● Roles:
○ Proposers: Suggest values to be agreed upon.
○ Acceptors: Vote on proposed values and ensure a majority
consensus.
○ Learners: Learn the chosen value after consensus is reached.
● Phases:
○ Prepare Phase: A proposer sends a prepared request with a
unique proposal number to a majority of acceptors. Acceptors
respond with a promise not to accept proposals with lower
numbers and may include the last accepted proposal.
○ Promise Phase: If an acceptor receives a prepared request with a
higher number than any previously seen, it promises not to accept
any lower-numbered proposals.
○ Accept Phase: Upon receiving promises, the proposer sends an
accept request with the proposal number and value to the
acceptors. Acceptors accept the proposal if it matches their
promise.
○ Learn Phase: Once a value is accepted by a majority, it is
communicated to the learners as the chosen value.
● Quorum: A majority of acceptors must agree on a proposal for it to be chosen,
ensuring consistency.
● Fault Tolerance: Paxos tolerates failures of some nodes, as long as a majority of
acceptors remain operational, maintaining system reliability.
Difference between
Proposers, Acceptors,
Roles Leader, Followers, Candidates
Learners