What is a Block
A blockchain is a chain-like storage structure formed by interconnecting blocks according to their respective chronological order of generation, and a block is the basic data storage unit in this structure.
What is blockchain? What are the characteristics of blockchain? Please refer to the "What is Blockchain" section.
As the basic structural unit in the blockchain structure, a block consists of a "block header" that contains the identity information of the block itself and a "block body" that contains the database information. Compared with the traditional database structure, the block body is similar to the specific content of the database, while the block header is similar to the page number used to locate the location of the data.
What Is a Block Header? What Is the Hash Function?
A block header primarily contains the encrypted digest of all data from the previous block, the generation time of the current block, and the encrypted digest of the current block's body.
The encrypted digest is generated using a one-way encryption algorithm commonly used in the blockchain industry, which we usually refer to as Hash Function. Its operation is similar to summarizing and abstracting given content. The reason it is called a one-way encryption algorithm is that when we know all the data contained in the previous block, we can easily generate the digest. However, if we only have a digest, it is very difficult to accurately deduce all the data from the previous block. We refer to the value generated by hashing a given piece of data using a hash algorithm as the "Hash Value".
To learn more about the principles, techniques, and operation of hash algorithms, please refer to Investopedia.
Through the encryption provided by the hash function, later-generated blocks always need to depend on data from the previous block to generate the block header. Therefore, blockchain implements a chain-like structure where blocks are connected end to end. At the same time, when a piece of data is recorded in a certain block, it will continuously be combined with other data and encrypted into a new hash value, which is recorded in subsequent blocks. The blockchain also enhances the difficulty of tampering with data in this way.
Do you remember when we introduced the blockchain and mentioned "blocks connected to each other according to their generated time order"? This statement is not entirely accurate because blocks are actually linked through hash algorithms and block header structures. However, because later-generated blocks always depend on data from previously generated blocks, they indirectly form a time-ordered arrangement.
What Is a Parent Block? What Is a Genesis Block?
In the blockchain industry, we generally refer to the previous block of a certain block, i.e., the block that is included in the block header and encrypted through the hash function, as the Parent Block. When a blockchain has not yet generated its first block, because there is no parent block, subsequent blocks cannot be generated. At this time, the founding team of the blockchain generally generates the first block of the blockchain, which does not contain the hash value of any parent block. We call this block the Genesis Block. The data in the genesis block will be encrypted and recorded in all subsequent blocks of the blockchain.
For example, on January 3, 2009, Satoshi Nakamoto generated the genesis block of the Bitcoin network on a server located in Helsinki, Finland, marking the official birth of the Bitcoin network. Nakamoto left a message on this block that read, "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks."
What else do you want to learn?