decrypt101
SocialOpen ProjectsSupport me My Resumes
  • Preface
    • Motivation
    • Roadmap’s
  • Introduction to Blockchain
    • A Brief History
    • Growth of Blockchain
    • Structure of Blockchain
    • Types of Blockchain
    • Key Technologies of Blockchain
    • Features of Blockchain
    • How Blockchain Works ?
    • Implementation of Blockchain
    • Summary
  • Components of Blockchain Architecture
    • Distributed Ledger
    • Blocks
    • Transaction
    • Chain
    • Peer-to-Peer Network
    • Blockchain Layers
    • Off-Chain & On-Chain
    • Wallet
    • Mining
    • Tokens
    • Assets
    • State Channels
    • Sidechains
    • Oracles on Blockchain
    • Atomic Swaps
    • Decentralized Identity (DID)
    • Blockchain Data Storage
    • Interoperability
    • Data structures for Scaling Blockchain
    • Maximal Extractable Value (MEV)
  • Consensus Mechanisms
    • Proof of Work (PoW)
      • Implemation Using Rust
    • Proof of Stake (PoS)
    • Proof of Burn (PoB)
    • Proof of Capacity (PoC)
    • Proof of Activity (PoAc)
    • Proof of Weight (PoWe)
    • Proof of Luck (PoL)
    • Proof of Ownership (PoO)
    • Proof of Existence (PoE)
    • Proof of Believability (PoBe)
    • Proof of History (PoH)
    • Proof of Authority (PoA)
    • Proof of Elapsed Time (PoET)
  • Cryptographics
    • Encryption & Decryption
      • Symmetric Encryption
      • Asymmetric Encryption
      • Key Management and Exchange
      • Implementation
    • Cryptographic Hashing
      • Secure Hash Algorithms (SHA)
      • Message Digest Algorithms
      • Ethash
      • Blake2
      • SCrypt
      • RIPEMD-160
    • Digital Signature
      • Digital Signature Algorithms
      • Digital Signature in Blockchain
    • Zero-Knowledge Proofs (ZKPs)
      • Types of Zero-Knowledge Proof and Protocols
      • A Case Study of Polygon Platform
    • Multi-Party Computation (MPC)
    • Cryptanalysis
    • Practical Implementation
  • Decentralized Application (DApp)
    • Design and UX in Web3
  • Smart Contract
    • Development Tools
    • Solidity
    • Testing Smart Contract
    • Developing Smart Contract
    • Interacting & Deploying with Smart Contract
    • Verifying Smart Contracts
    • Upgrading Smart Contracts
    • Securing Smart Contract
    • Smart Contract Composability
    • Testnet and Mainnet
    • Blockchain Platform Using Smart Contract
    • Application of Smart Contract
    • Practical Implementation
  • Blockchain Platforms
    • Ethereum
      • Ethereum Virtual Machine (EVM)
      • ETHER and GAS
      • Ethereum transaction
      • Ethereum Accounts
      • Ethereum Stacking
      • Ethereum Network
      • Ethereum Scaling Solutions
      • Ethereum Use-Cases
      • Getting Started with Ethereum
      • Ethereum Ecosystem and Support
    • Solana
      • Solana Architecture
        • Solana Account Model
        • Solana Wallet
        • Transactions and Instructions
        • Solana Programs
        • Program Derived Address (PDA)
        • Cross Program Invocation (CPI)
        • Tokens on Solana
        • Clusters and Public RPC Endpoints
        • Transaction Confirmation & Expiration
        • Retrying Transactions
        • Versioned Transactions
        • Address Lookup Tables
        • State Compression
        • Actions and Blinks
      • Solana Developments
      • Solana Client
      • Advanced Solana
      • Solana Scaling and Performance Architecture
      • Solana Solutions and cases
      • Practical Implemenation
    • Binance Smart Chain (BSC)
      • Create a BEP20 Token
    • Hyperledger Fabric
    • Cosmos
    • Polkadot
    • Quorum
    • Polygon
    • Algorand
    • Corda
    • Avalanche
    • TRON
    • Summary
  • Decentralized Finance (DeFi)
    • DeFi Components
    • DeFi Protocols
    • DeFi Platforms
    • DeFi Risk Classification
      • Infrastructure-layer Attacks
      • Smart Contract Layer-attacks
      • Application Layer-attacks
      • DeFi Risks
    • DeFi and Blockchain
    • DeFi Impact
  • Decentralized Ecosystem and Digital Innovation
    • Layer 2 Scaling Fundamental
    • Tokenomics
    • Cryptocurrency
    • Quantative Trading
    • NFTs
    • GameFi
    • Metaverse
  • Blockchain as a Service (BaaS)
    • Building Fullstack Blockchain Platform
    • Decentralized Digital Identity
    • Build a Cryptocurrencies Exchange
    • Play-to-Earn Gaming
    • Solana Token Airdrop Manager
    • Smart Contract Development on Solana with Rust
    • Quantitative Trading Platform
    • Insurances protocols
    • Flash Loans
    • Asset Management
    • Tokenized Derivatives
    • Automated Market Makers (AMMs)
    • Staking
    • Lending and Borrowing Platforms
    • Yield Farming
    • Stablecoin System
    • Security Token Offerings (STOs)
    • Initial Coin Offerings (ICOs)
    • On-Chain Voting Systems
    • Decentralized Autonomous Organizations (DAOs)
    • NFT Marketplaces
    • Provenance Verification
    • Supply Chain Tracking
    • Commodities Tokenization
    • Real Estate Tokenization
    • Digital Certificates
    • KYC (Know Your Customer)
  • Blockchain Development Across Languages
    • Blockchain using Go(Golang)
    • Blockchain using Rust
    • Blockchain using Python
    • Blockchain using Cairo
  • Distributed Systems & Infrastructure Technology
    • Classification of Distributed Systems
    • Networked systems versus Distributed systems
    • Parallel systems vs Distributed systems
    • Distributed versus Decentralized systems
    • Processes of Distributed Systems
    • Architecture of Distributed systems
    • Infrastructure Technologies
  • Distributed System Patterns
    • Distributed Agreements Algorithms
      • HoneyBadgerBFT
    • Data Replications
    • Data Partition
    • Consistency
    • Distributed Time
    • Cluster Management
    • Communication between Nodes
    • Fault Tolerance and Resilience
      • How to design better fault tolerance systems
      • Resilience Patterns
    • Coordination systems
      • Clock synchronization
    • Security
      • Trust in distributed systems
      • Design of Principal Security
      • Security threats, policies, and mechanisms
      • Authentication and Authorizations
      • Cryptography
      • Monitoring in Security
  • Distributed System Design
    • Page 1
    • Distributed Shared Memory
    • Distributed Data Management
    • Distributed Knowledge Management
    • Distributed Ledger
  • FAQs
  • Support and Community
Powered by GitBook
On this page
  • Type of Blockchain Network
  • Genesis Block
  • Valid Block
  • Orphan Block
  • Types of Blockchain Nodes
  1. Introduction to Blockchain

Structure of Blockchain

PreviousGrowth of BlockchainNextTypes of Blockchain

Last updated 8 months ago

Blockchain can be structured using a number of blocks in which nodes authenticate the transactions that need to be stored in the block.

The block header contains various fields such as hash from the previous block, Timestamp, Version no., Nonce, and Merkle root. Blockchain Technology can be defined using three crucial concepts, which are blocks, nodes, and miners.

Miners are basically participants in the blockchain network whose main task is to verify the new arriving transactions, and they get the reward to validate the transaction that needs to be added to the blockchain. Miners solve a complex cryptographic puzzle to mine the new transactions in blocks that can be further appended to the blockchain, So, these fields of the block header can be defined as follows:

  • Previous block hash function: It contains 32 bytes of block header. This field contains the hash of the previous block, which can be computed using the block header of the previous block using the cryptographic hash function. Double SHA- 256 cryptographic algorithm is used for generating hash value.

  • Timestamp: It contains 4 bytes of block header. It indicates the time for the creation of the block, more accurately the time when the miner started hashing the header.

  • Version no.: It contains 4 bytes of block header. Version no. denotes the version a particular block is utilizing. Blocks are linked with each other using different blockchain versions such as Blockchain version 1.0 for storing the cryptocurrencies, Blockchain version 2.0 is used to execute smart contracts, i.e., Ethereum, Blockchain version 3.0 for a decentralized entity, and Blockchain version 4.0 to enable a scalable and transparent network for industrial purpose

  • Nonce: It also contains 4 bytes of block header. It is basically defined as a number used only once. Nonce is a random number that miners are computing to validate the transactions. So miners have to randomly find the number, i.e., an integer between 0 and 232 as 4 bytes of nonce can have a maximum of 32 bits

  • Merkle root: Merkle tree built using hash values of various transactions. Hash values of all the transactions are combined to generate a Merkle root, which can be called as the root of the Merkle tree. Merkle root reduces the computation time while verifying the transactions as even a slight change in the transaction can be reflected in the Merkle root, which reduces the effort of verifying all the transactions in the blockchain.

As discussed earlier, blockchain can be classified using blocks, nodes, and miners. These terms interrelate with each other to validate the transactions in the blockchain network.

Validation: validators are responsible for verifying transactions and adding new blocks to the blockchain. They ensure the integrity and accuracy of the network by validating data and reaching consensus. In Proof of Stake (PoS) systems, validators are chosen based on the amount of cryptocurrency they stake, and they are rewarded for correctly validating blocks. Validators play a crucial role in maintaining the security, decentralization, and efficiency of blockchain networks by preventing fraudulent activities.

Address: an address is a unique identifier used to receive and send cryptocurrency or tokens. It’s similar to a bank account number in traditional finance, but instead of storing the tokens directly, an address represents a specific location on the blockchain where the assets are associated. It is derived from a public key and ensures the secure transfer of digital assets.

Index: an index refers to a data structure or mechanism used to optimize the retrieval and querying of blockchain data. It helps in efficiently accessing and organizing large volumes of transaction data, blocks, or addresses stored on the blockchain.

Type of Blockchain Network

Blocks in the blockchain network can be classified as follows:

Genesis Block

The initial block of any blockchain network is known as the genesis block or Block 0. In 2009, an unidentified person named Satoshi Nakamoto created the Genesis Block, i.e., the first block of the blockchain, while launching the bitcoin. Genesis block initiates the blocks, which further connect to a number of blocks extending the number of transactions in the blockchain network. The Merkle root in the Merkle tree of block header ensures that all the transactions associated with their hashes remain validated throughout the network as any modification in the transaction reflects in the Merkle root, which further notifies the blockchain about the manipulation of transactions in the blockchain to ensure the security in the network.

Valid Block

Valid blocks are already mined blocks by the miners added to the blocks in the blockchain. It means blocks have been appended to the blockchain by solving complex mathematical cryptographic hash algorithms. Valid blocks are added to the network by satisfying the criteria of the consensus mechanism, further improving the security of the network.

Orphan Block

The consensus mechanism verifies the blocks whether they can be appended to the blockchain or not. According to the consensus, if all the nodes in the network agree to the addition of a new block, then they are the valid blocks, but the rest of the blocks are orphan blocks. There can also be a scenario where a number of miners in the network are competing to get the reward for mining the valid blocks simultaneously, or there can be the involvement of any malicious attacker to add the invalid block. Still, the blockchain only accepts the valid block or the longest chain of blocks, making it secure and scalable for the network, and invalid blocks can be declared as orphan blocks.

Conclusion

In blockchain networks, different types of blocks serve specific roles in maintaining the integrity and security of the system. The Genesis Block marks the starting point of the blockchain, forming the foundation for all subsequent blocks. By leveraging cryptographic hashes and structures like the Merkle root, it ensures that any tampering with transaction data is detected, preserving the chain's validity. Valid blocks, appended through consensus and cryptographic proof, form the continuous, secure chain that powers the blockchain. However, orphan blocks, which do not meet the criteria of consensus, are excluded from the main blockchain. This system of block validation and exclusion helps maintain the security, immutability, and scalability of blockchain networks, ensuring that only legitimate blocks are added while invalid or competing blocks are disregarded.

Types of Blockchain Nodes

All the computers expanded across the blockchain network are known as nodes.

Every time a request to add a new transaction is issued, it must be approved by all the participating nodes by checking the validity of the transaction. Once all nodes validate the transaction, voting is done to check every node’s decision about the transaction, as it may be valid or fraudulent.

Each node has a copy of the digital ledger; if the majority of the nodes say that it is a valid transaction, then it is added to the blockchain network; otherwise, it is rejected.

There are mainly two types of nodes Full nodes and Lightweight nodes. Full nodes can be further classified into Pruned nodes and Archival nodes.

Full Nodes

Full nodes play an essential role in maintaining the transactions of the blockchain. It keeps track of all the transaction records, and if there is a new transaction or any modification to the blockchain, then full nodes should agree to the modifications to reflect the changes in the blockchain. But, there can be a scenario that even if the majority of the full nodes agree to any new transactions in the blockchain, then due to some conflicting nodes whole blockchain may not work according to the proposed changes. In this case, the blockchain will be split into two blockchains in which a modified blockchain can work according to the agreement of full nodes and another blockchain, i.e., due to disagreement of conflicting nodes can work in the same old manner only. Full nodes can be further classified into pruned nodes and archival nodes, which can be described as follows:

Pruned Nodes- Pruned nodes are full nodes which have limited memory storage to maintain the transactions in blocks. Although, there is no limit to add blocks to the blockchain satisfying the consensus mechanism, these nodes can’t hold the blocks exceeding the limit of their storage.

Archival Nodes- Archived nodes work in a similar way as full nodes that contain all the transaction records which should satisfy the criteria of the consensus mechanism. But, there is a difference that archived nodes also contain the oldest blocks, i.e., all the previous blocks of the blockchain, but these blocks are not considered in the case of pruned nodes. Therefore, archival nodes utilize more space of blockchain than pruned nodes.

  • Master Nodes- Master nodes can be defined as the type of archival full nodes that do not have any authority to append data blocks to the blockchain. The main task of these nodes is to validate the transactions and keep track of these transaction records.

  • Mining Nodes- As discussed earlier, the miners in the blockchain compete to mine or validate the transactions by solving the mathematical cryptographic puzzle fulfilling the consensus mechanism for security purposes. So, the nodes required to compute this complex puzzle by mining the blocks of valid transac- tions are known as mining nodes.

  • Staking Nodes-Similar to mining nodes, staking nodes mainly focus to satisfy the consensus mechanism in which all participating nodes should agree to the same decision for adding the new transaction to the blockchain. For staking nodes, a consensus mechanism, i.e., Proof-of-Stake is used so that authentic transactions can be appended to the blockchain, which will be discussed in further chapters.

  • Authority Nodes- In the open decentralized block chain network, any users can access the network to add their transactions, but there can be some malicious or faulty nodes trying to access the network that can be a threat to the security of the network. Due to these security issues, authority nodes are required to authenticate only validated transactions for the blockchain network.

Lightweight Nodes: Lightweight nodes accept data blocks of requisite and essential information, i.e., they only keep track of block headers of blockchain. So, if there is a request to access the block that is not considered by the lightweight nodes for faster transactions, then data can only be retrieved by considering the whole blockchain. Lightweight nodes facilitate faster transactions without considering the complete node, making it less flexible and reliable.

Fig. 1
Fig 2. Node accept Longest chain in the network
Fig. 3: Types Of Blockchain Nodes