backing: move the min votes threshold to the runtime (#1200)
* move min backing votes const to runtime also cache it per-session in the backing subsystem Signed-off-by:alindima <alin@parity.io> * add runtime migration * introduce api versioning for min_backing votes also enable it for rococo/versi for testing * also add min_backing_votes runtime calls to statement-distribution this dependency has been recently introduced by async backing * remove explicit version runtime API call this is not needed, as the RuntimeAPISubsystem already takes care of versioning and will return NotSupported if the version is not right. * address review comments - parametrise backing votes runtime API with session index - remove RuntimeInfo usage in backing subsystem, as runtime API caches the min backing votes by session index anyway. - move the logic for adjusting the configured needed backing votes with the size of the backing group to a primitives helper. - move the legacy min backing votes value to a primitives helper. - mark JoinMultiple error as fatal, since the Canceled (non-multiple) counterpart is also fatal. - make backing subsystem handle fatal errors for new leaves update. - add HostConfiguration consistency check for zeroed backing votes threshold - add cumulus accompanying change * fix cumulus test compilation * fix tests * more small fixes * fix merge * bump runtime api version for westend and rollback version for rococo --------- Signed-off-by:
alindima <alin@parity.io> Co-authored-by:
Javier Viola <javier@parity.io>
parent
f1845f72
Showing
- cumulus/client/relay-chain-minimal-node/src/blockchain_rpc_client.rs 8 additions, 0 deletions...ent/relay-chain-minimal-node/src/blockchain_rpc_client.rs
- cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs 10 additions, 0 deletionscumulus/client/relay-chain-rpc-interface/src/rpc_client.rs
- cumulus/parachains/integration-tests/emulated/common/src/lib.rs 1 addition, 0 deletions...s/parachains/integration-tests/emulated/common/src/lib.rs
- polkadot/node/core/backing/src/error.rs 1 addition, 0 deletionspolkadot/node/core/backing/src/error.rs
- polkadot/node/core/backing/src/lib.rs 33 additions, 22 deletionspolkadot/node/core/backing/src/lib.rs
- polkadot/node/core/backing/src/tests/mod.rs 22 additions, 9 deletionspolkadot/node/core/backing/src/tests/mod.rs
- polkadot/node/core/backing/src/tests/prospective_parachains.rs 21 additions, 9 deletions...dot/node/core/backing/src/tests/prospective_parachains.rs
- polkadot/node/core/runtime-api/src/cache.rs 15 additions, 0 deletionspolkadot/node/core/runtime-api/src/cache.rs
- polkadot/node/core/runtime-api/src/lib.rs 18 additions, 0 deletionspolkadot/node/core/runtime-api/src/lib.rs
- polkadot/node/core/runtime-api/src/tests.rs 4 additions, 0 deletionspolkadot/node/core/runtime-api/src/tests.rs
- polkadot/node/network/statement-distribution/Cargo.toml 1 addition, 1 deletionpolkadot/node/network/statement-distribution/Cargo.toml
- polkadot/node/network/statement-distribution/src/vstaging/grid.rs 1 addition, 1 deletion.../node/network/statement-distribution/src/vstaging/grid.rs
- polkadot/node/network/statement-distribution/src/vstaging/groups.rs 12 additions, 5 deletions...ode/network/statement-distribution/src/vstaging/groups.rs
- polkadot/node/network/statement-distribution/src/vstaging/mod.rs 13 additions, 8 deletions...t/node/network/statement-distribution/src/vstaging/mod.rs
- polkadot/node/network/statement-distribution/src/vstaging/tests/mod.rs 14 additions, 4 deletions.../network/statement-distribution/src/vstaging/tests/mod.rs
- polkadot/node/primitives/src/lib.rs 0 additions, 7 deletionspolkadot/node/primitives/src/lib.rs
- polkadot/node/subsystem-types/src/messages.rs 5 additions, 0 deletionspolkadot/node/subsystem-types/src/messages.rs
- polkadot/node/subsystem-types/src/runtime_client.rs 16 additions, 0 deletionspolkadot/node/subsystem-types/src/runtime_client.rs
- polkadot/node/subsystem-util/src/runtime/error.rs 2 additions, 2 deletionspolkadot/node/subsystem-util/src/runtime/error.rs
- polkadot/node/subsystem-util/src/runtime/mod.rs 38 additions, 7 deletionspolkadot/node/subsystem-util/src/runtime/mod.rs
Please register or sign in to comment