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

paras: do not allow PVF vote submission if disabled #4684

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

pepyakin
Copy link
Contributor

if the PVF pre-checking is disabled the runtime dispatchable will reject
any attempts of submission. This is also concern the unsigned tx
validation.

Right now, the include_pvf_check_statement dispatchable is effectively
uncallable because of the weight set to the maximum value. If we were to
benchmark it, it would become includable in a block, but since there
will be no active votes, the dispatchable won't do anything.

However, it will execute some code, like signature validation and
querying some storage entries. To be completely safe, we can bail out
early if the pvf_checking_enabled config is disabled. That's what this
PR does.

@pepyakin
Copy link
Contributor Author

pepyakin commented Jan 10, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Jan 10, 2022
@pepyakin pepyakin added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Jan 10, 2022
@pepyakin pepyakin added this to In progress in Candidate Validation via automation Jan 10, 2022
@pepyakin pepyakin force-pushed the pep-pvf-runtime-disable-incl-stmt branch from 035752d to 995da79 Compare January 12, 2022 16:45
Base automatically changed from pep-pvf-runtime-events to master January 13, 2022 17:44
if the PVF pre-checking is disabled the runtime dispatchable will reject
any attempts of submission. This is also concern the unsigned tx
validation.

Right now, the `include_pvf_check_statement` dispatchable is effectively
uncallable because of the weight set to the maximum value. If we were to
benchmark it, it would become includable in a block, but since there
will be no active votes, the dispatchable won't do anything.

However, it will execute some code, like signature validation and
querying some storage entries. To be completely safe, we can bail out
early if the `pvf_checking_enabled` config is disabled. That's what this
PR does.
@pepyakin pepyakin force-pushed the pep-pvf-runtime-disable-incl-stmt branch from 995da79 to a654a7c Compare January 13, 2022 17:45
@pepyakin pepyakin merged commit dee0681 into master Jan 17, 2022
@pepyakin pepyakin deleted the pep-pvf-runtime-disable-incl-stmt branch January 17, 2022 14:28
Candidate Validation automation moved this from In progress to Done Jan 17, 2022
Wizdave97 pushed a commit to ComposableFi/polkadot that referenced this pull request Feb 3, 2022
if the PVF pre-checking is disabled the runtime dispatchable will reject
any attempts of submission. This is also concern the unsigned tx
validation.

Right now, the `include_pvf_check_statement` dispatchable is effectively
uncallable because of the weight set to the maximum value. If we were to
benchmark it, it would become includable in a block, but since there
will be no active votes, the dispatchable won't do anything.

However, it will execute some code, like signature validation and
querying some storage entries. To be completely safe, we can bail out
early if the `pvf_checking_enabled` config is disabled. That's what this
PR does.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants