Inside the chain of blocks

Apr 28, 2024 1:13:57 AM

A blockchain is a cryptographic chain of linked blocks, also known as a ledger. Blocks can be considered as pages on this ledger, numbered in sequence, and connected in a chain structure. This interconnection between blocks prevents tampering since any changes made to a block will impact all the subsequent blocks in the chain.

The first blockchain block is the genesis block with a zero block index. The genesis block is pre-configured in the blockchain and is not added by any user. Miners or validators add subsequent blocks to the chain.

Blocks serve two primary purposes: to store transactions and establish the chain of blocks. Each block can be divided into two parts: a header and a set of transactions. The block header contains important information such as its number, creation date, the account that proposed the block, a hash digest of all transactions, and the previous block’s hash. The hash of the previous block is used to maintain the coherence of the blockchain.

In addition to the header, each block contains a series of transactions that change the state of the blockchain. These transactions can affect an account’s balance or a smart-contract state. Typically, a block contains a few hundred transactions, but this number can vary.

The size of a block and the time between blocks vary according to the blockchain protocol. For example, Bitcoin has an average block time of 10 minutes, Ethereum’s block time is fixed at 12 seconds, and Neo has an average block time of 20 seconds. The size of a block is also limited.

The blockchain serves as a cryptographically secure database that is nearly impossible to tamper with. To alter the Bitcoin blockchain, for instance, a malicious user would need to own 51% of all computing power on the network. In Ethereum, it would be necessary to spend billions of dollars. In Neo, validators are pre-selected by the community, and blocks are considered finalized at the time of minting, making it highly secure.

Most blockchains bundle transactions into blocks, but it is not mandatory. Blockchains can also cryptographically link transactions without grouping them into blocks, though technically, this is not a blockchain. Hedera and Ripple are examples of blockchains without blocks.