CCBT Unit 3
CCBT Unit 3
UNIT – III
BITCOIN CONSENSUS
Bitcoin Consensus, Proof of Work (PoW)- Hashcash PoW , Bitcoin PoW, Attacks on
PoW ,monopoly problem- Proof of Stake- Proof of Burn – Proof of Elapsed Time –
Bitcoin Miner, Mining Difficulty, Mining Pool-Permissioned model and use cases.
Consensus in Blockchain
Consensus plays a key role in building trust among crypto coin traders worldwide.
Due to the decentralized nature of the crypto world, it is essential to have complete
Generally, consensus means that the majority of a group has agreed in favor of a
At least 51% of the traders and miners associated with a particular coin must agree
This mechanism lists all valid transactions of a coin in a blockchain to build trust in
Several currencies, such as Bitcoin, Ethereum etc., use this system for security
purposes.
To build trust for a blockchain, the consensus mechanism ensures that a transaction
There are a variety of methodologies that are essential to ensure security and trust
Consensus mechanisms also ensure that all the transactions for a coin are rightly
Several mechanisms are used as a consensus mechanism during coin trading. These
‘Proof’ refers to the solution of a highly-complex problem, and ‘work’ refers to the
process of solving the same. Crypto coin miners compete to solve the problem and
The fastest solver receives a mining fee from the traders of these coins. This
mechanism tracks and verifies the creation and transactions across blockchain
networks.
secure. However, it has several cons, such as high electricity requirements and
Proof of Stake
This mechanism randomly chooses a maximum coin owner to validate a transaction.
It also allows the owner to create a block for the same coin. This mechanism
Coins like Etherium 2.0, Polkadot, Cosmos, Cardano, ThorChain, Nxt and Algorand
There is a security risk as if an owner owns 51% or more coins of a particular coin,
Proof of Capacity
The PoC mechanism heavily relies on free space available in the hard drive. This is
because there are many solutions to a coin's hash problem that a trader needs to
store.
It is highly efficient as compared to PoW and PoC mechanisms. Coins such as Burst,
In the beginning, the Proof-of-Activity mechanism functions like PoW. Once a new
Proof of Authority
Different organizations and private companies created this unique mechanism.
There are validators with approved accounts which authorize transactions and the
These validators must disclose their true identity to get the right to validate a
transaction.
Proof of Burn
PoB aims to improve the quality of blockchain so that it can be used easily and
After PoW and PoS, PoB is designed to prevent fraud activities on a blockchain
transactions to traders.
Intel Corporation created this mechanism to permit blockchain to decide the person
who will create the next block. It uses a lottery system to decide the next block
creator.
Thus, it gives a fair chance to all traders to create the next block. It is an efficient
● No barriers to participation
Any crypto trader or miner across the globe can participate in a consensus mechanism.
There are few barriers to participation in a consensus for any crypto coin.
Traders and miners of a particular coin across the globe must agree to approve a decision.
● Establishes security
Consensus mechanisms maintain the transparency of trading for all coins. Thus, traders can
There lies a chance of hacking known as 51% hack, which stands out as a potential attack
on a consensus mechanism.
There is a heavy requirement for electricity for the PoW mechanism to function.
With very few associated disadvantages, the consensus mechanism is a great
This allows traders and miners across the globe to establish a connection and trust
The benefits in the case of traders are trade security and faster transactions. On the
other hand, miners get several rewards for solving complex problems faster and
Satoshi Nakamoto applied the bitcoin white paper with the concept of Proof of Work
Cynthia Dwork and Moni Naor in 1993. The most popular consensus mechanism for
In 1999, the term “Proof of Work” was initially used by Markus Jakobsson and Ari
Juels The principle followed here is “Easy to verify but difficult to find”. Principle: A
A. Miners
The process of solving the crypto puzzle is called mining . The mining activity
Then the new block is added to the blockchain problem (crypto puzzle) which is
with the shared processing power equally in the pooling of resources are the mining
pool. The members in the mining pool are awarded with the amount of “Share,” who
The difficulty level for the minors is increased for mining in the pools where it takes
Rather than randomly finding once few years, it is better to get rewards for every
newly generated block. This is the solution for the problem to the miners to pool in
their resources.
The puzzle is solved by guessing at random hash value. Predicting the output is made
For that difficulty, the minors choose the value randomly and apply it to the hash function
The number of zeros that are pre-established will be the starting for the resulting hash.
There may be many results with the combination of two consecutive integers and it
leads to numbers that are impossible to find. Now, what to do if there is more than
one nonce produced? (all minors trying for the same block).
In the peer to peer network solves the crypto puzzle or finds the hash within the time
Then the other miners will stop their work and go for the next nodes to solve the
crypto puzzle. As a result, the miners will be rewarded as they get new bitcoins for
Cryptography SHA-256
Cryptography Major Role in Proof of Work SHA 256 is the most popularly used Proof of
Work consensus and was announced as the portion of the Bitcoin. [1] The others were
With the help of the hash value, the miners try to find the random nonce (random data of
small size) and find the block that holds the hash (of binary values) with number of zeros
that has the rare hashes to find. If it’s a good hash, the data is not found and have to try
many times to find a perfect nonce . The number of zeros were based on the difficulty faced
by the miners to search for a perfect block. For every 10 min, a new block is created by an
average of how many blocks that are previously added to it.
B. Nonce
The cryptocurrencies and the blockchain are working under the mining algorithm
like Proof of Work with the concept of the central part as nonce . A nonce, which
produces the hash which is lower than or equal to the hash value is fixed by the
network as difficult. For finding these values the miners do mining and compete with
each other.
In that network, the miner who finds a nonce is named as the golden nonce. Then the
miner gets the reward and adds that block to the blockchain network. It all happens
during the Proof of Work mining. Now let us see how the process of nonce is
done in mining.
C. Building Blocks with Nonce
Like timestamp and the difficulty target, the block header stays with its key data value. A
key with 32-bit in the block is the nonce .For creating a new block, the miners choose a
random nonce and add it to the block header while building a block. As stated before in
nonce, if the miners are not having the number of zeros, then they avoid the hash and go for
the new nonce. It will be repeated until a nonce is discovered by the miners.
D. Block Reward
Every block that is mined successfully by the miners in the blockchain network are
rewarded with the Bitcoin block.
• The number of bitcoins a miner gets, is the number of rewards that miner mines a block.
• The reward becomes half for every four years or every 210,000 blocks.
• The expected reward that hit be zero to around 2140 E.
Concept of Block Reward
The size of every bitcoin block is 1 MB and holds the data of transaction information.
Illustration, when a transaction occurs between two nodes in the network and information
about transaction are stored in a block .
At the initial stage (in 2009), for each and every bitcoin block was rewarded as a worth of
50 BTC (bitcoin). In February 2019, its reward was 12.5 BTC for one block and bitcoin price
is $3500, which is of 12.5 × 3500 = $42,000.
The block rewards were given to the miners those who do mining by using their
computation powers to find a new block .
Similarly, the other cryptocurrencies in the blockchain have the same mechanism for
rewarding the miners. The miner who wins the block reward adds the first transaction on
the block.
The following are some of the issues for the Proof of Work consensus mechanism.
A. The 51% Attack : In the blockchain network, if any node gains 51% or more than 51%,
[8] the nodes could influence the blockchain by gathering most of the network Time
consuming: for solving the crypto puzzle, the miners have to check for the nonce which
must be solved to mine the block. This helps in time consumption.
• Resource consumption: In order to solve the mathematical crypto puzzle, the miners
consume high computational power. This results in wastage of resources like hardware,
space, money, and energy. It is estimated that the world’s electricity spent for verifying
transactions in 2018 was 0.3%.
It takes a minimum of 10–60 min for the confirmation of
any of the transactions in the blockchain network. This is due to the time taken for mining
the transactions and adding it to the blockchain. B. Computation Power
• Carbon footprint: 34.73 Mt CO2 In comparison with the carbon footprint of Denmark
over 723,140 VISA transactions with 48,872 h of time watching YouTube.
• Electrical Energy: 73.12 TWh In comparison with the power consumption of Austria, the
equivalent power consumption has an average of over 20.61 days in US as shown in Fig. 4.
C. Definition of 51% Attack This attack on blockchain is the 51% attack. [15] Usually the
bitcoins, the attacks which are mainly by a group of miners who control more than 50% of
the mining hash in the network or by the computational power. The ability as shown in
Table 2, of the attackers is to prevent the transactions that gain confirmations and can halt
the payments between the users [19]. They can also reverse the completed transactions of
any user in the network and this leads to Double Spend coins. The attackers could not alter
old blocks or create new coins in the blockchain-based cryptocurrency.
D. Double–Spending The risk at which the spending of digital currency is twice is called
Double spending. The savvy individuals, who understand about the blockchain network
and the computational power needed were reproduced to obtain the digital currencies that
are unique potential problem [15]. This type of issue will not happen during the cash
transactions, the parties involving in transactions can easily verify the authenticity and the
ownership of the physical currency. But in digital currency, the digital token can be copied
by the holder and it might be sent to any of the parties or the merchants with the original
one.
E. Proof of Work System Features
The two features that could contribute to the widespread of the consensus protocol are
• It is difficult to do the mathematical crypto puzzle problem.
• The correctness of the solution could be easily verified.
The complete virtual consensus mechanism was made by the Proof of Stake. The way of
achieving the goal differs and the process remains the same as proof of work. While in PoW,
the miners solve the mathematical crypto puzzle with the help of the high computing
resources.
A. Validators
The validators will be there in PoS instead of miners in PoW . In the ecosystem, the
validators lock some of their Ether as a stake.
Like betting, the validators, will bet on those blocks that are likely to be added in the
chain. In proportion to the stake, the validators will be rewarded when a new block
is added.
1. One who becomes a validator may hold the cryptocurrency and also sometimes locked
up deposits were required.
2. It is also done based on how much stake or cryptocurrency the validators having are the
chances to mine a new block.
3. In the PoS protocol, it will randomly assign the validator and give the right to create a
new block in between as shown in Fig. 5, the validators and that is based on the stake value.
4. The reward, will be provided for the chosen validator. The Proof of Stake is mainly
suitable for resolving the BFT (Byzantine Fault Tolerance) as the
validators were tracked in the network and the known identities.
For example, the list wallet address. In Byzantine Fault Tolerance, it requires 2/3 of the
validators to be honest and keeping all these individuals helps to maintain the status.
B. Advantage
• Efficiency in energy
The PoS algorithms were efficient in energy in comparison with PoW [13]. The mining
process in PoS makes it a greener option in cutting out the energy intensively.
• Security
For security in PoS, the attackers should proceed with their stakes and the assets in order
to attempt 51% attacks. In comparison with PoW, the attackers will not lose their hardware
when attempting the 51% attacks.
• Decentralization
Leading to the real threat of centralization, the group of miners mining their resources
(mining pool), could control over 51% [15] of the networks that are running in PoW
systems. As a result, there is an exponential increase in the reward for a single investment
in PoW system because of opposition in the linear increase in the PoS system. For an
example, if the validator in a PoS network invests twice as much as any other validator, they
will be granted the control.
C. Conclusion
The PoS made the validators not to have their own computing power as the factors that
may influence the validators to win a number of their own coins and the complexity of the
network. The benefits that switching from PoW to PoS are as follows.
• Savings in energy
• If it becomes highly expensive, there will be a safer network.
Proof of Burn in the blockchain is a consensus algorithm that allows miners to add
their block by sending some of their coins to an unspendable account. Let's understand
more!
We’ve previously discussed several renowned consensus algorithms like proof of work
(PoW), Proof of Stake (PoS), Proof of Capacity (PoC), and many more. Today we picked up
the Proof of Burn (PoB) consensus mechanism in Blockchain.
The Blockchain network uses a consensus mechanism to ensure that all participants agree
to a new update on the network. Such as adding a new block of transactions to the network,
deciding the network rights, etc. Therefore, to ensure the continuity of the network
algorithm needs to be established.
Table of Content
In the Proof of Burn (PoB) algorithm, miners reach a consensus by burning the coins.
It’s a process in which crypto coins get permanently eliminated from regular
circulation. In such cases, the burning of coins mechanism is used to validate transactions.
Hence, the more coins a miner burns, the higher the chances of adding the block to the
network.
In comparison to the proof of Work (PoW) system, PoB reduces energy consumption.
Moreover, compared with proof of stake (PoS) systems, PoB doesn’t need miners to stake
coins to add a new block to the network.
There are various versions of Proof of Burn in blockchain, with the most acknowledged
version being Iain Stewart’s algorithm. He’s also the inventor of the Proof of Burn
consensus mechanism.
Here, the concept of “burning the coins” means investing the native coins in virtual
mining rigs (mining powers). It allows miners with the most virtual mining rigs or a
miner who invested the most coins – to add his new block of transactions to the network.
Hence, the number of burnt coins shows miners’ commitment to the network.
Let’s see how the proof of burn consensus algorithm in the blockchain works?
First, let’s begin with how do the miners burn the coins?
Here, the miners transfer some amount of coins to an unspendable address or an escrow
account. These publicly verified unspendable accounts are randomly created with no
private keys associated. Once coins get received by burn address/accounts, it becomes
useless and inaccessible. Eventually, the burnt coins in the account are used for
strengthening the security of the network.
Let’s take an example to understand the working of proof of Burn (PoB)?
We have 6 miners, each having their own block of transactions. As per the process, the
miners have to burn some amount of coins to get an opportunity to add their block to the
network.
See the below diagram. Each miner sends some of their coins to the burn address or
unspendable escrow account.
John wins as he burns the maximum number of coins. Hence, he gets the chance to add his
block of transactions to the network.
Moreover, the block added by John will be verified by other network validators. If the block
is found invalid, then the second-highest (Ross) gets the chance to add a new block.
Proof of Burn in blockchain promotes the periodic burning of coins to avoid partiality
among new and old network participants. It means the virtual power of mining reduces
each time a new block gets mined. Moreover, it motivates miners to make regular
transactions instead of just one-time investments.
Now let’s jump to the pros and cons of using the PoB approach.
Benefits of PoB
Limitations of PoB
Conclusion
The above article covered the details of the proof of Burn (PoB) mechanism. It also covered
the working of PoB and how it is better than popular consensus mechanisms like PoW and
PoS. Moreover, it goes through the pros and cons of the PoB algorithm.
Proof of Elapsed
Table of Content
The PoET algorithm was developed by Intel Corporation, the processor chip giant, in early
2016. Intel associated with the Linux Foundation in the development of Hyperledger
Sawtooth. They aimed to build a highly scalable private blockchain network.
PoET Mechanism assigns an amount of time to each node in the network randomly. The
node must sleep or do another task for that random wait time. Whichever node gets
the shortest waiting time wakes up and add their block to the network. Later, the new
update information floods among other network participants.
The Proof of Elapsed time in blockchain needs to ensure 3 significant factors for this
process to work:
● Ensure that the node or network participant gets the random waiting time.
● Check if they are not choosing the shortest waiting time on purpose.
● Verify if the node has completed the given waiting time or not.
Let’s dig a bit deeper into working on the Proof of Elapsed Time mechanism.
The time-lottery concept allows everyone in the network an equal chance of winning the
reward and being able to forge a new block to the network. The PoET controller maintains a
stopwatch for each participating node. It ensures their waiting time ends, and now they can
forge a new block. When the node wakes up, it submits the block and a cryptographic test
to the PoET controller for verification.
A newly proposed block is selected if the controller approves the newly proposed block by
the first woken-up node. Otherwise, it gets discarded. And then, the selection process of
assigning waiting time starts again.
steps.
Selection Process
● First, each participating node has to share its certificate by Intel Software Guard
Extension (SGX), which ensures its validity to generate a new block in the
network. After that, they are eligible to get a timer object.
● The numbers are assigned to each node as a timer object (waiting countdown
time) by Intel’s random number generation instruction, RAND. It generates
difficult-to-detect random numbers.
● Now, the time object given to each participating node activates.
Generation Process
● After the time object ends and the node wakes up, it’s eligible to forge a new block
to the network.
● The active node generates the hash (using a hash function like SHA-256) of its
block of transactions and submits it for acceptance. It doesn’t require showing
computation work done by the node.
● Afterwards, the update gets flooded to the network.
Therefore ends the iteration of mining a new block in a permissioned blockchain network
using the PoET consensus mechanism.
Proof of Work (PoW) demands computation work from nodes (or miners) to become
eligible for adding a new block. On the other hand, PoET randomly selects the among
participating nodes by distributing waiting time objects. Here, each node is equally eligible
to mine a new block.
PoET is way more time and energy-efficient than PoW. It is backed by one of the renowned
technology giants, Intel corporation, which makes it more trusting and reliable.
You can also read about Digital Signing in Blockchain using Cryptography.
Conclusion
The above article covered the PoET algorithm and its working. It also compares the
difference between Proof of Work (PoW) and Proof of Elapsed Time (PoET). Moreover, it
adds to the benefits and limitations of the PoET consensus algorithm.
The decentralized network works on the principle of not trusting but staying cooperative.
Blockchain (a decentralized network) chain of linearly connected information-contained
blocks secured using cryptography. Here, each block contains the hash of its previous block
to keep connected.
Moreover, every block contains several other pieces of information like timestamp, block
height, transaction records, Merkle Root Hash, block hash, previous block hash, difficulty
level, and many more in the block header. The other section contains a set of financial
transactions whose hashes will eventually convert into the Merkle root. Hence, a blockchain
is a chain of blocks of transactions.
Mining a Block
When it comes to adding a new block to the chain, it’s seen as a new update to the current
system. Therefore, it requires network participants’ permission. To decide to add a new
block or not, Proof-of-Work (PoW), a consensus mechanism, is used. Only verified
transactions get added to the network.
In contrast, not all blocks are valid. Most proposed blocks are considered invalid by the
network. The Blockchain protocol defines the Block validity. A Blockchain network has an
arbitrary “Difficulty” setting managed by the protocol, which changes how hard it is to mine
a block. Here, mining means adding a new block.
Miners propose the new blocks in the chain. They are externals who wish to add their block
to the network. The work required to create a valid block is where the value comes from.
Miners receive rewards in proportion to their share of the computation power they spend
to mine a new block. By mining a valid block, the miner proves the work done.
In Blockchains like the Bitcoin network or Ethereum, the difficulty level can change to
ensure that blocks are created regularly.
A block contains crucial transaction information that can’t be changed. So, the Miners
change the nonce to get the hash lower than the difficulty threshold. The nonce is a block
component that can be altered to achieve difficulty-level restrictions.
Let’s say,
Nonce: 8263
For, this, Block Hash > Difficulty Hash, which is considered invalid.
Harry will change the nonce until he gets the first 3 digits as zeroes.
After continuously changing nonce for hours, he finally got the hash.
Nonce: 6778
Now, the difficulty threshold got achieved. Block Hash < Difficulty Hash.
Hence, Harry’s block will be marked as valid and will get added to the blockchain. Harry
gets a few bitcoins as block rewards for mining a block in the bitcoin blockchain for
spending the computation power to find the valid hash.
This process is entirely based on chance. Hence, the miner’s job is to change the nonce
value until the overall block hash reaches lower than the difficulty hash. There are other
responsibilities of miners, but that’s a topic for another article.
A mining pool is a group of cryptocurrency miners who connect their mining machines over
a network to boost their chances of earning the reward for opening a new block.
New blocks are opened when a miner discovers the solution to the problem the entire
blockchain network is trying to solve. This process is time-consuming, energy-intensive,
and requires a computer that can generate and check billions, or even better, trillions of
randomized hexadecimal numbers per second.
Because it can take years to become profitable after purchasing, running, cooling, and
maintaining mining machines capable of this, joining a mining pool is the most affordable
way to increase the odds of receiving a bitcoin reward.
KEY TAKEAWAYS
● Cryptocurrency mining pools are groups of miners who share their computational
resources.
● Mining pools utilize these combined resources to increase the chances of
successfully mining for cryptocurrency.
● If the mining pool is successful and receives a reward, that reward is divided among
participants in the pool.
Rewards are usually divided between the individuals who contributed, according to the
proportion of each individual's processing power or work relative to the whole group,
usually called shares. In most cases, individual miners show proof to receive their
rewards—this is generally completed by the software the individual miner is using as it
attempts to generate solutions for the pool.
Rewards are usually split among the miners based on the pool's payout scheme. Some
schemes are pay per share (PPS), pay per last N shares (PPLNS), and pay per share plus
(PPS+). Each pays based on the share of work contributed, with different payout
calculations for each type.
Proportional mining pools are among the most common. In this type of pool, miners
contributing to the pool's processing power send shares of work to the pool until the point
at which the pool succeeds in finding a block. Miners then receive rewards proportional to
the number of shares they submitted for that block.
Peer-to-peer mining pools aim to prevent the pool structure from becoming centralized. As
such, they integrate a separate blockchain related to the pool itself and are designed to
prevent the pool operators from cheating and the pool itself from failing due to a single
central issue.
Payout Schemes
There have been many different types of payout schemes tried by many pools in the past,
but the majority of pools now use one of four:
● Pay-Per-Share (PPS)
● Full-Pay-Per-Share (FPPS)
● Pay-Per-Share-Plus (PPS+)
● Pay-Per-Last-N-Shares (PPLNS)
PPS is a fairly simple payout method—you're paid for the shares or blocks you contribute to
the pool.
PPS+ and FPPS are generally the same thing—you receive a proportional amount of the
reward based on the quality of the shares you provided, and the pool pays a transaction fee
reward.
PPLNS might be slightly more confusing—when a block is "found," the pool software
locates the last blocks you contributed after the last and new winning blocks were found.
The number of trial blocks (or shares) you contributed between that time dictates your
payout. This usually means you'll need to stay connected to the pool until a block is found. If
you disconnect between blocks, you'll likely lose your contributions and payout.
Mining also pools require less of each participant in terms of hardware and electricity costs,
thus increasing the chances of paying any associated expenses and profiting.
For some cryptocurrency proponents, this centralization goes against the intended
decentralized structure Bitcoin and other cryptocurrencies are supposed to represent.
Permissioned Blockchain
These blockchains often employ efficient mechanisms like practical Byzantine fault
tolerance (PBFT), delegated proof of stake (DPoS), or Raft consensus. Thus, it enables
faster transaction validation and reduced energy consumption. Additionally, these
blockchains efficiently safeguard privacy and confidentiality, a crucial requirement for
industries where sensitive information must be kept confidential. Moreover, these
blockchains support smart contracts, which reduces the need for intermediaries and
optimizes operational efficiency.
Characteristics
Use Cases
● Banks and financial institutions use these blockchains to facilitate faster and
cost-effective cross-border payments and settlements. They streamline trade and
finance processes, reducing fraud and improving transparency in international
trade transactions.
● Companies in the food, pharmaceutical, and luxury goods industries use these
blockchains to track the origin and journey of products, ensuring authenticity and
compliance with regulations. They help manage inventory levels, automate reorder
processes, and enhance supply chain visibility.
● Healthcare providers use such blockchains to securely and efficiently manage
patient records, ensuring data privacy and integrity. Moreover, the pharmaceutical
industry employs them to trace the production and distribution of medications,
reducing the risk of counterfeit drugs.
● One of the crucial permissioned blockchain use cases is to develop secure and
transparent electronic voting systems, reducing the potential for fraud. Additionally,
Governments can use these blockchains for identity verification, enhancing security
in passport issuance and border control areas.
● They help artists and creaators protect their intellectual property rights by
transparently recording ownership and usage rights. Furthermore, legal firms and
businesses use these blockchains to automate contract execution and ensure
compliance.
● They are often criticized for being less decentralized than public blockchains. The
control and governance by a select group of participants can lead to concerns about
centralization. This centralized control can undermine the fundamental principles of
blockchain technology.
● Since these blockchains have fewer participants, they may be more susceptible to
collusion or attacks from within the network. The network’s security relies heavily
on the trustworthiness of the participants and makes it vulnerable if any participant
becomes compromised or malicious.
● Building and maintaining this blockchain can be expensive because of its initial
development costs and ongoing operational expenses. Smaller organizations and
startups may find it challenging to invest in the infrastructure and resources
required for these blockchains.
● They have restricted access, which limits the network effects and potential benefits
that can be achieved from a more extensive, open network. In contrast, the smaller
networks may not offer the same innovation, liquidity, and ecosystem growth level.
Permissioned Blockchain
● In these blockchains, access to the network and participation is restricted to
authorized entities or participants who are granted permission. This controlled
access allows for higher privacy, security, and regulatory compliance, making it
suitable for applications where data access must be limited to trusted parties.
● These blockchains often have a more centralized governance model, with a select
group of entities or consortium members making network rules and operations
decisions.
Permissionless Blockchain
● Thus, this blockchain prioritizes transparency, as anyone can view the transaction
history and ledger contents.