Unit-2 BCT
Unit-2 BCT
3. Consortium Blockchain
A consortium blockchain is a concept where it is permissioned by the
government and a group of organizations, not by one person like a private
blockchain.
Consortium blockchains are more decentralized than private blockchains,
due to being more decentralized it increases the privacy and security of the
blocks. Consortium blockchains is lies between public and private
blockchains.
They are designed by organizations and no one person outside of the
organizations can gain access.
In Consortium blockchains all companies in between organizations
collaborate equally. They do not give access from outside of the
organizations/ consortium network.
Advantages:
1. Consortium blockchain providers will always try to give the fastest output as
compared to public blockchains.
2. It is scalable.
3. A consortium blockchain is low transaction costs.
Disadvantages:
1. A consortium blockchain is unstable in relationships.
2. Consortium blockchain lacks an economic model.
3. It has flexibility issues.
4.
Core Components of Blockchain Architecture
Node: Nodes are network participants and their devices permit them to keep track
of the distributed ledger and serve as communication hubs in various network
tasks. A block broadcasts all the network nodes when a miner looks to add a new
block in transactions to the blockchain.
Transactions: A transaction refers to a contract or agreement and transfers of
assets between parties. The asset is typically cash or property. The network of
computers in blockchain stores the transactional data as copy with the storage
typically referred to as a digital ledger.
Block: A block in a blockchain network is similar to a link in a chain. In the field
of cryptocurrency, blocks are like records that store transactions like a record book,
and those are encrypted into a hash tree. There are a huge number of transactions
occurring every day in the world. It is important for the users to keep track of those
transactions, and they do it with the help of a block structure. The block structure
of the blockchain is mentioned in the very first diagram in this article.
Chain: Chain is the concept where all the blocks are connected with the help of a
chain in the whole blockchain structure in the world. And those blocks are
connected with the help of the previous block hash and it indicates a chaining
structure.
Miners: Blockchain mining is a process that validates every step in the
transactions while operating all cryptocurrencies. People involved in this mining
they called miners. Blockchain mining is a process to validate each step in the
transactions while operating cryptocurrencies.
Consensus: A consensus is a fault-tolerant mechanism that is used in computer
and blockchain systems to achieve the necessary agreement on a single state of the
network among distributed processes or multi-agent systems, such as with
cryptocurrencies. It is useful in record keeping and other things.
There are different kinds of consensus mechanism algorithms, each of which
works on different principles:
Proof of Work (PoW): Proof of Work required a stakeholder node to prove that
the work is done and submitted by them certifying them to receive the right to add
new transactions in the blockchain.
Proof of Stake (PoS): The proof of Stake is also a common consensus algorithm
that evolved as a low-cost low-energy-consuming, low-energy-consuming
alternative for the PoW algorithm. For providing the responsibilities the public
ledger provides by the virtual currency token like Bitcoin and Ethereum.
Proof of Capacity (PoC): Proof of Capacity (PoC) allow sharing of memory
space of the nodes in the blockchain network.
Proof of Elapsed Time (PoET): It encrypts the passage of time cryptographically
to reach an agreement without expending many resources.
Blockchain Architecture Vs Database
Below are some of the differences between blockchain architecture and database:
Database
Parameters Blockchain Architecture
It is faster as compared to
It is slow in speed.
Speed blockchain.
Merkle tree also known as hash tree is a data structure used for data verification
and synchronization.
It is a tree data structure where each non-leaf node is a hash of it’s child nodes. All
the leaf nodes are at the same depth and are as far left as possible.
It maintains data integrity and uses hash functions for this purpose.
Hash Functions:
So before understanding how Merkle trees work, we need to understand how hash
functions work.
A hash function maps an input to a fixed output and this output is called hash. The
output is unique for every input and this enables fingerprinting of data. So, huge
amounts of data can be easily identified through their hash.
This is a binary merkel tree, the top hash is a hash of the entire tree.
This structure of the tree allows efficient mapping of huge data and small
changes made to the data can be easily identified.
If we want to know where data change has occurred, then we can check if
data is consistent with root hash and we will not have to traverse the whole
structure but only a small part of the structure.
The root hash is used as the fingerprint for the entire data.
For a Binary Merkel tree
Operation Complexity
Space O(n)
Searching O(logn)
Traversal O(n)
Insertion O(logn)
Deletion O(logn)
Synchronization O(logn)
Applications:
1. Merkle trees are useful in distributed systems where same data should exist
in multiple places.
2. Merkle trees can be used to check inconsistencies.
3. Apache Cassandra uses Merkle trees to detect inconsistencies between
replicas of entire databases.
4. It is used in bitcoin and blockchain.
Distributer P2P
Blockchain is a P2P network that acts as a decentralized ledger for one or more
digital assets, which refers to a decentralized peer-to-peer system where each
computer keeps a complete copy of the ledger and verifies its authenticity with
other nodes to guarantee the data is accurate.
Peer-to-peer network architecture
Peer-to-peer network architecture is a type of network in which there is no
segregation of operations among various sections. Every node performs the same
task and set of operations where each device serves the purpose of both the server
and the client.
Peer-to-Peer networks can be classified into two major categories:
Unstructured networks - an unstructured peer-to-peer network is in which the
network's links are established at random. Such networks are simple to construct
since any new peer can join and contribute to the network by duplicating the
existing links of another section and then forming and distributing its own links.
Structured networks - each peer is allowed to manage a specified section of the
network's content. These networks assign a certain value to each content and peer
in the network, which is then followed by a common protocol that determines
which section is responsible for which part of the content. As a result, whenever
someone contacts a peer to search for content, the network uses the common
protocol to identify the section responsible for data transfer and direct the search
query to the responsible peer.
Peer-to-peer technology is how Bitcoin operates: no administrator is required to
maintain track of user transactions on the network. Instead, the peers in the
network cooperate to handle deals and manage the currency.
Structure of Blockchain
All blockchains consist of linking blocks together to form an immutable ledger,
different block structures can be adopted depending on the application.
Permissioned and permissionless blockchains.
The Block Size is the size of the entire block.
The Block Header contains all the metadata of the block.
The Transaction Counter has the count of transactions.
The Transactions are stored in the block.
In a nutshell, the mathematical puzzle acts as the consensus metric in ensuring the
network is secure, reliable, and trusted.
This is done by taking data from a block header as an input, and continuously
running this data through a cryptographic hash function. Every time this is done,
small changes are made to the input data by including an arbitrary number called
a nonce. This is the blockchain version of guesswork to find a solution.
Examples of blockchain networks: that use this consensus algorithm include
Bitcoin, Ethereum, and more.
Drawback of PoW : The large computational power and hardware requirements.
Fig. Proof-of-stake
Here, the validators participate in the validation and verification of transactions by
locking up some of their coins in a wallet as their stake. The validator with the
highest stake is selected to create a new block and add it to the blockchain. This
validator receives transaction fees as a reward.
Examples of blockchain networks: that use Proof of Stake include Ethereum 2.0,
Cardano, Polygon, and others.
Drawback of PoS: The mining capacity of a validator depends on the number of
tokens they have, so a miner who starts with more coins gets more control over the
consensus mechanism. Additionally, a few miners can purchase many coins,
further diluting the mechanism and reducing the system's decentralization property.
Delegated Proof of Stake
Delegated Proof of Stake (DPoS) is considered a more efficient and democratic
version of PoS. This algorithm is based on a voting system in which delegates or
witnesses vote for their favorite validators to achieve consensus during the
generation and validation of blocks.
Besides validating transactions, delegates also help maintain
the integrity, reliability and transparency of the blockchain network.
The voting power of each delegate is proportional to the number of coins held.
They receive rewards for their work with transaction fees, which are shared with
their respective electors.
The DPoS algorithm's voting system, and therefore the consensus mechanism,
depends on the reputation of the delegates. It's a more scalable mechanism than
PoW or PoS since it can process more transactions per second and provide faster
confirmation times.
Proof of Authority
In Proof of Authority, the rights to create new blocks are given to participant nodes
who have proven their authority. In simple terms, Proof of Authority-based
blockchain networks is validated by approved validators who run software that
allows them to put transactions in the blockchain system.
The Proof of Authority consensus algorithm uses the value of identities, so the
block validators don’t stake coins but their reputations. As this consensus
algorithm depends on the limited number of validators, it makes the system highly
scalable. It is an effective solution for supply chains because it allows companies
to maintain their privacy and attain blockchain benefits simultaneously.
Practical Byzantine Fault Tolerance (PBFT)
PBFT is a consensus algorithm that is commonly used in permissioned blockchain
networks. It requires a set of validators to agree on the state of the blockchain, and
it uses a complex voting process to reach consensus. PBFT is known for its speed
and efficiency, but it requires a trusted set of validators and is less secure in open
networks.
Proof-of-Activity (PoA)
Proof-of-Activity is a hybrid consensus algorithm that combines the security of
Proof-of-Work with the energy efficiency of Proof-of-Stake. In a PoA system,
nodes are required to perform a certain amount of work to create a new block,
similar to PoW. However, once the block is created, the validation process is
performed by a group of randomly selected validators who have a stake in the
network. This reduces the amount of energy required to validate blocks and also
makes the network less vulnerable to 51% attacks.
Proof-of-Importance (PoI)
Proof-of-Importance is a consensus algorithm that uses a node’s importance score
to determine its chances of being selected to create a new block. The importance
score is calculated based on a node’s overall activity on the network, including the
number of transactions it has processed and the number of nodes it has referred to
the network. PoI is used in the NEM blockchain, which uses a unique harvesting
system where nodes earn transaction fees by processing transactions and validating
blocks.
Proof-of-Capacity (PoC)
Proof-of-Capacity is a consensus algorithm that requires nodes to prove that they
have allocated a certain amount of disk space to the network. In a PoC system,
nodes pre-calculate a set of solutions to a complex mathematical problem and store
them on their hard drives. When it is time to create a new block, nodes can quickly
verify their solutions and compete to create the new block. PoC is used in the Burst
coin blockchain, which allows nodes to use their unused hard drive space to mine
new coins.
Proof-of-Burn (PoB)
Proof-of-Burn is a consensus algorithm that requires nodes to burn (i.e., destroy) a
certain amount of coins to create a new block. This mechanism ensures that nodes
have a vested interest in the network and are incentivized to act in its best interest.
PoB is used in the Slimcoin blockchain, where nodes can burn coins to generate a
special transaction that allows them to mine new blocks.