1

Scenario: I am running a private chain having some authority nodes. The entire network is running fine.

  • Question

    How should I add more authority nodes in the network. Other than the ones defined in genesis file.

  • Attempt 1

    I modified genesis file of all the nodes in the network and restarted them. They all agree upon the new authority. It has been accepted by the network.

  • Problem

    Now I add a new non-authority node with the updated genesis file. It does not sync correctly, instead it stops at block #2 after an error:

    Error: Engine(NotProposer(Mismatch { expected: 00ad89..., found: 0068... }))

  • Possible Solution

    I change the genesis and remove the one authority which was added previously and try syncing it. It syncs correctly to the block at which authority was added. Then sync stops. Then I modify genesis again to add that authority to get it synced to latest block.

I am not sure if this is the correct way to add authority nodes in the network?

Info: I am running aura consensus engine using parity.

4 Answers 4

3

The OP states they are using parity, which I had missed initially. But just for general info, here is the process for geth users on a PoA network.

Use

clique.propose('....')

You have to create an account for the new node using

geth --datadir ... new account

Then add clique.propose(..) to a majority of the nodes. Try all to be safe.

4
  • There is note at the bottom of the question which says that OP is using I am running aura consensus engine using parity
    – Ayushya
    Commented Apr 17, 2018 at 16:10
  • OK, I missed that. Should I delete my answer? Is deletion possible? Commented Apr 17, 2018 at 16:18
  • You can update you answer, with a note on top saying that For people using geth, you can use... might help geth users who land here.
    – Ayushya
    Commented Apr 17, 2018 at 16:20
  • OK, I added a short comment about geth. Commented Apr 17, 2018 at 16:27
0

You may give https://github.com/paritytech/parity-deploy a try. By running:

$ ./parity-deploy.sh --config aura

You should see from docker-compose.yml output what is the needed configuration for a proof of authority chain.

1
  • Your answer can be useful for running a new chain, but question is in regards to adding authorities in existing chain.
    – Ayushya
    Commented Apr 13, 2018 at 4:02
0

I specified authority addresses in the genesis, so in order to alter this, I needed to fork my chain. And specify the blocks at which new validators/authorities would come into effect:

Old genesis looked like this:

"engine": {
    "authorityRound": {
        "params": {
            "stepDuration": "5",
            "validators": {
                "list": [
                    "0x0.........8c9606a754bb5aa561a9ec6c283695",
                    "0x0.........91ed16e1ede42c6b2e3f5801701e05",
                    "0x0.........0b08407ee70e974009af14b650ab08",
                    "0x0.........0b4c529b06622f944e7f0007568256",
                    "0x0.........c237037bd59a5bf36cc15f097a18a1"
                ]
            },
            "maximumUncleCountTransition": 9000,
            "maximumUncleCount": 0
        }
    }
}

Now I want to add more addresses in that list. So in new genesis, I can use multi lists. It should contain info of when new validators came into effect. New genesis would look like this:

"engine": {
    "authorityRound": {
        "params": {
            "stepDuration": "5",
            "validators": {
                "multi": {
                    "0": {
                        "list": [
                            "0x0.........8c9606a754bb5aa561a9ec6c283695",
                            "0x0.........91ed16e1ede42c6b2e3f5801701e05",
                            "0x0.........0b08407ee70e974009af14b650ab08",
                            "0x0.........3b4c529b06622f944e7f0007568256",
                            "0x0.........c237037bd59a5bf36cc15f097a18a1"
                        ]
                    },
                    "414437": {
                        "list": [
                            "0x0.........8c9606a754bb5aa561a9ec6c283695",
                            "0x0.........91ed16e1ede42c6b2e3f5801701e05",
                            "0x0.........0b08407ee70e974009af14b650ab08",
                            "0x0.........3b4c529b06622f944e7f0007568256",
                            "0x0.........c237037bd59a5bf36cc15f097a18a1",
                            "0x0.........d18c1521383a798b151c2b252ed774"
                        ]
                    },
                    "432727": {
                        "list": [
                            "0x0.........8c9606a754bb5aa561a9ec6c283695",
                            "0x0.........91ed16e1ede42c6b2e3f5801701e05",
                            "0x0.........0b08407ee70e974009af14b650ab08",
                            "0x0.........0b4c529b06622f944e7f0007568256",
                            "0x0.........9237037bd59a5bf36cc15f097a18a1",
                            "0x0.........818c1521383a798b151c2b252ed774",
                            "0x0.........253452bb06ebc3657ce438150aaeb6"
                        ]
                    }
                }
            },
            "maximumUncleCountTransition": 9000,
            "maximumUncleCount": 0
        }
    }
}
2
  • how did you fork your chain? curious as it is something I might have to do soon
    – 0xsegfault
    Commented Sep 18, 2018 at 23:59
  • 1
    @Data_Kid check this out wiki.parity.io/…
    – Badr Bellaj
    Commented Dec 10, 2018 at 19:49
0

With Kovan validators set you can do have to go through this pain anymore. All you need to do make deploy a contract to your POA network and add/ remove validators by interacting with the contract.

References:

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.