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

Fill the gaps in RollingSessionWindow from the runtime state #6165

Closed
ordian opened this issue Oct 19, 2022 · 4 comments
Closed

Fill the gaps in RollingSessionWindow from the runtime state #6165

ordian opened this issue Oct 19, 2022 · 4 comments
Labels
I4-annoyance Code behaves within expectations, however this “expected behaviour” itself is at issue. T4-parachains_engineering This PR/Issue is related to Parachains performance, stability, maintenance. U3-nice_to_have Issue is worth doing eventually.

Comments

@ordian
Copy link
Member

ordian commented Oct 19, 2022

This is a follow-up to #6040 aiming to address an issue described in #6106 (comment).

The edge case scenario can arise when 1/3+ of active validators are being offline or somehow lose their parachain db for a few sessions (> dispute_period, currently 6). We don't expect this to happen on mainnet, but it could be an annoyance for small testnets with short session durations.

With #6106, validators will try to persist the session window, but if there are missing sessions at the beginning of the window, when querying runtime, they will use the state of the best block typically, which only contains the latest dispute_period sessions.

A way to address this would be to modify the API to allow the caller to pass the appropriate (old) relay parent needed to query the old SessionInfos.

@ordian ordian added I4-annoyance Code behaves within expectations, however this “expected behaviour” itself is at issue. U3-nice_to_have Issue is worth doing eventually. T4-parachains_engineering This PR/Issue is related to Parachains performance, stability, maintenance. labels Oct 19, 2022
@ordian
Copy link
Member Author

ordian commented Oct 19, 2022

There cache_session_window_for_head API already exists, but currently, it's only being called for active leaves in approval-voting and dispute-coordinator.

@rphmeier
Copy link
Contributor

A way to address this would be to modify the API to allow the caller to pass the appropriate (old) relay parent needed to query the old SessionInfos.

Old relay-parents can't be relied upon to have state available. If anything, a few hundred blocks behind the finalized block is the limit. How old are you thinking?

@ordian
Copy link
Member Author

ordian commented Oct 20, 2022

a few hundred blocks behind the finalized block

We are only concerned about unfinalized blocks here. In case finality stalls for a few sessions for some reason.

@sandreim
Copy link
Contributor

This was implemented when removing RollingSessionWindow, see #7123 and #6968

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I4-annoyance Code behaves within expectations, however this “expected behaviour” itself is at issue. T4-parachains_engineering This PR/Issue is related to Parachains performance, stability, maintenance. U3-nice_to_have Issue is worth doing eventually.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants