Runtime refactoring: move all candidate validation checks to paras_inherent #6186
Labels
I4-refactor
Code needs refactoring.
T8-polkadot
This PR/Issue is related to/affects the Polkadot network.
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.The text was updated successfully, but these errors were encountered: