Parity-ethereum: Question: running two nodes by the same validator in AuRa

Created on 18 Mar 2019  ·  4Comments  ·  Source: openethereum/parity-ethereum

Hi Parity team,

Would you mind to clarify, can a validator in AuRa run two nodes with the same address in engine_signer without negative consequences for him?

Can such a validator accidentally (unintentionally) try to produce two blocks on his turn and thus be reported as malicious by other validators through the reportMalicious function?

For example, an honest validator just wants to launch two nodes on separate internet channels and have the second node as a reserved (for the case when the first node goes offline). The nodes would work in parallel. Is it allowed for AuRa?

Z1-question 🙋‍♀️

Most helpful comment

Can such a validator accidentally (unintentionally) try to produce two blocks on his turn and thus be reported as malicious by other validators through the reportMalicious function?

That is exactly what will happen if you have two nodes with the same engine_signer running simultaneously. Not only will the misbehavior be reported, but there's a chance of a chain fork that persists depending on which other validators are "closer" to your validators on the network.

Here's what we do instead:

https://github.com/paritytech/kovan-watchguard/blob/master/index.js

Specifically, you run two nodes, but only one has engine_signer set. When you see an authority is starting to miss blocks, you set engine_signer on the other node and it will replace the failed one. You still have to make sure that the node that went down stays down, or else you will run into the same problem again.

All 4 comments

Can such a validator accidentally (unintentionally) try to produce two blocks on his turn and thus be reported as malicious by other validators through the reportMalicious function?

That is exactly what will happen if you have two nodes with the same engine_signer running simultaneously. Not only will the misbehavior be reported, but there's a chance of a chain fork that persists depending on which other validators are "closer" to your validators on the network.

Here's what we do instead:

https://github.com/paritytech/kovan-watchguard/blob/master/index.js

Specifically, you run two nodes, but only one has engine_signer set. When you see an authority is starting to miss blocks, you set engine_signer on the other node and it will replace the failed one. You still have to make sure that the node that went down stays down, or else you will run into the same problem again.

@joshua-mir Got it, thank you.

@joshua-mir one more question: when the first node goes online again, we need to remove the engine_signer from the second node. Could we do that without restarting the second node? I see there is parity_setEngineSigner RPC but there is no parity_resetEngineSigner (or something similar). Can we just set the address to 0x00...00 with the parity_setEngineSigner in that case?

Yes if you set the engine_signer to any account that isn't in the validatorSet, including 0x0..0 you will no longer attempt to produce blocks.

Was this page helpful?
0 / 5 - 0 ratings