Module 5 - Private Blockchain

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Module 5:- Private Blockchain

Private blockchain is like a private asset of the individual or an organization. Unlike a


public blockchain, a private blockchain has an in-charge who monitors important
tasks and gives access to read or block access. It is also known as permissioned
blockchain as it has restrictions on who can participate in transactions and validations.
The entities have been chosen in this network by the respective authority and the
chain developers while building the blockchain application.
Characteristics:
● By its nature, it performs better in database management and auditing in other fields.
● Not everyone can run a full node and start mining.
● Everyone cannot make transactions on the chain.
● Not everyone can review the blockchain in the blockchain explorer.
● A user has to be permitted by blockchain authority before he could access the
network thus making it a Permissioned Network.
● Performance becomes faster as fewer nodes participate.
● It is being able to give service on demand making it more attractive to the user.

Advantages:

● Security: Due to its immutable nature information cannot be altered. Private


blockchain helps in preventing fraud. This blockchain uses identity to confirm
membership and access privileges and typically only permit known organization to
join.
● Performance: Since the lesser number of nodes are there performance is increased as
it takes less time to validate the block. This type of blockchain has higher throughput
and lower latency become more significant as the number of transaction grow.
Network and distributed system simulators are important tools on which the
performance depends.
● Scalability: A network that doesn’t host millions of users can easily implement the
changes and features and hence can increase scalability. It is found to date by some
research that at present this type of blockchain is scalable to a further extent. Several
parameters are involved in the scalability process and are dependent on each other
● Throughput: Since the number of users is limited this type of blockchain has higher
throughput. This throughput gives a more advantage as the business needs faster
transactions which are easily provided by the private blockchain.
● Trust: Users on the private network are not anonymous this increases the level of
trust in the private blockchain. Private Blockchain is best suited for applications
where it required the truth that a company can achieve data privacy and control over
data sharing.
● Energy: Since the number of users in a blockchain is less there is less amount of
energy and material used. A private blockchain is the most energy-efficient choice
that can be made by businesses as the network are not as much bigger as the public
blockchain.
● Cost-effective: Private blockchains can be cost-effective for businesses because they
don’t require the same level of resources as public blockchains. Private blockchains
can be operated on existing infrastructure, which reduces the costs associated with
setting up a new network.
● Flexibility: Private blockchains are highly flexible and can be customized to meet the
specific needs of a business. They can be designed to include only the necessary
features and components, which makes them more efficient.
● Control: Private blockchains provide businesses with greater control over their data
and the blockchain network. Businesses can control who has access to the blockchain
and can set rules and guidelines for how the network is used.
● Privacy: Private blockchains provide greater privacy for businesses, as they can
control who has access to their data and can ensure that sensitive information is not
shared with unauthorized parties.
● Regulatory compliance: Private blockchains can help businesses comply with
regulatory requirements, as they provide a greater level of control and oversight over
the data and network. This is particularly important for businesses in industries with
strict regulatory requirements, such as finance and healthcare.
● Collaboration: Private blockchains can facilitate collaboration between businesses,
as they can be designed to allow multiple organizations to participate in the same
network. This can lead to greater efficiency and innovation, as businesses can share
information and resources more easily.

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.

Need of Private Blockchain

1. Enhanced Privacy and Confidentiality

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.

2. Control Over Participants

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.

3. Better Performance and Scalability

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.

5. Customizable Consensus Mechanism

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

Public blockchains like Bitcoin or Ethereum rely on energy-intensive Proof of Work


mechanisms, which consume significant amounts of power. In contrast, private blockchains
typically use more energy-efficient consensus methods like Proof of Authority or Proof of Stake,
which makes them more sustainable for enterprise use.

7. Data Integrity and Auditability

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.

8. Collaboration Among Trusted 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.

9. Reduced Transaction Costs

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.

State machine Replication

State Machine Replication (SMR) is a fundamental technique used in distributed systems to


ensure that multiple computers (or nodes) agree on the same sequence of operations, ensuring
consistency across the system. It is particularly important in environments where fault tolerance
and high availability are required, such as in distributed databases, blockchain systems, and other
mission-critical applications.

Here’s a detailed overview of State Machine Replication:

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.

2. Requirements for SMR

For SMR to work effectively, a few key conditions must be met:

● 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.

4. Phases of State Machine Replication

SMR typically involves the following phases:

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.

5. Fault Tolerance in SMR

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.

6. Applications of State Machine Replication

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.

7. Challenges and Considerations

● Latency: Achieving consensus across distributed nodes can introduce latency,


particularly in geographically distributed systems. The consensus process (especially in
Byzantine Fault Tolerant systems) may require multiple rounds of communication,
slowing down the system.
● Scalability: As the number of nodes increases, the complexity of reaching consensus also
increases. Efficient consensus algorithms and optimization techniques are required to
maintain scalability.
● Network Partitions: Network partitions can cause temporary inconsistencies in SMR
systems. Consensus algorithms need to handle such partitions gracefully and ensure that
nodes eventually converge to the same state once connectivity is restored.

8. Comparison with Other Replication Techniques

SMR differs from other replication techniques such as primary-backup replication or


quorum-based replication in the sense that it ensures all nodes go through the same sequence
of operations, rather than merely copying or synchronizing state between a primary node and
backups. SMR guarantees stronger consistency but may have more overhead due to the need for
consensus.

Consensus Algorithms for Private Blockchain

A consensus algorithm is a process in computer science used to achieve agreement on a single


data value among distributed processes or systems. These algorithms are designed to achieve
reliability in a network involving multiple users or nodes. Solving this issue -- known as the
consensus problem -- is important in distributed computing and multi-agent systems such as
those seen in cryptocurrency blockchain networks.

Importance of Consensus Algorithms in Distributed Systems


Consensus algorithms are fundamental in distributed systems, ensuring that multiple
interconnected nodes agree on a single data value or course of action. This agreement is crucial
for maintaining data consistency, system reliability, and fault tolerance.
● Without consensus algorithms, distributed systems would struggle to coordinate
actions, leading to potential data corruption, service interruptions, and vulnerability to
network partitions or component failures.
● These algorithms, such as Paxos and Raft, enable systems to function seamlessly
despite the inherent challenges of distributed environments, supporting critical
applications in cloud computing, financial services, and global data centers.

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.

Steps for Paxos Algorithm


Below are the steps to understand Paxos:
● Step 1: Prepare Phase:
○ Proposer: Sends prepare(n) to a majority of acceptors.
○ Acceptors: Upon receiving prepare(n), if n is greater than any
previously seen, respond with a promise and include the
highest-numbered proposal accepted.
● Step 2: Promise Phase:
○ Proposer: Upon receiving responses from a majority, checks for
the highest-numbered accepted proposal among them.
○ Proposer: Sends accept(n, value) with the highest-numbered
proposal’s value (if any) or its own value.
● Step 3: Accept Phase:
○ Acceptors: Upon receiving accept(n, value), if n matches their
promised n, they accept the proposal and record it.
● Step 4: Learn Phase:
○ Acceptors: Once a proposal is accepted by a majority, inform the
learners about the chosen value.

Difference between

Aspect Paxos Raft

Theoretical robustness, Understandability, ease of


Design Philosophy
minimalistic design implementation

Proposers, Acceptors,
Roles Leader, Followers, Candidates
Learners

Not a primary focus, can


Well-defined leader election
Leader Election have multiple concurrent
process, ensures a single leader
proposers

Prepare, Promise, Accept, Leader Election, Log Replication,


Phases
Learn Commitment
Multiple rounds, higher Streamlined, fewer rounds, simpler
Communication Rounds
complexity process

High, tolerates (N-1)/2


Fault Tolerance Similar fault tolerance as Paxos
failures

Potential overhead from Generally more efficient due to


Performance
multiple rounds and conflicts single leader management

You might also like