Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

client/beefy: ensure mandatory blocks on session changes by explicitly walking finality tree_route #11954

@acatangiu

Description

@acatangiu

Bug

Right now BEEFY voter assumes it's getting explicit finality notifications for any block containing authorities_change digest:

if let Some(new_validator_set) = find_authorities_change::<B>(header) {
self.init_session_at(new_validator_set, *header.number());
// TODO: when adding SYNC protocol, fire up a request for justification for this
// mandatory block here.
}

But zombienet tests in paritytech/polkadot#5840 show that is not always the case, sometimes the authorities_change block is in the middle of a sub-chain of blocks finalized at once.

Solution

Voter should drop above assumption and explicitly check if validator set changed, and if so, walk the tree_route in the finality notification to find and process the finalized block containing authorities_change digest.

Metadata

Metadata

Assignees

Labels

I3-bugThe node fails to follow expected behavior.U1-asapNo need to stop dead in your tracks, however issue should be addressed as soon as possible.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions