poanetwork / parity-ethereum

Fast, light, robust Ethereum implementation.
https://parity.io
Other
10 stars 12 forks source link

AuRa skips receiving InitiateChange even if it was emitted #112

Closed vkomenda closed 5 years ago

vkomenda commented 5 years ago

This line prevents AuRa from receiving InitiateChange even if emitInitiateChange was called in the same step if the current step is not the first step of an epoch: https://github.com/poanetwork/parity-ethereum/blob/b5097c67155debd9aee2c5e499456b4a1f187b26/ethcore/src/engines/authority_round/mod.rs#L1151

This affects handling malicious validator reports. The pending validator set change scheduled by reportMalicious cannot be implemented until the start of the next epoch.

varasev commented 5 years ago

Note that Parity ignores several InitiateChange events before the ValidatorSet.finalizeChange function is called. When we emit the InitiateChange, we must wait for the validator set is applied by the engine. We only can emit some next InitiateChange after the previous is applied (the ValidatorSet.finalizeChange is called).

varasev commented 5 years ago

Is it still actual? What steps should we perform to catch that?

vkomenda commented 5 years ago

It was related to failing test that have been fixed since then.