Creating The Genesis Block
I would like to use puppeth
to create genesis block metadata.
$ cd /Users/yen/Desktop/
$ /Users/yen/Downloads/geth-alltools-darwin-amd64-1.6.7-ab5646c5/puppeth
+-----------------------------------------------------------+
| Welcome to puppeth, your Ethereum private network manager |
| |
| This tool lets you create a new Ethereum network down to |
| the genesis block, bootnodes, miners and ethstats servers |
| without the hassle that it would normally entail. |
| |
| Puppeth uses SSH to dial in to remote servers, and builds |
| its network components out of Docker containers using the |
| docker-compose toolset. |
+-----------------------------------------------------------+
Please specify a network name to administer (no spaces, please)
> poaOfYen
Sweet, you can set this via --network=poaOfYen next time!
INFO [08-15|10:43:00] Administering Ethereum network name=poaOfYen
WARN [08-15|10:43:00] No previous configurations found path=/Users/yen/.puppeth/poaOfYen
What would you like to do? (default = stats)
1. Show network stats
2. Configure new genesis
3. Track new remote server
4. Deploy network components
> 2
Which consensus engine to use? (default = clique)
1. Ethash - proof-of-work
2. Clique - proof-of-authority
> 2
How many seconds should blocks take? (default = 15)
>
Which accounts are allowed to seal? (mandatory at least one)
> 0x683f257a240789cc8ffe6f0b4f17dc57405b6ce6
> 0x
Which accounts should be pre-funded? (advisable at least one)
> 0x683f257a240789cc8ffe6f0b4f17dc57405b6ce6
> 0x2a7a93ca16e95a6e4478bf67e33ce3a9c20bf66d
> 0x
Specify your chain/network ID if you want an explicit one (default = random)
>
Anything fun to embed into the genesis block? (max 32 bytes)
>
What would you like to do? (default = stats)
1. Show network stats
2. Save existing genesis
3. Track new remote server
4. Deploy network components
> 2
Which file to save the genesis into? (default = poaOfYen.json)
>
INFO [08-15|10:43:51] Exported existing genesis block
What would you like to do? (default = stats)
1. Show network stats
2. Save existing genesis
3. Track new remote server
4. Deploy network components
> ^C
Then I can find poaOfYen.json
on desktop.
$ vim poaOfYen.json
{
"config": {
"chainId": 21382,
"homesteadBlock": 1,
"eip150Block": 2,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 3,
"eip158Block": 3,
"clique": {
"period": 15,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x59925fb9",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000683f257a240789cc8ffe6f0b4f17dc57405b6ce60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000000": {
"balance": "0x1"
},
...
"683f257a240789cc8ffe6f0b4f17dc57405b6ce6": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
},
"number": 0,
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}