Skip to content

Commit 1a93fd5

Browse files
authored
Merge pull request #2426 from subspace/substrate-upgrade-cleanups
Substrate upgrade cleanups
2 parents c18e0dc + 4fa3e67 commit 1a93fd5

File tree

21 files changed

+153
-270
lines changed

21 files changed

+153
-270
lines changed

Cargo.lock

Lines changed: 115 additions & 236 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ panic = "unwind"
8989
inherits = "release"
9090
lto = "fat"
9191

92+
[patch.crates-io]
93+
# TODO: Switch to stable release once https://github.com/paritytech/substrate-bip39/pull/20 is published
94+
substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39", rev = "03f02a7225d9bc5add92b7657790ee1ac8ab90a4" }
95+
9296
# Reason: We need to patch substrate dependency of frontier to our fork
9397
# TODO: Remove if/when we are using upstream substrate instead of fork
9498
[patch."https://github.com/paritytech/polkadot-sdk.git"]

crates/pallet-offences-subspace/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sp-std = { version = "8.0.0", default-features = false, git = "https://github.co
2424
[dev-dependencies]
2525
sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2626
sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
27-
schnorrkel = "0.9.1"
27+
schnorrkel = "0.11.4"
2828

2929
[features]
3030
default = ["std"]

crates/pallet-subspace/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ frame-support = { version = "4.0.0-dev", default-features = false, git = "https:
1919
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2020
log = { version = "0.4.20", default-features = false }
2121
scale-info = { version = "2.7.0", default-features = false, features = ["derive"] }
22-
schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] }
22+
schnorrkel = { version = "0.11.4", default-features = false }
2323
serde = { version = "1.0.195", optional = true, default-features = false, features = ["derive"] }
2424
sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" }
2525
sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }

crates/sc-consensus-subspace/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ parking_lot = "0.12.1"
2121
rand = "0.8.5"
2222
rand_chacha = "0.3.1"
2323
rayon = "1.8.0"
24-
schnorrkel = "0.9.1"
24+
schnorrkel = "0.11.4"
2525
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2626
sc-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2727
sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }

crates/sc-consensus-subspace/src/slot_worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ where
417417
// Ensure proof of time is valid according to parent block
418418
if !self.pot_verifier.is_output_valid(
419419
pot_input,
420-
Slot::from(u64::from(slot) - u64::from(parent_slot)),
420+
slot - parent_slot,
421421
proof_of_time,
422422
parent_pot_parameters.next_parameters_change(),
423423
) {

crates/sc-proof-of-time/src/source/gossip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ where
580580
match GossipProof::decode(&mut data) {
581581
Ok(proof) => {
582582
let next_slot_input = self.state.next_slot_input(atomic::Ordering::Relaxed);
583-
let current_slot = Slot::from(u64::from(next_slot_input.slot) - 1);
583+
let current_slot = next_slot_input.slot - Slot::from(1);
584584

585585
if proof.slot < current_slot {
586586
trace!(

crates/sp-consensus-subspace/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async-trait = { version = "0.1.73", optional = true }
1717
codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false }
1818
log = { version = "0.4.20", default-features = false }
1919
scale-info = { version = "2.7.0", default-features = false, features = ["derive"] }
20-
schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] }
20+
schnorrkel = { version = "0.11.4", default-features = false }
2121
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2222
sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2323
sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }

crates/sp-lightclient/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include = [
1818
[dependencies]
1919
codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false }
2020
scale-info = { version = "2.7.0", default-features = false, features = ["derive"] }
21-
schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] }
21+
schnorrkel = { version = "0.11.4", default-features = false }
2222
sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2323
sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
2424
sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace", default-features = false }

crates/subspace-farmer-components/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ libc = "0.2.146"
2727
parity-scale-codec = "3.6.5"
2828
rand = "0.8.5"
2929
rayon = "1.8.0"
30-
schnorrkel = "0.9.1"
30+
schnorrkel = "0.11.4"
3131
serde = { version = "1.0.195", features = ["derive"] }
3232
static_assertions = "1.1.0"
3333
subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" }

0 commit comments

Comments
 (0)