Block Composition

A blockchain consists of a series of interlinked blocks of data. Each data block contains a certain amount of transaction data, a hash of the previous block, a timestamp, and other metadata. This data is encrypted and verified to form a complete block.Nodes in the blockchain network link these blocks in chronological order to form a growing chain data structure, ensuring data security and consistency across the network.

Block-head

The block header contains the key information about the block that must be made public, listed below:

1. Random Number Nonce: Nonce is used to ensure prevention of double-spend problem/branch chain fork problem sent by the Proof of Work(PoW) consensus algorithm to adjust the random number so that the block header hash value meets a specific difficulty condition.

2. Mixhash: Mixhash constructs are used to en- sure verifiable computation of multiple signatures, providing additional security to the blockchain. For example, in Ethernet, Mixhash is used to prevent long-range attacks and ensure the uniqueness of each block.

3. Transaction Hash TxRoot: TxRoot is used to ensure that the order and structure of transactions are unique in the MSM. A Merkle tree root node is generated by hashing the hash values of all transac- tions and stored in the block header.

4. Other security fields: for example, timestamp (Ts) records the time of block generation and en- sures the timing of the block chain. The hash of the previous block (preH) is used to link the blocks together to form the blockchain structure.

Thus the new block hash can be expressed as [3]:

H(n) = H(H(n โˆ’ 1),TxRoot,Ts,Nonce)(22)

where H denotes the hash function, n denotes the height of the current block, H(n) denotes the hash value of the current block, H(n โˆ’ 1) denotes the hash value of the previous block, TxRoot denotes the hash value of all the transaction information contained in the current block, Ts denotes the timestamp, and Nonce denotes a random number. It is worth noting that the hash function H is a one- way function in this formula, where the original data cannot be reversed by the hash value, thus ensuring that the information in the block is not tampered with. At the same time, the introduction of Nonce increases the computational complexity and makes the blockchain network more secure and reliable.

Block-body

The block body contains all the transaction records, and each transaction consists of the following parts:

1. Transaction initiator signature: The transaction initiator digitally signs the transaction to ensure the security and non-repudiation of the transaction.

2. TargetAddress: The address of the recipient of the transaction.

3. Transaction Data TxData: Transaction data con- tains all smart contract releases, computational op- erators call stacks, data stack routing information, and custom binary data. These data are used to guide the execution of smart contracts and handle the business logic on the chain.

4. Value: The number of tokens (amount) involved in the transaction.

In summary, the basic block structure contains two parts, the block header and the block body, which carry the transaction records and key infor- mation in the blockchain network. This structure ensures the integrity, security and uniqueness of blockchain data and provides a reliable infrastruc- ture for decentralized distributed applications.

Last updated