Files
pezkuwi-subxt/polkadot/node/network/statement-distribution/Cargo.toml
T
Alin Dima d6af073aa5 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>
2023-08-31 14:01:36 +03:00

43 lines
1.8 KiB
TOML

[package]
name = "polkadot-statement-distribution"
description = "Statement Distribution Subsystem"
version = "1.0.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
gum = { package = "tracing-gum", path = "../../gum" }
polkadot-primitives = { path = "../../../primitives" }
sp-staking = { path = "../../../../substrate/primitives/staking", default-features = false }
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
polkadot-node-subsystem = { path = "../../subsystem" }
polkadot-node-primitives = { path = "../../primitives" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
polkadot-node-subsystem-types = { path = "../../subsystem-types" }
polkadot-node-network-protocol = { path = "../protocol" }
arrayvec = "0.7.4"
indexmap = "1.9.1"
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
thiserror = "1.0.31"
fatality = "0.0.6"
bitvec = "1"
[dev-dependencies]
async-channel = "1.8.0"
assert_matches = "1.4.0"
polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
sp-authority-discovery = { path = "../../../../substrate/primitives/authority-discovery" }
sp-keyring = { path = "../../../../substrate/primitives/keyring" }
sp-core = { path = "../../../../substrate/primitives/core" }
sp-application-crypto = { path = "../../../../substrate/primitives/application-crypto" }
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
sp-tracing = { path = "../../../../substrate/primitives/tracing" }
sc-keystore = { path = "../../../../substrate/client/keystore" }
sc-network = { path = "../../../../substrate/client/network" }
futures-timer = "3.0.2"
polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" }
rand_chacha = "0.3"