How are blocks linked in Blockchain

Chandan | web3 Research
3 min readJul 30, 2023

--

In Simple Terms:

Imagine a blockchain as a chain of blocks, where each block is like a container holding a group of transactions. These blocks are linked together, forming a continuous chain.

The linking process is like connecting the blocks one after another. When a new block is created, it contains some new transactions along with a special code called a “hash” of the previous block. This hash is like a unique fingerprint of the previous block.

So, the new block has the hash of the previous block, and when another block is created after it, it will have the hash of this new block. This chain of blocks with their hashes creates a secure and unbroken connection. If someone tries to change the data in any block, the hash of that block will change, affecting all the subsequent blocks, making it easy to spot any tampering.

In Depth:

A blockchain is a distributed ledger that consists of a sequence of blocks, where each block holds a batch of verified and timestamped transactions. The process of linking these blocks is essential for maintaining the integrity and security of the entire blockchain.

Here’s how blocks are linked in more detail:

  1. Block Structure: Each block contains three essential components: a. A header: This contains metadata like the block’s timestamp, a unique identifier called a “nonce,” and the cryptographic hash of the previous block’s header. b. Transactions: These are the actual data, like the digital signatures of users involved in a financial transaction or any other relevant information depending on the blockchain’s purpose. c. The previous block’s hash: This is a unique cryptographic hash (a fixed-size string of characters) generated from the header of the previous block.
  2. Hashing and Linking: When a new block is created and needs to be added to the blockchain, it first gathers a group of valid and unconfirmed transactions. The block’s header is then created, containing the current timestamp, a unique random value called a nonce, and the hash of the previous block’s header.
  3. Mining (Proof of Work): In a PoW-based blockchain like Bitcoin, miners compete to find a nonce that, when combined with the other block data, produces a specific pattern of leading zeros in the resulting hash. This process is computationally intensive and requires a lot of trial and error until a valid nonce is found.
  4. Consensus and Adding to the Chain: Once a valid nonce is found and the block is created, the new block is broadcast to the network. Other nodes (miners or validators) verify the block’s validity before adding it to their own copy of the blockchain.
  5. Continuity and Tamper Resistance: Now, the newly added block is linked to the previous block because it contains the hash of the previous block’s header. This linking creates a strong, tamper-resistant connection between the blocks. Changing the data in any block would modify its hash, and since the next block depends on the previous block’s hash, it would cause a domino effect, invalidating all subsequent blocks.
  6. Finality and Immutability: As more blocks are added to the chain, the transactions within the blocks become more and more difficult to alter because tampering with one block would require recalculating the hashes for all subsequent blocks, which is practically impossible due to the computational power needed.

This linked structure, combined with cryptographic hashing and consensus mechanisms, ensures that a blockchain is immutable, secure, and transparent, making it an ideal solution for recording and verifying various types of data and transactions.

--

--

Chandan | web3 Research
Chandan | web3 Research

Written by Chandan | web3 Research

Researching the frontier through on-chain data in Layer 1/2s, DeFi, and modular ecosystems.

No responses yet