What is the block?

Blocks in blockchain systems are data packets (files with a fixed structure) that contain information about transactions that have occurred in the network that have not yet been included in the previous blocks.

In addition to the transaction data, the blocks contain the elements necessary for forming the chain of blocks: the block index, the hash of the previous block, the hash of the current block, the timestamp, and any other elements provided by the developers (for example, the value “nonce” Mining number to detect new blocks in PoW-systems).

After the block is included in the blockchain (added to the end of the chain), it can not be changed. Each new block contains the hash of the previous block, that is, each block contains information about all the transactions that occurred in the previous blocks. That is why the data in the blockchain account cannot be tampered with or changed, since any change in any block will make the chain invalid, that is, it will be discarded by the network.

An example of a block structure can be conditionally represented in the following form:

┌─────────────────────────────────────────────┐
Block 0
─────────────────────────────────────────────
│ Index: 0
│ Hash sum of the previous block: 0
│Timestampp: 16:55 01/12/2017
│ Transaction data: {data_block_0}
│ The hash is the sum of the current block: 0xbc12c … b7
│ Number of nonce: 23912752223
─────────────────────────────────────────────┘



┌──────────────────────────────────────────────────────────────────────────────────────────────
Block 1
───────────────────────────────────────────────────────────────────────────────────────────
│ Index: 1
│ The hash is the sum of the previous block: 0xbc12c … b7
│ Timestamp: 17:55 01/12/2017
│ Transaction data: {data_block_1}
│ The hash is the sum of the current block: 0xde31e … u3
│ The number of nonce: 33632927884
──────────────────────────────────────────────────────────────────────────────────────────



┌──────────────────────────────────────────────────────────────────────────────────────────────
Block n
───────────────────────────────────────────────────────────────────────────────────────────
│ Index: n
│ The hash is the sum of the previous block: 0x n-1
│ Timestamp: 18:55 01/12/2017
│ Transaction data: {data_block_n}
│ The hash is the sum of the current block: 0xff794 … 9a
│ Number of nonce: 12691622581
──────────────────────────────────────────────────────────────────────────────────────────

Index (Block No.): What is the current block? (the very first block, called the genesis-block, will have the index 0)
The hash is the sum of the current block: the result of processing the hash function of the data of the current block (allows to confirm whether the current block is authentic)
The hash is the sum of the previous block: the result of processing the hash function of the data of the previous block (allows to confirm whether the previous block is authentic)
Timestamp: when the current block was included in the blockchain?
Transaction data: transaction data or information to be entered in a blockchain
The number of nonce: the random number found during the mining process