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

Runtime refactoring: move all candidate validation checks to paras_inherent #6186

Open
alindima opened this issue Oct 23, 2024 · 0 comments
Open
Labels
I4-refactor Code needs refactoring. T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Comments

@alindima
Copy link
Contributor

There are some candidate checks which we do in paras_inherent which can result in candidates being dropped and some checks which we do in inclusion::process_candidates() which result in hard errors (panic).

This results in code that is difficult to reason about and assumptions being made between different modules.

Currently, verify_backed_candidate is present in both places. We should remove it from inclusion.
check_backing_votes is the one function which is not called during the paras_inherent sanitization. We should move it there and drop candidates with invalid backings instead of returning errors. It should be the last step of the sanitization though, because these signature checks are heavy.

@alindima alindima added I4-refactor Code needs refactoring. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Oct 23, 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. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant