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

BCT Unit 2

Uploaded by

111Anonymous111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

BCT Unit 2

Uploaded by

111Anonymous111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Subject :- Blockchain Technology

Unit 2

Feature Engineering
Syllabus
1. History of Blockchain
4. Why is Blockchain important?
2. Centralized Vs. Decentralized
5. Limitations of Centralized Systems
Systems
6. Blockchain Adoption So Far
3. Layers of Blockchain
● Application Layer
● Execution Layer
● Semantic Layer
● Propagation Layer
● Consensus Layer
Centralize vs. Distributed vs. Decentralized
Introduction to Blockchain
● It is a technology that allows data to be stored and exchanged on a peer-to-peer
(P2P) basis.
● It is an open distributed ledger that record transactions between two persons
efficiently and in a verifiable and permanent way.
● Each transaction is secured with a digital signature that proves its authenticity.
Every block contains a cryptographic hash of the previous block, a time stamp
and transaction information.

Blockchain emerged from the merger of two concepts;


1. Asymmetrical cryptography, which allows the use of a paired public and private
key system
2. Distributed IT architecture (especially P2P)
Introduction to Blockchain
● The blockchain data structure is an ordered, back-linked list of blocks of
transactions.

● Blocks are linked “back,” each referring to the previous block in the chain.
● The blockchain is often visualized as a vertical stack, with blocks layered on top of
each other and the first block serving as the foundation of the stack.
● Each block within the blockchain is identified by a hash, generated using the
SHA256 cryptographic hash algorithm on the header of the block.

● The sequence of hashes linking each block to its parent creates a chain
● Going back all the way to the first block ever created, known as the genesis block
Structure of Block
● The block is made of a header, containing
metadata store in header, followed by a long list
of transactions
● Generally, the block contains more than 500
transactions.
Block in Blockchain
Block in Blockchain
The block size: The size of this field is 4 bytes and it contains the size of the block.
The block header: The size of a block header is 80 bytes. It further contains different
fields.
The transaction counter: This field contains the number of transactions and the size of
it is between 1-9 bytes.

The transactions: This field contains transactions of the block and its size is variable.
Parent Block in Blockchain
Block Header in Blockchain
Block Header in Blockchain
The header of an Ethereum block contains different fields of metadata which are listed
below.
Hash of the previous block: Every block header gives information about the previous
or parent block. This field contains the hash value of the previous block and this
reference connects all the blocks. The size of this field is 32 bytes.
Version: This field stores the version number to show software upgrades. The size of the
version field is 4 bytes.
Difficulty: The mining difficulty at the time of the block creation is stored in this field.
The concept of mining would be explained in the upcoming articles. Its size is 4 bytes.
Block Header in Blockchain
The header of an Ethereum block contains different fields of metadata which are listed
below.
Timestamp: This field contains the time at which the block was created. The size of this
field is 4 bytes.
Nonce: A nonce is a value used during the mining of the block. This field’s size is also 4
bytes.
Merkle tree root: A Merkle tree is a structure obtained from hashing the transactional
data of a block. The root of this tree is stored in the block header under this field. 32
bytes is the size of the Merkle tree root field.
Properties of Block
Properties of Block
Difficulty Property: This property gives the difficulty level of solving the puzzle
to mine the block.
Total Difficulty This property of the block tells us the total difficulty of the
Property: blockchain.

GasLimit Property: This property tells us the maximum gas allowed by the
block which in turn tells us about the number of transactions
that the block can accommodate.
Number Property: The number shows the block number in the list of blocks.

Transactions Property: This means all of the transactions contained in the block.
Properties of Block
Hash Property: This property shows the hash of the block.

ParentHash Property: This property saves the hash of the previous block.

Nonce Property: Nonce property shows the nonce value that I defined earlier.
It is a variable used in mining the block.

Miner Property: The miner property gives information about the miner of the
block. This gives the account of the block miner.
Block Identification
Block Identification
Two parameters are used for this purpose which are given below:

1. Block Hash
● Block hash is the main identification parameter of a block.
● This value is obtained by cryptographic hashing of the header of the block.
● The hashing operation is performed twice.
● The header of the block contains metadata of the block and when this data is hashed
the result is the block hash, whose size is 32 bytes.
Block Identification
Two parameters are used for this purpose which are given below:

2. Block Height
● The second parameter used for identifying a block is its height.
● As we already know that the blocks are linked together in a list type structure
starting from the genesis block.
● The genesis block is given a height 0 zero. The second block in the blockchain or
the first block after the genesis block is at height 1 and so on.
What is block Mining
● Blockchain mining is used to secure and verify transactions.

● Mining involves Blockchain miners who add transaction data to public ledger

● In the ledgers, blocks are secured by Blockchain miners and are connected to each

other forming a chain.

● Transactions are generally verified in decentralized clearing systems

● People contribute computing resources to verify the same. This process of verifying

transactions is called mining.


What is block Mining
● This mining process same as gold—mining. Gold mining requires a lot of effort and

resources, but then there is a limited supply of gold;

● Hence, the amount of gold that is mined every year remains roughly the same.

● In the same manner, a lot of computing power is consumed in the process of mining

bitcoins.

● In the words of Satoshi Nakamoto, there is only a limited supply of bitcoins. Only

21 million bitcoins will ever be created.


Task of miners
● Synching up with the network: Once a new node joins the bitcoin network, it
downloads the blockchain by requesting historical blocks from other nodes.

● Transaction validation: Transactions broadcasted on the network are validated by


full nodes by verifying and validating signatures and outputs.

● Block validation: Miners and full nodes can start validating blocks This includes
the verification of each transaction in the block along with verification of the nonce
Task of miners
● Create a new block: Miners propose a new block by combining transactions
broadcasted on the network after validating them.

● Perform Proof of Work: This task is the core of the mining process and this is
where miners find a valid block by solving a computational puzzle. The block
header contains a 32-bit nonce field and miners are required to repeatedly vary the
nonce until the resultant hash is less than a predetermined target.

● Fetch reward: Once a node solves the hash puzzle (PoW), it immediately
broadcasts the results, and other nodes verify it and accept the block.
Mining Rewards
● When Bitcoin started in 2009 the mining reward used to be 50 bitcoins

● After every 210,000 blocks, the block reward halves. In November 2012 it halved

down to 25 bitcoins.

● It was 12.5 BTC per block since July 2016. Next halving is on Friday, 12 June 2020

after which the block reward will be reduced down to 6.25 BTC per block
Types of Mining
The mining process undertaking can be divided into three categories:

1. Individual Mining
● When mining is done by an individual, user registration as a miner is necessary. As
soon as a transaction takes place, a mathematical problem is given to all the single
users in the blockchain network to solve. The first one to solve it gets rewarded.
● Once the solution is found, all the other miners in the blockchain network will
validate the decrypted value and then add it to the blockchain. Thus, verifying the
transaction
Types of Mining
2. Pool Mining
● In pool mining, a group of users works together to approve the transaction.
Sometimes, the complexity of the data encrypted in the blocks makes it difficult for
a user to decrypt the encoded data alone.
● So, a group of miners works as a team to solve it. After the validation of the result,
the reward is then split between all users.

3. Cloud Mining
● Cloud mining eliminates the need for computer hardware and software. It’s a easy
method to extract blocks.
● With cloud mining, handling all the machinery, order timings, or selling profits is
no longer a constant worry.
Layers of Blockchain
1.Application Layer
● As we know a blockchain technology is a tamperproof, decentralized, and shared
ledger technology
● So there can be multiple applications that can build on the basis of these features of
the blockchain.
● Some applications built in application layer can interface with the other layers;
therefore, the application layer is on the top of this layer suit.
● The application layer is the one where a user can code the desired functionality and
build the application for user of the application.
2.Execution Layer
● This layer handles the executions of all the instruction that were performed at the
application layer for all the nodes present on the blockchain network.

● The set of instruction could range from simple ones to multiple instructions.
● For example, smart contract is also small code that needs to be executed when some
funds need to be transferred form one person to another person.
● Now if one application is present on all the nodes of the blockchain network the
code has to be executed independently on all the nodes.
● In order to avoid the inconsistencies in the output, the execution of code on a set of
input should always produce the same output for all the nodes
3.Semantic Layer
● This layer also called as logical layer of blockchain layer suit.
● his layer deals in validation of the transactions performed in the blockchain network
and also validating the blocks being generated in the network.
● When a transaction comes up from a node, the set of instruction are executed on the
execution layer and gets validated on the semantic layer.
● Semantic layer is also responsible for the linking of the blocks created in the
network.
● As we already know each block in the blockchain contains the hash of the previous
block except the Genesis block. This linking of block needs to be defined on this
layer.
4. Propagation Layer
● A propagation layer deals with the peer-to-peer communications between the nodes
that allow them to discover each other and get synced with another node in a
network.
● When a transaction is carried out, it gets broadcasted to all other nodes in the
network.
● Also, when a node proposes a block, it will immediately get broadcast in the entire
network so that other nodes can use this newly created block and work upon it.
● However, depending upon the network capacity or network bandwidth sometimes
the propagation could occur instantly sometimes it may take a longer.
5.Consensus Layer
● This layer is the base layer for most of the blockchain systems. This main purpose
of this layer is to make sure that all the nodes must get agree on a common state of
the shared ledger.

● The layer also deals with the safety and security of the blockchain.
● There are many consensus algorithms which can be applied for generation of
cryptocurrencies like Bitcoin and Ethereum, they uses proof-of-work mechanism to
select a node randomly out of various nodes that can propose a new block.
● Once a new block is created, the block is propagated to all the other nodes to check
if the new block is valid or not with the transactions in it and based on the
consensus from all other nodes the new block gets added on to the blockchain.
Why Blockchain is Important?
Why Blockchain is Important?
BlockchainAdoptionso far
References
1. https://blockchain.oodles.io/blog/what-is-blockchain-technology/
2. https://www.theengineeringprojects.com/2021/06/structure-of-a-block-in-blockchain.html
3. https://www.tutorialandexample.com/blockchain-tutorial
4. https://erainnovator.com/layers-of-blockchain/
5. https://ebrary.net/232668/computer_science/layers_blockchain
6. https://ebrary.net/232668/computer_science/layers_blockchain
7.https://101blockchains.com/why-blockchain-is-important/
8.

Blockchain Infographic:

https://101blockchains.com/blockchain-infographics/
https://blockgeeks.com/blockchain-infographics/

You might also like