I would like to set-up a new private network using Clique as protocol with the help of puppeth.
When configuring the new Genesis block, this question is being asked:
Which accounts are allowed to seal? (mandatory at least one)
How can I specify an account since it is a new network ?
(in other words are accounts independent from the network ?)
My Solution (geth 1.6.0)
This is similar to the accepted answer below but allowed me to create multiple sealers/miners (and script those creations)
- On any existing network (PoA or PoW), create new accounts for the "sealers" or use
geth --datadir=/wherever account new
(thanks Péter) - Collect from the
keystore
directories the keys of these accounts. For ease of management the files for the keys can be renamed to anything you want, sayACCOUNT_NUMBER.json
whereACCOUNT NUMBER
is the hex value of the account e.g.0x035e19356880f86804b5fbf7015192be271ab8e4
- Using
puppeth
, create thegenesis.json
file, and enter inwhich accounts
, the list of sealer accounts created above - For each sealer node, assuming the data directory for the private network is
MYNET
, create a directory structureMYNET/keystore
and drop the key for that sealer in the directory - Initialize the node once :
geth --datadir "MYNET" init genesis.json
- Run the node. Unlocking the account and starting the miner should work.
(note: I am not using puppeth
to create the nodes but use my own docker containers)
Important !
I am running into this issue when initializing the network with more than 3 signers. I will keep this question updated
To have more than 3 signers registered from the start, you must use a 1.6.1-unstable with a last commit > 02fa3e3179011bcbdf9142f9efba8d3a52df898
See the commit
Adding/Removing sealers
Please check this SE question
geth --datadir=/wherever account new
.