A block is a data structure that is part of a larger computer filing system called blockchain. The individual blocks contain a recording of all transactions that were done in a certain period of time. Depending upon the speed of the network, the blocks will garner transactions until the block time is up or there is no room for additional data. Here is where block size discussion take place.
Blocks become permanent records. They initially accumulate the transactions not yet validated by the block producers. Once validation takes place, the block is closed, not allowing more transactions.
Another step is taking where the blocks are linked together, via hash pointer, creating a "chain".
Information In A Block
- Magic number: a value that acts to identify the block within the cryptocurrency network.
- Block size: the limits on what the block can accept
- Block header: block information
- Transaction counter: how many transactions were placed in that block
- Transactions: the breakdown of what transactions were included
There has to be consensus to add a block to the chain. This means that all block producers have to have the same information. It is a security feature which prevents unauthorized changes to the block data. When it comes to the money aspect of blockchain, this means that ledger is immutable.
Blockchains use different consensus mechanisms to arrive at agreement. There are also ways to determine who is able to produce blocks and, if necessary, in what order.
The common types of blockchain consensus are:
- Proof-of-Work (PoW) - Bitcoin and Litecoin
- Proof-of-Stake (PoS) - Ethereum
- Delegated-Proof-of-Stake - Hive
While each system differs in how it is achieved, each incentivizes node operators to maintain the network. There is a block reward offered to the producer that validates and adds the transaction to the chain. PoW blockchains use a process called mining.
The rest is that multiple, unrelated computers around the world are running the same software, maintaining a ledger of transactions that are placed into blocks. This is similar to what banks and other financial institutions run expect those companies are fully in charge of the ledger.
This occurs when the network has enough node operations who are operating on their own, unrelated to the others. Unlike a centralized system where a company owned the servers, block producers are responsible for their own equipment. Their incentive is to operate in a fashion that enables them to keep earning the block rewards.
The blocks are part of distributed ledger technology (DLT) as the information generated is written to the database by a number of different participants. This is spread over different companies, individuals, and geographic areas.
The distribution of the coins can impact the decentralization of the system. Under Proof-of-Stake and Delegated-Proof-of-Stake systems, the holdings in people's wallets can affect their influence on-chain. This applies to governance issues such as voting on block producers. Often the coin needs to be staked before it can be used for governance.
Decentralization is important to prevent a 51% attack. This is where an individual (or group) controls enough to be able to rewrite what is in any block. Here we have a situation where transactions can be reverse, changing account balances. This is akin to a bank freezing your account or simply charging a late fee. They control the ledger so changes can be made.
Blocks are designed to be immutable. For this to exist, the system needs to be able to withstand an attack to try and take over the writing to the blocks.