-
Notifications
You must be signed in to change notification settings - Fork 707
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
Filter votes from disabled validators in BackedCandidates
in process_inherent_data
#1863
Conversation
|
||
// Filters statements from disabled validators in `BackedCandidate` and `MultiDisputeStatementSet`. | ||
// Returns `true` if at least one statement is removed and `false` otherwise. | ||
fn filter_backed_statements<T: Config>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ordian can you have a look at this? Does the index arithmetic here make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just merged #1257 that has a disabled_validators
implementation, which could be extracted into a common module. There's a small caveat though, it doesn't work at session boundaries. But maybe that's not really an issue since availability cores are cleared out on session boundaries anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved your implementation in pallet_shared
so that we can call it from the api impl and paras_inherent
. Quite a lot of boilerplate code for such small change but it is what it is :)
If you have got an idea for a better place - please share.
@@ -480,6 +487,7 @@ impl<T: Config> Pallet<T> { | |||
} | |||
|
|||
ensure!(all_weight_before.all_lte(max_block_weight), Error::<T>::InherentOverweight); | |||
ensure!(!statements_were_dropped, Error::<T>::InherentOverweight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to reject blocks where at least one statement is dropped? what do we do with disputes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afair the else statement is executed during block execution only (right?) and this is a sanity check that we are not importing votes from disabled validators. We discussed this here.
…rait to fetch the disabled validators from paras_inherent.
…and use it it in paras_inherent too
* `set_claimqueue` in `scheduler` * `add_allowed_relay_parent` in `shared`
The CI pipeline was cancelled due to failure one of the required jobs. |
…s_inherent_data (#1863) Fixes #1592 Please refer to the issue for details. --------- Co-authored-by: ordian <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: Maciej <[email protected]>
Closes #1591. The purpose of this PR is filter out backing statements from the network signed by disabled validators. This is just an optimization, since we will do filtering in the runtime in #1863 to avoid nodes to filter garbage out at block production time. - [x] Ensure it's ok to fiddle with the mask of manifests - [x] Write more unit tests - [x] Test locally - [x] simple zombienet test - [x] PRDoc --------- Co-authored-by: Tsvetomir Dimitrov <[email protected]>
…s_inherent_data (#2889) Backport of #1863 to master Extend candidate sanitation in paras_inherent by removing backing votes from disabled validators. Check #1592 for more details. This change is related to the disabling strategy implementation (#2226). --------- Co-authored-by: ordian <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: Maciej <[email protected]>
…s_inherent_data (#2889) Backport of paritytech/polkadot-sdk#1863 to master Extend candidate sanitation in paras_inherent by removing backing votes from disabled validators. Check paritytech/polkadot-sdk#1592 for more details. This change is related to the disabling strategy implementation (paritytech/polkadot-sdk#2226). --------- Co-authored-by: ordian <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: Maciej <[email protected]>
…s_inherent_data (paritytech#2889) Backport of paritytech#1863 to master Extend candidate sanitation in paras_inherent by removing backing votes from disabled validators. Check paritytech#1592 for more details. This change is related to the disabling strategy implementation (paritytech#2226). --------- Co-authored-by: ordian <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: Maciej <[email protected]>
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
* "refund" proof size in GRANDPa pallet * clippy * extra_proof_size_bytes_works * use saturated_into * fix review comments
Fixes #1592
Please refer to the issue for details.