0% found this document useful (0 votes)
47 views

Why Blockchain Unit 1

Blockchains store transaction data in blocks that are linked together in a chain. Each block contains a cryptographic hash of the previous block, transactions, and other data. This structure makes blockchains difficult to hack or defraud because altering a single block would require recalculating the hashes of all subsequent blocks in the chain. Miners validate transactions by solving complex mathematical puzzles and receive rewards for adding new blocks to the distributed ledger.

Uploaded by

alfiyashajakhan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Why Blockchain Unit 1

Blockchains store transaction data in blocks that are linked together in a chain. Each block contains a cryptographic hash of the previous block, transactions, and other data. This structure makes blockchains difficult to hack or defraud because altering a single block would require recalculating the hashes of all subsequent blocks in the chain. Miners validate transactions by solving complex mathematical puzzles and receive rewards for adding new blocks to the distributed ledger.

Uploaded by

alfiyashajakhan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Why Blockchain

Blockchain is a method of storing data that makes it difficult or impossible to


update, hack, or defraud the system. A blockchain is simply a digital ledger of
transactions that is replicated and distributed across the blockchain's complete
network of computer systems.

Structure of a Block in Blockchain

Contents

 Introduction
 What is Blockchain?
 What is Block in Blockchain?
 Structure of a Block
 Block Header
 Transactions

 In Conclusion

Introduction
In this article, we’ll go through the components and structure of Blockchain’s block. We’re going
to take the Bitcoin block as an instance. Bitcoin is a popular permissionless public blockchain
network. Before getting into block anatomy, let’s begin with understanding blockchain briefly.

What is Blockchain?
Blockchain comes under Distributed Ledger Technology (DLT). It’s a distributed database that
records– who transacts what to whom and who owns what? Hence, a blockchain is
a decentralized database containing imprints of assets and transactions across a whole network.
Each node/system in the network shares the exact same copy of records, making it nearly
impossible to disrupt or alter.
All nodes or systems are connected peer to peer (P2P) in a network. This distribution is on a
conceptual network level.

However, when it comes to storing the ledger of the transactions in a blockchain network, it’s
different. Let’s understand it clearly.

What is Block in Blockchain?


Block in a Blockchain–

 Blockchain is a linear chain of blocks.


 Each block contains a set of transactions and other essential details.
 Blocks are linearly connected and cryptographically secured.

 Each block header contains the previous block hash, current block hash, nonce,
Merkle root, and other details.
 All blocks are connected linearly by carrying the hash of the previous block.
 The previous block hash is used to compute the current block hash.
 The first block with no previous block hash is called “Genesis Block.”
 For adding a new block to the network, the blockchain follows consensus
mechanisms like proof of work (PoW), proof of stake (PoS), etc.

Structure of a Block
Let’s just draw a conceptual image of a block with reference to a ledger of transactions.
The above image will create a simpler conceptual block visualization in your head. However, the
actual block contains a lot more information than the ledger image above.

Following are the significant elements of a block –

Block Height –

It’s the sequence number of the block in the chain of blocks. Block Height: 1 is the genesis
block (first block in the network).

Block Size –

It’s a 4-bytes or 32-bit field that contains the size of the block. It adds size in Bytes. Ex – Block
Size: 216 Bytes.

Block Reward –

This field contains the amount rewarded to the miner for adding a block of transactions.

Tx Count –

The transaction counter shows the number of transactions contained by the block. The field has
a maximum size of 9 bytes.

Block Header –

The Block header is an 80-Byte field that contains the metadata – the data about the block.

Let’s briefly discuss the 6 components of the Block Header.

Time – It’s the digitally recorded moment of time when the block has been mined. It is
used to validate the transactions.

 Version – It’s a 4-bytes field representing the version number of the protocol used.
Usually, for bitcoin, it’s ‘0x1’.

 Previous Block Hash – It’s a 32-bytes field that contains a 256-bits hash (created
by SHA-256 cryptographic hashing) of the previous block. This helps to create a linear
chain of blocks.

 Bits – It’s a 4-bytes field that tells the complexity to add the block. It’s also known as
“difficulty bits.” According to PoW, the block hash should be less than the difficulty
level.
 Nonce – It’s a 4-bytes field that contains a 32-bit number. These are the only changeable
element in a block of transactions. In PoW, miners alter nonce until they find the right
block hash.

 Merkle Root – A 32-bytes field containing a 256-bit root hash. It’s constructed
hierarchically combining hashes of the individual transactions in a block.

Data structure of blockchain:

The blockchain data structure is an ordered, back-linked list of blocks of transactions.


The blockchain can be stored as a flat file, or in a simple database. The Bitcoin Core client
stores the blockchain metadata using Google's LevelDB database.

How is data distributed in blockchain?


Blockchain relies on distributed ledger technology (DLT). The DLT acts as a
decentralized database of information about transactions between various parties.
Operations fill the DLT in chronological order and are stored in the ledger as a series
of blocks.

What is distribution in blockchain?


Blockchain is one type of a distributed ledger. Distributed ledgers use independent
computers (referred to as nodes) to record, share and synchronize transactions in
their respective electronic ledgers (instead of keeping data centralized as in a
traditional ledger).
Block validators
When a block is validated, the miners that solved the puzzle are rewarded and the block
is distributed through the network. Each node adds the block to the majority chain, the
network's immutable and auditable blockchain.

How is validation done in blockchain?


As transactions on the blockchain are initiated by users, they are queued on the
network for subsequent validation. Validator nodes then batch individual
transactions into a block to verify it. Each blockchain has its own rules pertaining
to the number of transactions per block.

Who validates transactions on the block chain?

For a public blockchain, the decision to add a transaction to the chain is made by
consensus. This means that the majority of “nodes” (or computers in the network)
must agree that the transaction is valid. The people who own the computers in
the network are incentivised to verify transactions through rewards.

The transaction is validated by the network and made part of the mining process.
Mining is in progress and is done when a minder earns a bitcoin. The network validates the
result of the mining process. The receiver of the money gets a confirmation of the successful
transaction.
What transactions are Bitcoin miners verifying?
What does Bitcoin transaction confirmation do? A Bitcoin transaction, or any
cryptocurrency transaction must be confirmed on a blockchain to verify that the
transaction is legitimate. A confirmed transaction means that the transaction has
been included in a block, and therefore included in the blockchain.

Let's say Raj and Shalini are two nodes on a bitcoin blockchain network. Now Raj wants to
send 50 Bitcoins (BTCs) to Shalini via a secure channel. This transaction will be done
through the blockchain network.

What are real life examples of blockchain?


Top Blockchain Applications To Know
 Money transfer.
 Smart contracts.
 Internet of Things (IoT)
 Personal identity security.
 Healthcare.
 Logistics.
 Non-fungible tokens (NFTs)
 Government.

 What Is Proof-of-Work (PoW)?


 Consensus protocols are used to verify and validate transactions. There are different
kinds of consensus protocols and their different ways for the verification and
validation of transactions.

 In Proof-of-work (PoW), a miner or a group of miners will solve a mathematical


equation to add a new block of transactions. The first miner to solve the mathematical
equation will add the block in the existing blockchain. He will be rewarded with
validated tokens.

Blockchain Architecture
 Now in this Blockchain Technology tutorial, let’s study the
Blockchain architecture by understanding its various components:
 A Blockchain is a chain of blocks that contain information. The data which is stored
inside a block depends on the type of blockchain.

 For Example, A Bitcoin Block contains information about the Sender, Receiver,
number of bitcoins to be transferred.

The first block in the chain is called the Genesis block. Each new block in the chain
is linked to the previous block.

Understanding SHA256 – Hash


A block also has a hash. A can be understood as a fingerprint which is unique to
each block. It identifies a block and all of its contents, and it’s always unique,
just like a fingerprint. So once a block is created, any change inside the block
will cause the Hash to change.

Therefore, the Hash is very useful when you want to detect changes to
intersections. If the fingerprint of a block changes, it does not remain the same
block.

Each Block has

1. Data
2. Hash
3. Hash of the previous block

Consider the following example, where we have a chain of 3 blocks. The 1st block
has no predecessor. Hence, it does not contain has the previous block. Block 2
contains a hash of block 1. While block 3 contains Hash of block 2.
Hence, all blocks are contained hashes of previous blocks. This is the technique
that makes a blockchain so secure. Let’s see how it works –

Assume an attacker can change the data present in Block 2. Correspondingly,


the Hash of the Block also

Therefore, changing a single block can quickly make all following blocks invalid.

Proof of Work
Hashes are an excellent mechanism to prevent tempering, but computers these
days are high-speed and can calculate hundreds of thousands of hashes per
second. In a matter of a few minutes, an attacker can tamper with a block and
then recalculate all the hashes of other blocks to make the blockchain valid
again.

To avoid the issue, blockchains use the concept of Proof-of-Work. It is a


mechanism that slows down the creation of the new blocks.

A proof-of-work is a computational problem that takes a certain to effort to


solve. But the time required to verify the results of the computational problem is
very less compared to the effort it takes to solve the computational problem
itself.

In the case of Bitcoin, it takes almost 10 minutes to calculate the required proof-
of-work to add a new block to the chain. Considering our example, if a hacker
would to change data in Block 2, he would need to perform proof of work (which
would take 10 minutes) and only then make changes in Block 3 and all the
succeeding blocks.
This kind of mechanism makes it quite tough to tamper with the blocks, so even
if you tamper with even a single block, you will need to recalculate the proof-of-
work for all the following blocks. Thus, hashing and proof-of-work mechanisms
make a blockchain secure.

Distributed P2P Network


However, there is one more method which is used by blockchains to secure
themselves, and that’s by being distributed. Instead of using a central entity to
manage the chain, Blockchains use a distributed peer-peer network, and
everyone is allowed to join. When someone enters this network, he will get the
full copy of the blockchain. Each computer is called a node.

Let’s see what happens when any user creates a new block. This new block is
sent to all the users on the network. Each node needs to verify the block to
make sure that it hasn’t been altered. After complete checking, each node adds
this block to their blockchain.

All these nodes in this network create a consensus. They agree about what
blocks are valid and which are not. Nodes in the network will reject blocks that
are tampered with.

So, to successfully tamper with a blockchain

1. You will need to tamper with all blocks on the chain


2. Redo the proof-of-work for each block
3. Take control of greater than 50% of the peer-to-peer network.

After doing all these, your tampered block becomes accepted by everyone else.
This is next to an impossible task. Hence, Blockchains are so secure. Next, in this
beginner’s Blockchain development tutorial, we will learn how a Blockchain
transaction works?

How Does Blockchain Technology Work?

Blockchain Transaction Process


Step 1) Some person requests a transaction. The transaction could be involved
cryptocurrency, contracts, records, or other information.
Step 2) The requested transaction is broadcasted to a P2P network with the
help of nodes.

Step 3) The network of nodes validates the transaction and the user’s status
with the help of known algorithms.

Step 4) Once the transaction is complete, the new block is then added to the
existing blockchain. In such a way that is permanent and unalterable.

Why do we need Blockchain?


Here are some reasons why Blockchain technology has become so popular.

Resilience: Blockchains is often replicated architecture. The chain is still


operated by most nodes in the event of a massive attack against the system.

Time reduction: In the financial industry, blockchain can play a vital role by
allowing the quicker settlement of trades as it does not need a lengthy process
of verification, settlement, and clearance because a single version of agreed-
upon data of the shared ledger is available between all stack holders.

Reliability: Blockchain certifies and verifies the identities of the interested


parties. This removes double records, reduces rates, and accelerates
transactions.

Unchangeable transactions: By registering transactions in chronological order,


Blockchain certifies the unalterability of all operations, which means when any
new block has been added to the chain of ledgers, it cannot be removed or
modified.

Fraud prevention: The concepts of shared information and consensus prevent


possible losses due to fraud or embezzlement. In logistics-based industries,
blockchain as a monitoring mechanism act to reduce costs.

Security: Attacking a traditional database is the bringing down of a specific


target. With the help of Distributed Ledger Technology, each party holds a copy
of the original chain, so the system remains operative, even a large number of
other nodes fall.

Transparency: Changes to public blockchains are publicly viewable to


everyone. This offers greater transparency, and all transactions are immutable.
Collaboration – Allows parties to transact directly with each other without the
need for mediating third parties.

Decentralized: There are standards rules on how every node exchanges the
blockchain information. This method ensures that all transactions are validated
and all valid transactions are added one by one.

Blockchain versions
Now in this Blockchain development tutorial, let’s learn about Blockchain
versions.

Blockchain Versions
Blockchain 1.0: Currency
The implementation of DLT (distributed ledger technology) led to its first and
obvious application: cryptocurrencies. This allows financial transactions based
on blockchain technology. It is used in currency and payments. Bitcoin is the
most prominent example in this segment.

Blockchain 2.0: Smart Contracts


The new key concepts are Smart Contracts, small computer programs that
“live” in the blockchain. They are free computer programs that execute
automatically and check conditions defined earlier like facilitation, verification,
or enforcement. It is used as a replacement for traditional contracts.

Blockchain 3.0: DApps:


DApps is an abbreviation of decentralized application. It has its backend code
running on a decentralized peer-to-peer network. A DApp can have frontend
Blockchain example code and user interfaces written in any language that can
make a call to its backend, like a traditional App.
Blockchain Variants
Public:
In this type of blockchain, ledgers are visible to everyone on the internet. It
allows anyone to verify and add a block of transactions to the blockchain. Public
networks have incentives for people to join and are free for use. Anyone can use
a public blockchain network.

Bitcoin Fundamentals: Step by


step explanation of a peer-to-peer
Bitcoin transaction

This Video shows a more technical explanation of what is Bitcoin and how
does it work

Nakamoto introduced bitcoin on 31 October 2008 to a cryptography


mailing list by publishing the White Paper “Bitcoin: A Peer-to-
Peer Electronic Cash System”[1][2], and released as open-
source software in 2009.
Bitcoins are created as a reward in a competition in which users
offer their computing power to verify and record bitcoin transactions
into the blockchain. This activity is referred to as mining and
successful miners are rewarded with transaction fees and newly
created bitcoins.

Technically, Bitcoin consists of:

● A decentralized peer-to-peer network (the Bitcoin protocol)

● A public transaction ledger (the blockchain)

● A set of rules for independent transaction validation and currency


issuance (consensus rules)

● A mechanism for reaching global decentralized consensus on the


valid blockchain (Proof-of-Work algorithm)

One of the most interesting things is that blockchain promises


disruptive changes because empowers the ‘Internet of Value’ that
represents a world where money is exchanged at the speed in which
information moves today. Transactions would occur in real-time and
across global networks, solving the problem of international
payments systems that are not interoperable. And what is more: as it
does not need intermediaries, the concept goes further and in turn
favours the social inclusion.
Here is a high-level example of a peer to peer transaction.

So, how does it work?

1. Nick opens his bitcoin wallet. This implies that Nick is indirectly
creating his own bitcoin address. He’s supposed to get some
bitcoins.

2. Nick wants to transfer bitcoins to Rose. So, he scans or copies


Rose’s bitcoin address.

3. Nick fills an amount of bitcoin he wants to transfer and the fee he


is willing to pay for this transaction. So, a transaction
includes inputs, outputs and the amount of bitcoin that will be
transferred.
4. Before sending the new transaction to the blockchain, the wallet
using Nick’s private key signs it.

5. Now, the transaction is sent to the closest node on the bitcoin


network. Then it is propagated into the network and verified (basic
checks: eg. there are enough bitcoins on the origin wallet, structure,
etc.). After it successfully passes verification it goes and sits inside
the “Mempool” (short for Memory Pool) and patiently waits until a
miner picks it up to include it in the next block to be mined.

6. It’s mining time and miners pick up the transactions (first those
who pays more transaction fee) and group them into blocks trying to
solve the Proof Of Work (or POW — a consensus
algorithm) and calculate a certain hash function.

7. The miner who get it propagates the new block to the network.

8. The nodes verify the result and propagate the block.

9. Now Rose sees the first confirmation.

10. New confirmations appear with each new block that is created
and linked.

The transaction in more detail:

A Bitcoin transaction is composed of 4 key elements:


1. Input (Origin): Bitcoin address (public) of the origin
wallet.

2. Amount: Amount of bitcoins to be sent on the


transaction.

3. Output (Destination): Bitcoin address (public) of the


destination wallet.

4. Metadata (Optional): The metadata or message has


a maximum size of 80 bytes. The metadata is stored in
the OP_RETURN part of the transaction.

Bitcoin Transaction components

A transaction doesn’t simply move some bitcoin from one address to


another address. A Bitcoin transaction moves bitcoins between one
or more inputs and outputs. Each input is a transaction and address
supplying bitcoins. Each output is an address receiving bitcoin,
along with the amount of bitcoin going to that address.
A sample Bitcoin transaction. Transaction C spends .008 bitcoins from
Transactions A and B.

The diagram above shows a sample transaction “C”. In this


transaction, .005 BTC is taken from an address in Transaction A,
and .003 BTC is taken from an address in Transaction B. For the
outputs, .003 BTC are directed to the first address and .004 BTC are
directed to the second address. The leftover .001 BTC goes to the
miner of the block as a fee. Note that the .015 BTC in the other
output of Transaction A is not spent in this transaction.

Each input used must be entirely spent in a transaction. If an


address received 100 bitcoins in a transaction and you just want to
spend 1 bitcoin, the transaction must spend all 100. The solution is
to use a second output for change, which returns the 99 leftover
bitcoins back to you.

Transactions can also include fees. If there are any bitcoins left over
after adding up the inputs and subtracting the outputs, the
remainder is a fee paid to the miner. The fee isn’t strictly required,
but transactions without a fee will be a low priority for miners and
may not be processed for days or maybe discarded entirely. A typical
fee for a transaction is 0.0002 bitcoins (about 20 cents), so fees are
low but not trivial.

So how does it work?


Step 1: Bob and Alice create the transaction

STEP 1: Transaction creation and signing

Anyone can create a transaction with 3 necessary components. The


Input, Amount and Output. For example, let´s say that Bob and
Alice are exchanging bitcoin for dollars. As Bob sends the bitcoin to
Alice, Alice needs to send her bitcoin address (public) and Bob
creates the transaction and sign it with his private key.

STEP 2: Bitcoin transaction broadcasting

STEP 2: Broadcasting

Once the transaction is created, it is sent to the closest node on the


bitcoin network. Note: The transaction doesn´t need to be sent right
after the creation. It could be sent a long time after the creation (just
need to be sure that you have enough bitcoins in the wallet when you
decide to send it)

Step 3: Propagation and verification

STEP 3: Propagation and verification

Once the transaction arrives at the closest node, then it is


propagated into the network and verified. After it successfully passes
verification it goes and sits inside the “Mempool” (short for Memory
Pool) and patiently waits until a miner picks it up to include it in the
next block.

Step 4: Block Validation

STEP 4: Validation
Once the transaction is on the Mempool, then the miners pick up the
transactions (First those who pays more transaction fee) and group
them in blocks. As on May 2017, each block has a maximum size
limit of 1 MB (change in this limit is under discussion by the
community) and contains around 2.000 to 3000 transactions,
depending on the size of each transaction. Then, by using the Proof-
of-Work Consensus Algorithm, the network agrees on the valid
block, and consequently the transactions, on average every 10
minutes.

How is data distributed in blockchain?


Blockchain relies on distributed ledger technology (DLT). The DLT acts as a
decentralized database of information about transactions between various parties.
Operations fill the DLT in chronological order and are stored in the ledger as a series
of blocks.

How is the bitcoin blockchain distributed?

The blockchain is not stored in one place; it is distributed across multiple


computers and systems within the network. These systems are called nodes.
Every node has a copy of the blockchain, and every copy is updated whenever there
is a validated change to the blockchain

Data distribution or data communication happens in mainly 2 ways:

1. Clent-Server Model: Here all the client nodes update data to the central server (assuming
1:M mapping). The server takes the input and all updates the data in its database. And after
that, when a client asks for the data server provides the updated data. The server holds 100%
of the data. Most of the websites on the internet today are built on this model. It's very
efficient but also very easy to take down or corrupt by governing bodies or bad people. As the
main target of the whole system becomes the target.

2. Peer-To-Peer (P2P) Model: In this model, each participant of the network has the 100% of
the data (or close to it) instead of a centralized server. It's kind of a gossip model. Where each
participant in a group of friends knows 100% about the gossip. It is a decentralized
communications model in which each party has the same capabilities and either party can
initiate a communication session. Unlike the client/server model, in which the client makes a
service request and the server fulfills the request, the P2P network model allows each node to
function as both a client and server. It is less efficient than the Clent-Server model as the data
has to be replicated to all the nodes whenever there is new data coming. However, here each
peer/node is more independent as they can operate to some extent if they lost connection to
the network. Also, it is very robust. As there is no central server, it is very hard to close down
a P2P

What is Proof of Burn (PoB)?


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.

How does the PoB Algorithm work?

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.

Wouldn’t this approach be unfair for early adopters in the network?

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
Following are the advantages of Proof of Burn in blockchain:
 Less power and energy consumption.
 Motivates miners to make regular transactions using cryptocurrency.
 PoB is more sustainable and doesn’t need hardware for heavy computation.
 Used for long-term commitments

Limitations of PoB
Following are the disadvantages of Proof of Burn in blockchain:

 It’s not an initial consensus algorithm. It requires a number of wealthy participants to


burn their coins in the network.
 PoB has not been proven to be applied on massive networks.
 It takes more time to validate the block of transactions. Hence, a bit slower mechanism.

Proof-of-Activity (PoA)?

What Is Proof-of-Activity (PoA)? Proof-of-activity (PoA) is a blockchain consensus


algorithm used in cryptocurrencies and similar systems. It is used to ensure that all
transactions occurring on the blockchain are genuine, as well as to ensure that all miners
arrive at a consensus

In this series of learning various consensus algorithms in blockchain, today, we picked up proof
of Activity (PoA). In this article, you’ll learn about the working of the PoA mechanism along
with its pros and cons.

PoA mechanism ensures that all blocks of transactions added to the network are genuine and
valid. It’s a way that helps miners to get network agreement (or consensus) to add their new
block. Moreover, PoA protects the blockchain network against external and internal attacks.

What is Proof of Activity (PoA)?


Proof of Activity combines proof of work (PoW) and proof of Stake (PoS) mechanism.
First, PoA uses the mining concept by proof of work, where miners have to do complex
mathematical computations to prove their efforts and sincerity to the network. However, instead
of mining a block of transactions, PoA allows miners to mine (or add) a blank template block
with header information and mining reward address. Once this almost empty block gets
mined, the mechanism switches to Proof of Stake (PoS).

Then a group of validators is picked at random. They are responsible for validating or
signing the new block. Validators analyze the header information of the block and then mark it
as valid or invalid. This process continues until a block receives the required number of validators
(or signers).

The higher coins the network participant holds, the stronger are their chances of being picked up
as a validator (or signer).

Once the group of validators signs the new block by the miners, it’s marked as a valid,
complete block and gets added to the blockchain network. Finally, the transactions will get
recorded on the newly added block.

At last, the mining fees/rewards distributes among the miners and the group of validators who
contributed to the mining process.

Let’s see how the proof of Activity (PoA) mechanism works step by step.
How does the Proof of Activity (PoA) Algorithm work?
Following are the steps to the PoA algorithm.

STEP 1: Process of Mining the Block (by Miners)

Miners try to submit their almost empty block (with header information and miner’s reward
address) by solving a complex mathematical puzzle (finding the correct nonce and block hash)—
similar to PoW.

Also read – Proof of Work in Blockchain

Once the miners submit their nearly blank blocks, the consensus approach switches from PoW to
the PoS mechanism.

STEP 2: Process of Signing the Block (by Validators)

This step uses the concepts of the Proof of Stake (PoS) mechanism for using network validators.
However, here validators and miners are separate entities.

A group of network participants called validators (or signers) verifies the block submitted by the
miners. These network validators are selected based on their coins in the network. The higher the
coins held by a validator, have the maximum chances of getting their signed block chosen.

Validators analyze the header information and miners’ reward address of the block and
then mark it as signed or unsigned.
Note: The process of signing continues until a block receives the required number of signs on
their block by the validators.

STEP 3: Adding transactions

Once a block gets signed by the required number of validators. It marks a valid and complete
block. Afterward, new transactions from the transaction pool add to the block. Finally, the block
gets added to the blockchain network.

The mining reward is distributed among the winning block’s miner and the validators for their
contribution to the network.

Decred (D-Cred) is the best-known cryptocurrency that utilizes proof of activity.

Benefits of Proof of Activity (PoA)


Following are the advantages of the Proof of Activity mechanism:

 PoA combines to utilize PoW’s hashing system and PoS’s digital signing.
 It highly reduces the probability of a 51% attack on the network.
 Maintains the difficulty level to protect the network.
 PoA has high fault tolerance as the whole system will never shut down completely.
 Provide earning opportunities to both miners and network validators.

Limitations of Proof of Activity (PoA)


Following are the disadvantages of the Proof of Activity mechanism:

 High energy consumption for mining blocks.


 Due to massive computation, the mining process takes a lot of time.
 Requires expensive hardware for computation.
 There’s nothing at stake from both miners and validators leading to internal conflicts
and a bad reputation.
 The number of validators could be less due to a lack of interest.

Proof of Elapsed Time (PoET) in Blockchain

Like
Be the first one to like the blog!

PoETProof Of Elapsed TimeProof Of Elapsed Time (PoET) In Blockchain

Proof of Elapsed Time (PoET) in Blockchain


1k views
4 min read
Updated on Jun 30, 2022

HimanshiAssistant Manager Content60 Blogs written


Proof of Elapsed Time in blockchain uses a time-lottery-based consensus mechanism, distributing
wait time to each participating node in the network.
 Introduction
 What is Proof of Elapsed Time (PoET)?
 How does the Proof of Elapsed Time (PoET) Algorithm work?
 Proof of Work (PoW) VS Proof of Elapsed Time (PoET)
 Benefits of Proof of Elapsed Time (PoET)
 Limitations of Proof of Elapsed Time (PoET)
 In Conclusion

Introduction
In this series of covering consensus mechanisms used by blockchain networks, today, we picked
up Proof of Elapsed time (PoET). It is the algorithm behind Hyperledger permissioned
blockchain network for businesses.

This article covers the gore details of the PoET algorithm along with its functioning. It also
covers the difference between Proof of Work and Proof of Elapsed Time. In addition, the article
goes through the benefits and limitations of the PoET consensus algorithm.

Let’s begin with the inception of the PoET mechanism.

What is Proof of Elapsed Time (PoET)?


PoET is a consensus algorithm used in a permissioned blockchain network to decide mining
rights and next block miner. FYI, a permissioned blockchain network requires participants to
prove their identity, whether they are allowed to join. Hence, it needs permission (or invitation) to
join the decentralized network as a new participant ( or node).

The PoET algorithm was developed by Intel Corporation, the processor chip giant, in early
2016. Intel associated with Linux Foundation in the development of Hyperledger Sawtooth.
They aimed to build a highly scalable private blockchain network.

Intel introduced PoET as a time-lottery-based consensus algorithm secured by cryptography.


The concept basically motivates the idealogy of giving equal chances of getting a reward like a
lottery.

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 indeed.
 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.

How does the Proof of Elapsed Time (PoET) Algorithm work?


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 ended, 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 selects if the controller approves the newly proposed block by the first
woken up node. Else it gets discarded. And then, the selection process of assigning waiting time
starts again.

Let’s break down the process more accurately into 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 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.
 Afterward, 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) VS Proof of Elapsed Time (PoET)


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.

Benefits of Proof of Elapsed Time (PoET)


Following are the advantages of the PoET consensus mechanism:

 PoET can go up to a million transactions per second.


 It is highly energy-efficient and easily scalable.
 It’s a block generation consensus algorithm, unlike proof of stake (PoS).
 PoET is for privately controlled spaces like business organizations.
 It ensures the same opportunity for network participants with time object and
activation.
 As it’s a permissioned blockchain network, the process of selecting validators ensures
network security against cyber attacks.

Limitations of Proof of Elapsed Time (PoET)


Following are the disadvantages of the PoET consensus mechanism:
 PoET is a permissioned and closed network, unlike Bitcoin and Ethereum.
 The mechanism highly depends on tools by Intel technology which might raise
compatibility issues with other tools later.

You can also read about Digital Signing in Blockchain using Crypto

internet. Each transaction protects through digital signature.

Distributed Database: There is no Central Server or System which keeps


the data of Blockchain. The data is distributed over Millions of Computers
around the world which are connected with the Blockchain. This system
allows Notarization of Data as it is present on every Node and is publicly
verifiable.

A network of nodes: A node is a computer connected to the Blockchain


Network. Node gets connected with Blockchain using the client. Client helps
in validating and propagates transaction on to the Blockchain. When a
computer connects to the Blockchain, a copy of the Blockchain data gets
downloaded into the system and the node comes in sync with the latest block
of data on Blockchain. The Node connected to the Blockchain which helps in
the execution of a Transaction in return for an incentive is called Miners.

Disadvantages of current transaction system:


 Cash can only be used in low amount transaction locally.
 Huge waiting time in the processing of transactions.
 Need to third party for verification and execution of Transaction
make the process complex.
 If the Central Server like Banks is compromised, whole System is
affected including the participants.
 Organization doing validation charge high process thus making the
process expensive.
Building trust with Blockchain:
Blockchain enhances trust across a business network. It’s not that you can’t
trust those who you conduct business with its that you don’t need to when
operating on a Blockchain network.
Blockchain builts trust through the following five attributes:
 Distributed: The distributed ledger is shared and updated with
every incoming transaction among the nodes connected to the
Blockchain. All this is done in real-time as there is no central server
controlling the data.
 Secure: There is no unauthorized access to Blockchain made
possible through Permissions and Cryptography.
 Transparent: Because every node or participant in Blockchain has
a copy of the Blockchain data, they have access to all transaction
data. They themselves can verify the identities without the need for
mediators.
 Consensus-based: All relevant network participants must agree
that a transaction is valid. This is achieved through the use of
consensus algorithms.
 Flexible: Smart Contracts which are executed based on certain
conditions can be written into the platform. Blockchain Network can
evolve in pace with business processes.
Benefits of Blockchain Technology:
 Time-saving: No central Authority verification needed for
settlements making the process faster and cheaper.
 Cost-saving: A Blockchain network reduces expenses in several
ways. No need for third-party verification. Participants can share
assets directly. Intermediaries are reduced. Transaction efforts are
minimized as every participant has a copy of shared ledger.
 Tighter security: No one can temper with Blockchain Data as it
shared among millions of Participant. The system is safe against
cybercrimes and Fraud.

What is inside a blockchain?


A blockchain is a chain of blocks connected to each other. A block consists
of four parts:
 Previous Hash
 The timestamp
 Nonce
 Merkle tree root
Figure – A block in a blockchain
Each block contains a cryptographic hash of the data of the previous block.
The nonce is calculated by the miners by solving cryptographic puzzle to
propose the next block in the chain. It is known as proof of work. The
blockchain is said to be immutable because of its cryptographic properties.
But this does not mean that changing the data is impossible. It means that it
is extremely hard to change the data and any change can be easily detected.
A merkle tree is a binary tree with hash pointers. A merkle tree is a structure
that allows for efficient and secure verification of content in a large body of
data. The advantage of using merkle trees is that proving membership
requires O(logn) steps. Also, in a sorted merkle tree, non-membership can
also be proved in O(logn) steps. The first block is known as the genesis
block.
Advantages of Blockchain Now, what is the need for using blockchains.
Blockchains are expected to be implemented by most businesses because of
the several benefits it provides. The blockchain eliminates the need of a third
party between two entities that are willing to exchange something. This
saves time as exchanges can be done without any outside interference. It
saves money as it reduces overhead and cost of intermediaries. It reduces
risk of tampering, fraud and cyber crime due to its immutable nature. There
is no need to trust a third party now as the records are stored in distributed
ledgers. It has several other advantages specific to the use case it is applied
to.
Types of Blockchain There are different types of blockchains possible in
the ecosystem.
1. Public – A public blockchain is also known as permission-less
blockchain. Here, everyone can be a part of this blockchain and can
participate by running as a node, by mining a block or by making
transactions in the blockchain. Bitcoin and Litecoin are examples of
public blockchains.
2. Private – A private blockchain is also known as permissioned
blockchain. Here, there are restrictions on the participation as only
selected individuals or member of an organisation can be a part of
the blockchain. Multichain and Hyperledger projects (Fabric,
Sawtooth) are examples of private blockchain.
3. Consortium – A consortium blockchain are said to be partially-
decentralised or semi-decentralised. It is controlled by a group of
organisations unlike one organisation as in private blockchain. The
member organisations has the authority to participate by running as
a full node, by mining etc. R3 and EWF (Energy Web Foundation)
are examples of consortium blockchain.

Case studies for Blockchain Technology


1. Smart cards are used by Decentralized Autonomous Organizations
(DAO) – There is no central management, but the smart contracts
contain rules that describe how the company should operate. The
organization’s management must be decentralised, resulting in a
requirement for permissionless blockchains.
2. E-Voting-Privacy is one of the most essential public demands for E-
Voting, as votes must be anonymous in order to avoid intimidation.
However, in order to maintain the integrity of the votes, public
verifiability is required. Because there are so many parties engaged
in voting and they don’t trust each other, using blockchain
technology is one of the more reasonable answers.
3.
Proof of Burn
Proof of Burn (PoB): With PoB, instead of investing in expensive hardware equipment,
the validators follow the following approach: They burn coins by sending them to an
addressfrom where they are irretrievable.

You might also like