Skip to content
This repository has been 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

Closed
Tracked by #1632
acatangiu opened this issue Aug 1, 2022 · 0 comments · Fixed by #11959
Closed
Tracked by #1632
Assignees
Labels
I3-bug The node fails to follow expected behavior. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder

Comments

@acatangiu
Copy link
Contributor

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.

@acatangiu acatangiu added I3-bug The node fails to follow expected behavior. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels Aug 1, 2022
@acatangiu acatangiu self-assigned this Aug 1, 2022
@acatangiu acatangiu changed the title client/beefy: walk finality tree_route looking for session change header digest client/beefy: ensure mandatory blocks on session changes by explicitly walking finality tree_route Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I3-bug The node fails to follow expected behavior. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant