Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider extracting validation code (aka PVF) handling from paras into a separate module #938

Open
pepyakin opened this issue Sep 28, 2021 · 0 comments
Labels
I4-refactor Code needs refactoring.

Comments

@pepyakin
Copy link
Contributor

Paras module now is burdened with many responsibilities:

  1. Keeps track what paras are registered and which are parathreads. Can answer queries about those.
  2. Handles the lifecycle changes of a parachain: onboarding/offboarding as well as migration between parachain and parathread states.
  3. Keeps track the latest head data.
  4. Manages validation code. Specifically,
    1. Code repository, which basically stores validation codes on chain and performs reference counting on validation code preimages.
    2. Maintains a mapping of the current, past and future PVFs for each parachain, also allowing queries about it.
    3. Manages the upgrade sequence. Reject blocks if they attempt to perform a not pertinent upgrade. Applies the upgrades when it's time.
  5. After Tracking issue: Pre-checking for PVF Compilation time polkadot#3211, it will also include the logic required for pre-checking, specifically:
    1. Runtime API for returning the validation code hashes that require pre-checking.
    2. Accepting unsigned transactions with votes for either validity or invalidity of a PVF in question.
    3. Handling tallying on session changes.
  6. After runtime upgrade: Methods to avoid ever including parachain code in critical-path data #967, it will also include the logic for:
    1. Waiting for the validation code preimages.
    2. Accepting unsigned transactions with validation code preimages.

Looking at this, one may think that validation code handling is a separate concern, which is not tied to the other things paras is doing. Based on that observation, it may be a good idea to introduce a module that will take care of the things related to validation code.

@Sophia-Gold Sophia-Gold transferred this issue from paritytech/polkadot Aug 24, 2023
@the-right-joyce the-right-joyce added I4-refactor Code needs refactoring. and removed I8-refactor labels Aug 25, 2023
helin6 pushed a commit to boolnetwork/polkadot-sdk that referenced this issue Feb 5, 2024
…itytech#938)

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 26, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 27, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
bkchr pushed a commit that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I4-refactor Code needs refactoring.
Projects
Status: Backlog
Development

No branches or pull requests

2 participants