mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Upgrade codec to 2.0 and bitvec to 0.20 (companion) (#2343)
* upgrade codec and bitvec * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
6efeb1ee13
commit
29f12f3f48
@@ -6,13 +6,13 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
futures = "0.3.8"
|
||||
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["bit-vec", "derive"] }
|
||||
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
|
||||
|
||||
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
|
||||
polkadot-overseer = { path = "../../overseer" }
|
||||
polkadot-primitives = { path = "../../../primitives" }
|
||||
polkadot-node-primitives = { path = "../../primitives" }
|
||||
bitvec = "0.17.4"
|
||||
bitvec = "0.20.1"
|
||||
|
||||
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -7,14 +7,14 @@ edition = "2018"
|
||||
[dependencies]
|
||||
futures = "0.3.12"
|
||||
futures-timer = "3.0.2"
|
||||
kvdb = "0.8.0"
|
||||
kvdb-rocksdb = "0.10.0"
|
||||
kvdb = "0.9.0"
|
||||
kvdb-rocksdb = "0.11.0"
|
||||
thiserror = "1.0.23"
|
||||
tracing = "0.1.22"
|
||||
tracing-futures = "0.2.4"
|
||||
bitvec = "0.17.4"
|
||||
bitvec = "0.20.1"
|
||||
|
||||
parity-scale-codec = { version = "1.3.6", features = ["derive"] }
|
||||
parity-scale-codec = { version = "2.0.0", features = ["derive"] }
|
||||
erasure = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
|
||||
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
|
||||
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
|
||||
@@ -27,7 +27,7 @@ sc-service = { git = "https://github.com/paritytech/substrate", branch = "master
|
||||
log = "0.4.13"
|
||||
env_logger = "0.8.2"
|
||||
assert_matches = "1.4.0"
|
||||
kvdb-memorydb = "0.8.0"
|
||||
kvdb-memorydb = "0.9.0"
|
||||
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
|
||||
|
||||
@@ -133,16 +133,16 @@ impl Decode for BEBlockNumber {
|
||||
#[derive(Debug, Encode, Decode)]
|
||||
enum State {
|
||||
/// Candidate data was first observed at the given time but is not available in any block.
|
||||
#[codec(index = "0")]
|
||||
#[codec(index = 0)]
|
||||
Unavailable(BETimestamp),
|
||||
/// The candidate was first observed at the given time and was included in the given list of unfinalized blocks, which may be
|
||||
/// empty. The timestamp here is not used for pruning. Either one of these blocks will be finalized or the state will regress to
|
||||
/// `State::Unavailable`, in which case the same timestamp will be reused. Blocks are sorted ascending first by block number and
|
||||
/// then hash.
|
||||
#[codec(index = "1")]
|
||||
#[codec(index = 1)]
|
||||
Unfinalized(BETimestamp, Vec<(BEBlockNumber, Hash)>),
|
||||
/// Candidate data has appeared in a finalized block and did so at the given time.
|
||||
#[codec(index = "2")]
|
||||
#[codec(index = 2)]
|
||||
Finalized(BETimestamp)
|
||||
}
|
||||
|
||||
@@ -967,7 +967,9 @@ fn process_message(
|
||||
}
|
||||
AvailabilityStoreMessage::QueryChunkAvailability(candidate, validator_index, tx) => {
|
||||
let a = load_meta(&subsystem.db, &candidate)?
|
||||
.map_or(false, |m| *m.chunks_stored.get(validator_index as usize).unwrap_or(&false));
|
||||
.map_or(false, |m|
|
||||
*m.chunks_stored.get(validator_index as usize).as_deref().unwrap_or(&false)
|
||||
);
|
||||
let _ = tx.send(a);
|
||||
}
|
||||
AvailabilityStoreMessage::StoreChunk {
|
||||
|
||||
@@ -13,7 +13,7 @@ polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsys
|
||||
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
|
||||
erasure-coding = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
|
||||
statement-table = { package = "polkadot-statement-table", path = "../../../statement-table" }
|
||||
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
|
||||
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
|
||||
tracing = "0.1.22"
|
||||
tracing-futures = "0.2.4"
|
||||
thiserror = "1.0.23"
|
||||
|
||||
@@ -1794,7 +1794,10 @@ mod tests {
|
||||
assert!(candidates[0].validity_votes.contains(
|
||||
&ValidityAttestation::Explicit(signed_c.signature().clone())
|
||||
));
|
||||
assert_eq!(candidates[0].validator_indices, bitvec::bitvec![Lsb0, u8; 1, 0, 1, 1]);
|
||||
assert_eq!(
|
||||
candidates[0].validator_indices,
|
||||
bitvec::bitvec![bitvec::order::Lsb0, u8; 1, 0, 1, 1],
|
||||
);
|
||||
|
||||
virtual_overseer.send(FromOverseer::Signal(
|
||||
OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::stop_work(test_state.relay_parent)))
|
||||
|
||||
@@ -10,7 +10,7 @@ tracing = "0.1.22"
|
||||
tracing-futures = "0.2.4"
|
||||
|
||||
sp-core = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
parity-scale-codec = { version = "1.3.6", default-features = false, features = ["bit-vec", "derive"] }
|
||||
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
|
||||
|
||||
polkadot-primitives = { path = "../../../primitives" }
|
||||
polkadot-parachain = { path = "../../../parachain" }
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
|
||||
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
|
||||
futures = "0.3.12"
|
||||
tracing = "0.1.22"
|
||||
tracing-futures = "0.2.4"
|
||||
|
||||
@@ -367,7 +367,7 @@ fn select_availability_bitfields(
|
||||
|
||||
for (idx, _) in cores.iter().enumerate().filter(|v| !v.1.is_occupied()) {
|
||||
// Bit is set for an unoccupied core - invalid
|
||||
if *bitfield.payload().0.get(idx).unwrap_or(&false) {
|
||||
if *bitfield.payload().0.get(idx).as_deref().unwrap_or(&false) {
|
||||
continue 'a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ futures = "0.3.12"
|
||||
tracing = "0.1.22"
|
||||
tracing-futures = "0.2.4"
|
||||
memory-lru = "0.1.0"
|
||||
parity-util-mem = { version = "0.8.0", default-features = false }
|
||||
parity-util-mem = { version = "0.9.0", default-features = false }
|
||||
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
Reference in New Issue
Block a user