Professional Documents
Culture Documents
Blockchain - Curs 3
Blockchain - Curs 3
BLOCKCHAIN
Curs 3
THE IMPORTANCE OF
CONSENSUS
WHAT IS CONSENSUS?
• Consensus, means the method used to come to an
agreement. So, consensus in a blockchain is how the
blockchain nodes “come to agreement” over the blockchain
transactions that will be written to the blockchain ledger.
• A consensus algorithm is a process used to achieve an
agreement, for example, for a transaction on a distributed
network.
THE TRADE-
The trade-off is between transaction security and
OFF
performance in most scenarios. Performance in
blockchains is measured in transaction throughput,
which is also known as transactions per second
(TPS).
Voting- Lottery-
based based
VOTING-BASED CONSENSUS
• Bitcoin was the first practical and successful cryptocurrency platform, and it introduced the proof-
of-work (PoW) consensus method as part of the platform. The proof-of-work protocol involves block
miners solving complex cryptographic puzzles.
• Basically, PoW demonstrates that a participant has done some work and gets a reward for solving a
problem.
• PoW consensus in Bitcoin: a block including relevant parts of the transaction is hashed, and a
random number is added to it so that the resulting hash is below a certain value, which is called the
difficulty level. This difficulty level is what the miners use to gauge the level of compute power and
resources needed to mine Bitcoin, for example, and if it would be profitable.
POW PROS
PoW offers the following pros:
• It is a historically proven consensus method that is widely used for cryptocurrency and is a stable
platform.
• It's secure because of the high cost and low probability of a 51 percent attack. (A 51 percent attack is
where the pool of mining nodes is taken over by a group of miners controlling more than 50 percent
of the network's mining hash rate.) This type of attack is unlikely because of the immense hash
power and the requirement for the number of nodes to control.
POW CONS
• PoW has the following cons:
• Transaction processing is slow compared to other consensus approaches. For example, in Bitcoin it
can take several hours to get a transaction confirmation.
• The 51 percent attack concern is still real, meaning that 51 percent or more than 51 percent of nodes
in the network can be exploited.
• Mining is a time-consuming process because of the work that has to be done to produce blocks.
• Mining is an expensive process from both an economic and environmental perspective. For example,
Bitcoin mining uses so much power it is frequently banned by municipal power companies.
• https://www.youtube.com/watch?v=3EUAcxhuoU4&t=164s
PROOF-OF-STAKE CONSENSUS
• Proof of stake was created in 2011, and the first cryptocurrency to implement it was Peercoin in 2012.
• It was created as a way of avoiding the well-known economic and environmental issues with PoW,
such as intense energy consumption and cost of mining.
• Proof of stake approach: the creator of the next block is determined by a randomized system that is
logically dictated by how much of an investment a user is holding or how long they have been
holding that particular currency. This is a different approach from the “computational power” in
PoW, for example, where the probability of creating a block and receiving the associated rewards is
proportional to a user holding the underlining token or cryptocurrency on the network.
PROOF OF STAKE
• Proof of stake is a deterministic way that is essentially based on wealth, defined as stake. A greater
investment in a cryptocurrency stake equates to greater influence.
• Validator consensus
POS PROS
* the pros and cons could certainly be acceptable for enterprises that are seeking a targeted solution
and not expecting to go outside of that solution.
DELEGATED PROOF OF STAKE
• DPoS uses a real-time voting system and a reputational system to achieve consensus.
• The DPoS blockchain consensus protocol allows the blockchain token holders to leverage their coin
balances to elect delegates that are called witnesses. These witnesses have the opportunity to stake
blocks of new transactions and then will be authorized to add them to the blockchain network.
• The voting power is determined by how large the token holdings are of the specified blockchain
stakeholders. The stakeholders who have more coins or tokens, for example, will have a greater
impact on the network than those with fewer.
DPOS CONS
• Practical Byzantine fault tolerance (PBFT) has been the most widely used permissioned blockchain
platform protocol.
• PBFT consensus decisions are determined based on the total decisions submitted by all the generals
(nodes).
• PBFT works only on a permissioned blockchain and thus does not allow anonymity like in Ethereum.
PBFT PROS
• Each ‘general’ maintains an internal state (ongoing specific information or status). When a ‘general’
receives a message, they use the message in conjunction with their internal state to run a
computation or operation.
• This computation in turn tells that individual ‘general’ what to think about the message in question.
Then, after reaching his individual decision about the new message, that ‘general’ shares that
decision with all the other ‘generals’ in the system.
• A consensus decision is determined based on the total decisions submitted by all generals.
REFERENCES
• Joseph Holbrook, “Architecting Enterprise Blockchain Solutions”, Wiley, 2020, ISBN: 978-1-
119-55773-9