Skip to content

Commit a419532

Browse files
ordiantdimitrov
andauthored
statement-distribution: validator disabling (#1841)
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]>
1 parent 01ea45c commit a419532

File tree

14 files changed

+1407
-663
lines changed

14 files changed

+1407
-663
lines changed

.gitlab/pipeline/zombienet/polkadot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ zombienet-polkadot-functional-0009-approval-voting-coalescing:
139139
--local-dir="${LOCAL_DIR}/functional"
140140
--test="0009-approval-voting-coalescing.zndsl"
141141

142+
zombienet-polkadot-functional-0010-validator-disabling:
143+
extends:
144+
- .zombienet-polkadot-common
145+
script:
146+
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
147+
--local-dir="${LOCAL_DIR}/functional"
148+
--test="0010-validator-disabling.zndsl"
149+
142150
zombienet-polkadot-smoke-0001-parachains-smoke-test:
143151
extends:
144152
- .zombienet-polkadot-common

polkadot/node/network/statement-distribution/src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ pub enum Error {
7575
#[error("Fetching availability cores failed {0:?}")]
7676
FetchAvailabilityCores(RuntimeApiError),
7777

78+
#[error("Fetching disabled validators failed {0:?}")]
79+
FetchDisabledValidators(runtime::Error),
80+
7881
#[error("Fetching validator groups failed {0:?}")]
7982
FetchValidatorGroups(RuntimeApiError),
8083

polkadot/node/network/statement-distribution/src/v2/grid.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ impl GridTracker {
253253
/// This checks whether the peer is allowed to send us manifests
254254
/// about this group at this relay-parent. This also does sanity
255255
/// checks on the format of the manifest and the amount of votes
256-
/// it contains. It has effects on the stored state only when successful.
256+
/// it contains. It assumes that the votes from disabled validators
257+
/// are already filtered out.
258+
/// It has effects on the stored state only when successful.
257259
///
258260
/// This returns a `bool` on success, which if true indicates that an acknowledgement is
259261
/// to be sent in response to the received manifest. This only occurs when the

0 commit comments

Comments
 (0)