4

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

3 Answers 3

2

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.

0
2

Simply unlock your account with

personal.unlockAccount(eth.accounts[0], "Password", 86400)

Note: The last parameter is time to leave account unlocked in seconds.

Then, start the mining

miner.start();

3
  • 1
    no that not the problem the account is already unlocked
    – Ajay
    Apr 27, 2017 at 13:26
  • 1
    When you used puppeth to create the Genesis.json, make sure that the account that you authorized to be the sealer is the same one as the account you unlocked. Try specifying it on a new datadir and see if that changes anything
    – Pii
    Apr 27, 2017 at 13:39
  • 2
    FYI, if you set that last param to zero, it will stay unlocked until you close the console. Dec 20, 2017 at 22:47
1

Steps to get a miner node in your PoA blockchain:

  • Create account: geth --datadir=. account new
  • Create genesis json using puppeth
  • Modify genesis json. Set the sealers in the extraData field in genesis.json:
    • 0x00... (64 zeros) at beginning
    • account (without 0x) (stuck all the accounts you want to set as sealers)
    • 00.. (130 zeros) at end
  • run the node, unlocking this account, --unlock=(account). Use also the parameter --mine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.