What is a Creation Document
The genesis File is a JSON file that defines the initial state of the blockchain. It can be regarded as the height of the `0` blockchain. The first block located in height, `1`, will refer to the creation World file as its parent file.
The state defined in the genesis file contains all necessary information, such as initial token allocation, creation time, default parameters, etc. Let's break down this information.
The unique identifier of the chain. The main net is 520, the test net is 530, and the network id of test-net should be different from main-net.
Block time interval
The time interval in blocks, the current 1epoch = 200block At the end of each period, the blockchain interacts with the system contract to update the active validator
The random number is a cryptographically secure proof of mining workload, which undoubtedly proves that a certain amount of calculation has been spent in determining the value of this token.
Must be at least the parent's timestamp + BLOCK_PERIOD.
The initial validator is set here
A scalar value equal to the current full chain limit of Gas spending for each block. In our case, it is high to avoid being restricted by this threshold during the test. Note: This does not mean that we needn't pay attention to the gas consumption of our contract.
Scalar value corresponding to the difficulty level applied during the discovery of the random number of this block. The testnet recommends using 0x1
The address of the system used to collect block rewards
Allows to define a list of pre-installed wallets.
The height of the block in the chain, where the creation height is block 0
The Keccak 256-bit hash value of the entire parentHash (including its nonce and mixhash). A pointer to the parent block, thereby effectively establishing the blockchain. In the case of the Genesis block, and only in this case, it is 0.
Account and Address
For ordinary users, all keys and addresses can be generated through wallets such as MetaMask, imToken, TokenPocket, etc.
Reward & Punishment