Ethereum Building---Initializing the founding block

Source: Internet
Author: User
Tags hash json

Initialize a founding block: Geth-datadir dataname init genesis.json
Genesis.json file contents:
{
"config": {
"Chainid": "Homesteadblock": 0,
"Eip155block": 0,
"Eip158block": 0
},
"Coinbase": "0x000000000000000000000000 0000000000000000 ",
" difficulty ":" 0x40000 ",
" Extradata ":" ",
" Gaslimit ":" 0xFFFFFFFF ",
" nonce ":" 0 x0000000000000042 ",
" Mixhash ":" 0x0000000000000000000000000000000000000000000000000000000000000000 ",
" Parenthash ":" 0x0000000000000000000000000000000000000000000000000000000000000000 ",
" timestamp ":" 0x00 ",
" Alloc ": {}
}

Mixhash : Hash used with nonce for mining, generated by a portion of the previous block. Note that he and the nonce settings need to meet Ethereum's yellow paper, 4.3.4. Block Header Validity, (44) The conditions described in the chapter:
nonce : Nonce is a 64-bit random number for mining, note that he and Mixhash settings need to meet ethereum yellow paper, 4.3.4. Block Header Validity, (44) The conditions described in the chapter.
Difficulty : The difficulty of setting the current block, if the difficulty is too large, the CPU is difficult to mine, set a smaller difficulty
Alloc : The number of ethereum used to provision the account and account, Because the private chain mining is relatively easy, so we do not need to pre-set a coin account, the need to create their own can be.
Coinbase : The miner's account, please fill in the blanks
timestamp : Set the timestamp for the Genesis block
Parenthash : The hash value of the previous chunk, because it is a Genesis block, so this value is 0extraData: additional information, fill in, can fill your personality information, must be 16 binary bit string
gaslimit : This value sets the total consumption limit for gas, which is used to limit the sum of the transaction information that the block can contain, since we are the private chain, so fill the maximum.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.