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

Use cached session index to obtain executor params #7646

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

s0me0ne-unkn0wn
Copy link
Contributor

Closes paritytech/polkadot-sdk#579

To validate a candidate, approval voting and dispute coordinator subsystems currently rely on the candidate validation subsystem, which requests executor parameters at a session determined by the candidate's relay parent. This is unreliable, as the state at that relay parent may already be pruned. Still, we want to be able to apply slashes in that case.

This PR makes use of the internal cache maintained by approval voting and dispute distribution subsystems to reliably obtain session index even if the state in question has already been pruned. Then the execution parameters are requested and provided to the candidate validation subsystem, which doesn't have to request them on its own anymore.

The positive side effect is that the candidate validation subsystem is returning to its pre-#6161 state, that is, it expects the exhaustive validation data from a requesting subsystem instead of doing its own data collection.

The backing subsystem, also affected by the change, does not maintain any cache of session indexes as it doesn't need it, as the state at that stage is guaranteed to be alive. A session index is always known when a backing job is created. Executor parameters are requested before performing the actual validation using that session index.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/polkadot/-/jobs/3433869

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve candidate validation robustness for missing relay chain blocks
2 participants