Ppt-2 Blockchain Structure
Ppt-2 Blockchain Structure
N
STRUCTURE
Athira Jayavarma
Dept. of EEE
Blockchain
Structure
Two components:
o Block header
oList of Transactions
Previous Block Hash(Parent hash)
Timestamp: The timestamp denotes the time when the block was created or added
to the blockchain. It helps establish the chronological order of blocks.
Nonce: A nonce (number used once) is a value that miners or validators modify
during the block creation process to meet certain criteria, such as the difficulty level of
the consensus algorithm.
Difficulty Target: The difficulty target is a value that defines the level of difficulty
miners or validators must meet to create or validate a block. It ensures that block
creation or validation requires a certain amount of computational work, contributing
•The difficulty is adjusted periodically (usually every few blocks) to ensure that the
average time between blocks remains relatively constant over time.
•The difficulty level and the target value have an inverse relationship. The lower the
target value, the higher the difficulty, and the more repetitions of the hash function
a miner must go through to find a valid block hash.
•Higher Difficulty: A lower target value means miners need to find a block hash with
more leading zeros, which is more challenging. This requires more computational
effort, as miners have to try many different nonce values and hash combinations to
find a valid hash.
•Lower Difficulty: A higher target value means miners need to find a block hash with
fewer leading zeros, which is easier. This requires less computational effort, as
miners have a larger range of valid hash values they can find with various nonce
values.
Merkel Tree Root
The transactions are organized in a Merkel Tree Structure.
The root of the Merkel Tree is the verification of all the transactions.
•The Merkle root hash is a cryptographic hash that represents all the transactions
included in a block.
•It is computed by creating pairs of transaction hashes, hashing them together, and then
repeating this process until a single hash (the Merkle root) is obtained.
•Each block contains a Merkle tree (also known as a binary hash tree) of all its
transactions, with the Merkle root at the top.
•Miners must calculate the Merkle root hash for the selected transactions and include it
in the block header.
•This Merkle root serves as a summary of all the transactions included in the block. By
having the Merkle root hash, other nodes on the network can efficiently verify that the
transactions are valid and have not been tampered with.
Merkle trees benefits:
•Reduced storage
•security
Block Header
Distributed
Consensus
A procedure to reach in a common agreement in a
decentralized platform
Why consensus?
Validity-The value or decision agreed upon should be a valid and legitimate value within the system's rules
Integrity- The consensus process should be secure and protect against unauthorized modifications or
tampering of data. Nodes should not be able to maliciously manipulate the agreed-upon value.
The main idea behind PoW is to require participants, known as miners, to solve a computational
puzzle in order to add new blocks to the blockchain.
Cryptocurrencies like Litecoin, and Bitcoin are currently using PoW. Ethereum was using PoW
mechanism, but now shifted to Proof of Stake(PoS).
The Proof of Work consensus algorithm involves solving a computationally challenging puzzle in
order to create new blocks in the Bitcoin blockchain.
steps
1. Transactions are broadcasted to the network and collected into a block.
5. Once the solution is verified, the winning miner adds the block, to the
blockchain. The block contains the validated transactions, a timestamp, and the
hash of the previous block, which links the new block to the existing chain.
6. The other nodes in the network update their copy of the blockchain to include
the new block and continue the process, starting from step 1.
The proof of work lies in the fact that miners need to invest computational
resources (computing power and energy) to solve the puzzle.
This ensures that adding new blocks to the blockchain requires real-world effort,
making it difficult for malicious actors to manipulate the system.
As long as the majority of miners are honest and control more computational
power than any potential attacker, the blockchain remains secure.
This reward will get reduced by half its current value with time.
Security, incentives for participants are some of the advantages ,moreover, High
energy consumption,hardware requirements,scalabilty are some of the challenges.
Proof of Stake (PoS)
•Proof of Stake (PoS) is a consensus algorithm used in blockchain networks as an
alternative to Proof of Work (PoW).
2) Selection of Validator: The selection of the validator who gets to create the next block is usually
done through a deterministic process that takes into account the amount of stake held by each
participant. The more cryptocurrency a validator holds, the higher the probability of being selected
as the block creator.
3) Block Creation: The chosen validator creates the next block by adding transactions to the
blockchain. The validator verifies the transactions and proposes the new block to the network.
4) Block Validation: Other validators in the network then validate the proposed block and check for its
correctness. They ensure that the proposed block follows the consensus rules, including the
validity of transactions and the order of blocks.
5) Consensus and Rewards: If the proposed block is validated by a sufficient number of other
validators and reaches consensus, it is added to the blockchain. The validator who created the
block is rewarded with transaction fees and newly minted cryptocurrency as an incentive for their
participation and contribution to the network.
6) Block Finality: PoS systems usually have a process for finalizing blocks, which adds an additional
layer of security and ensures that blocks cannot be easily reversed or modified. Finality helps
achieve faster confirmation times for transactions.
•Energy efficiency,Scalability are some of the advantages
• It was introduced to address some of the limitations of traditional PoS, such as scalability
and potential centralization.
•In DPoS, token holders in the network can vote to elect a limited number of delegates or
"witnesses."
•These witnesses are responsible for producing blocks and validating transactions on behalf
of the network.
II. Delegate Selection: The voting process determines which participants become
delegates. Those with the highest number of votes are typically elected as witnesses.
The weight of a vote can be proportional to the stake held by the voter, although
some DPoS implementations may consider other factors like reputation or expertise.
III. Block Production and Validation: The elected delegates take turns in producing blocks and
validating transactions. Each delegate has a predefined time slot during which they are
responsible for creating a block. They include verified transactions, timestamp the block, and
propose it to the network.
IV. Block Confirmation: Once a block is proposed, other delegates in the network validate its
correctness and confirm its validity. This consensus process helps ensure that only valid
transactions are added to the blockchain.
V. Block Finality: DPoS systems often employ mechanisms for quick finality of
blocks, reducing the chances of chain reorganizations or forks. This means that
confirmed blocks are unlikely to be reversed, providing faster transaction
confirmations and improved network efficiency.
VI. Rewards and Incentives: Witnesses or delegates are typically rewarded for their
block production and validation activities. They may receive transaction fees
associated with the blocks they produce, and some DPoS systems may also
allocate a portion of newly minted tokens as rewards.
•Scalability, Energy efficiency, Governance and flexibility are some of the advantages
•Byzantine faults refer to arbitrary and malicious behavior, such as sending conflicting
information, delaying or dropping messages, or colluding to disrupt the system.
•PBFT was introduced by Castro and Liskov in 1999 and has been widely used in various
blockchain and distributed systems to ensure the integrity and consistency of
replicated state machines.
• Unlike Proof of Work (PoW) or Proof of Stake (PoS), where participants compete based
on computational power or stake, PoA relies on the identity and reputation of the
validators.
PoA Working:
a) Validators: A limited number of validators or authorities are pre-selected and known in
advance. These validators are typically trusted entities or individuals who have been
authorized to participate in block validation and consensus.
b) Block Validation: Validators take turns proposing and validating blocks. Each validator has
the authority to create blocks and verify the transactions within those blocks.