Ethereum POA (Proof of Authority) for Private Network

cliquego-ethereumprivate-blockchainproof-of-authority

I am trying to set up private network in ethereum with POA, but I am unable to do so.
getting below errorPOA ERROR

I have tried using puppeth manager to setup the genesis file.
The genesis file is set up to use clique as algo. Snip of genesis file is
genesis.json
I do understand from the error that it is related to the sealing/sealer of the block.. but how to define the accounts which can be used for sealing?
Any pointers in right direction would be helpful

Best Answer

Have you created any sealer accounts prior to creating the genesis file?

if not, create at least one sealer account first by running the following:

geth account new --datadir /path/to/your/custom/datadir

Note down the address this generates, then when you run puppeth you can add this address into the pre-defined list of sealer accounts during the genesis creation process.

Once this is done you can initialise geth with the new genesis.json file:

geth --datadir /path/to/your/custom/datadir init genesis.json

then once you're up and running you need to unlock that account:

personal.unlockAccount(eth.accounts[0], "<password>", 0)

(note "0" above will keep the account unlocked permanently, or you can specify a time interval in seconds)

Then to get mining started on a single core type the following into the console:

miner.start(1)

and you should see block sealing as proof of successful mining pretty soon.

Related Topic