diff --git a/Cargo.lock b/Cargo.lock index 5c9c966c2955..c0b525779a13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -379,9 +379,13 @@ checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" [[package]] name = "bitvec" -version = "0.15.2" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6" +checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +dependencies = [ + "either", + "radium", +] [[package]] name = "blake2" @@ -3845,9 +3849,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f509c5e67ca0605ee17dcd3f91ef41cadd685c75a298fb6261b781a5acb3f910" +checksum = "329c8f7f4244ddb5c37c103641027a76c530e65e8e4b8240b29f81ea40508b17" dependencies = [ "arrayvec 0.5.1", "bitvec", @@ -4791,6 +4795,12 @@ dependencies = [ "proc-macro2 1.0.9", ] +[[package]] +name = "radium" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" + [[package]] name = "rand" version = "0.3.23" diff --git a/availability-store/Cargo.toml b/availability-store/Cargo.toml index aa5e5cd7a511..dd876248a2ff 100644 --- a/availability-store/Cargo.toml +++ b/availability-store/Cargo.toml @@ -14,7 +14,7 @@ log = "0.4.8" futures = "0.3.4" tokio = { version = "0.2.13", features = ["rt-core"] } exit-future = "0.2.0" -codec = { package = "parity-scale-codec", version = "1.1.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" } client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/collator/Cargo.toml b/collator/Cargo.toml index 7a44fd2e7465..7afbffe5e623 100644 --- a/collator/Cargo.toml +++ b/collator/Cargo.toml @@ -24,7 +24,7 @@ polkadot-service = { path = "../service" } log = "0.4.8" tokio = "0.2.13" futures-timer = "2.0" -codec = { package = "parity-scale-codec", version = "1.1.0" } +codec = { package = "parity-scale-codec", version = "1.3.0" } [dev-dependencies] keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/erasure-coding/Cargo.toml b/erasure-coding/Cargo.toml index f84d367cc16d..f9d90d7bed2b 100644 --- a/erasure-coding/Cargo.toml +++ b/erasure-coding/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] primitives = { package = "polkadot-primitives", path = "../primitives" } reed_solomon = { package = "reed-solomon-erasure", git = "https://github.com/paritytech/reed-solomon-erasure" } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" } derive_more = "0.15.0" diff --git a/network/Cargo.toml b/network/Cargo.toml index e84e540ab783..47ff292ff166 100644 --- a/network/Cargo.toml +++ b/network/Cargo.toml @@ -14,7 +14,7 @@ av_store = { package = "polkadot-availability-store", path = "../availability-st polkadot-validation = { path = "../validation" } polkadot-primitives = { path = "../primitives" } polkadot-erasure-coding = { path = "../erasure-coding" } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index b09092029e20..504b72ded263 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -6,7 +6,7 @@ description = "Types and utilities for creating and working with parachains" edition = "2018" [dependencies] -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = [ "derive" ] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = [ "derive" ] } derive_more = { version = "0.99.2", optional = true } serde = { version = "1.0.102", default-features = false, features = [ "derive" ], optional = true } sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index d491828a449a..f8b335bbc72c 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.102", optional = true, features = ["derive"] } -parity-scale-codec = { version = "1.1.0", default-features = false, features = ["bit-vec", "derive"] } +parity-scale-codec = { version = "1.3.0", default-features = false, features = ["bit-vec", "derive"] } primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -17,7 +17,7 @@ sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } polkadot-parachain = { path = "../parachain", default-features = false } trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] } +bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [dev-dependencies] diff --git a/primitives/src/parachain.rs b/primitives/src/parachain.rs index f65af30efba5..6b9e95f9a885 100644 --- a/primitives/src/parachain.rs +++ b/primitives/src/parachain.rs @@ -626,7 +626,7 @@ pub struct AttestedCandidate { /// Validity attestations. pub validity_votes: Vec, /// Indices of the corresponding validity votes. - pub validator_indices: BitVec, + pub validator_indices: BitVec, } impl AttestedCandidate { diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 76fe0e89b5f2..9ccbdb9ad5ec 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -14,4 +14,4 @@ sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } txpool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master" } frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "master" } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 02be270ba864..de07bd9908db 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -5,8 +5,8 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } log = { version = "0.3.9", optional = true } rustc-hex = { version = "2.0.1", default-features = false } serde = { version = "1.0.102", default-features = false } diff --git a/runtime/common/src/attestations.rs b/runtime/common/src/attestations.rs index 42b5262a77fe..b493c10cfcb0 100644 --- a/runtime/common/src/attestations.rs +++ b/runtime/common/src/attestations.rs @@ -168,7 +168,7 @@ impl Module { let attesting_indices = head.validator_indices .iter() .enumerate() - .filter(|(_, bit)| *bit) + .filter(|(_, bit)| **bit) .inspect(|&(auth_index, _)| { if let Some(stash_id) = validators.get(auth_index) { valid.push(stash_id.clone()); diff --git a/runtime/common/src/parachains.rs b/runtime/common/src/parachains.rs index 5c8bd88ecdc5..55fa3b920a1e 100644 --- a/runtime/common/src/parachains.rs +++ b/runtime/common/src/parachains.rs @@ -964,7 +964,7 @@ impl Module { for (vote_index, (auth_index, _)) in candidate.validator_indices .iter() .enumerate() - .filter(|(_, bit)| *bit) + .filter(|(_, bit)| **bit) .enumerate() { let validity_attestation = match candidate.validity_votes.get(vote_index) { @@ -1200,7 +1200,7 @@ mod tests { use sp_trie::NodeCodec; use sp_runtime::{ impl_opaque_keys, - Perbill, curve::PiecewiseLinear, testing::{Header}, + Perbill, curve::PiecewiseLinear, testing::Header, traits::{ BlakeTwo256, IdentityLookup, SaturatedConversion, OpaqueKeys, diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 59f84d46e0e8..5c81bb15e52d 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" build = "build.rs" [dependencies] -bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } log = { version = "0.3.9", optional = true } rustc-hex = { version = "2.0.1", default-features = false } serde = { version = "1.0.102", default-features = false } diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index eb1dee4373a4..625a3155827a 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" build = "build.rs" [dependencies] -bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] } +bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } log = { version = "0.3.9", optional = true } rustc-hex = { version = "2.0.1", default-features = false } diff --git a/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index 3597527b86fe..e1fe5ccd7367 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/runtime/test-runtime/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" build = "build.rs" [dependencies] -bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } log = { version = "0.3.9", optional = true } rustc-hex = { version = "2.0.1", default-features = false } serde = { version = "1.0.102", default-features = false } diff --git a/service/Cargo.toml b/service/Cargo.toml index c69fd146242d..f605628dbd12 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -49,7 +49,7 @@ babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/par sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", branch = "master" } -codec = { package = "parity-scale-codec", version = "1.1.0" } +codec = { package = "parity-scale-codec", version = "1.3.0" } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" } prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/statement-table/Cargo.toml b/statement-table/Cargo.toml index e53d523fed76..faa476b7f95c 100644 --- a/statement-table/Cargo.toml +++ b/statement-table/Cargo.toml @@ -5,6 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } primitives = { package = "polkadot-primitives", path = "../primitives" } diff --git a/test-parachains/adder/Cargo.toml b/test-parachains/adder/Cargo.toml index 586c37244635..8f8ba30f6bb1 100644 --- a/test-parachains/adder/Cargo.toml +++ b/test-parachains/adder/Cargo.toml @@ -8,7 +8,7 @@ build = "build.rs" [dependencies] parachain = { package = "polkadot-parachain", path = "../../parachain/", default-features = false, features = [ "wasm-api" ] } -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } tiny-keccak = "1.5.0" dlmalloc = { version = "0.1.3", features = [ "global" ] } diff --git a/validation/Cargo.toml b/validation/Cargo.toml index f2c14835a193..4f185a43ce6a 100644 --- a/validation/Cargo.toml +++ b/validation/Cargo.toml @@ -12,7 +12,7 @@ tokio = { version = "0.2.13", features = ["rt-core", "blocking"] } derive_more = "0.14.1" log = "0.4.8" exit-future = "0.2.0" -codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } availability_store = { package = "polkadot-availability-store", path = "../availability-store" } parachain = { package = "polkadot-parachain", path = "../parachain" } polkadot-primitives = { path = "../primitives" } @@ -30,7 +30,7 @@ sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "mast block-builder = { package = "sc-block-builder", git = "https://github.com/paritytech/substrate", branch = "master" } trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" } runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "master" } -bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] } +bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } runtime_babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", branch = "master" } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" } keystore = { package = "sc-keystore", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/validation/src/shared_table/mod.rs b/validation/src/shared_table/mod.rs index e9ae7ab5db57..8b0b42b54fa4 100644 --- a/validation/src/shared_table/mod.rs +++ b/validation/src/shared_table/mod.rs @@ -549,7 +549,7 @@ impl SharedTable { validity_votes.sort_by(|(id1, _), (id2, _)| id1.cmp(id2)); let mut validator_indices = bitvec![ - bitvec::cursor::LittleEndian, u8; + bitvec::order::Lsb0, u8; 0; validity_votes.last().map(|(i, _)| i + 1).unwrap_or_default() ];