Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade substrate #1198

Merged
merged 9 commits into from
Mar 2, 2023
2,280 changes: 1,245 additions & 1,035 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions crates/pallet-domains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ description = "Subspace domains pallet"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.2.1", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
log = { version = "0.4.17", default-features = false }
pallet-receipts = { version = "0.1.0", default-features = false, path = "../pallet-receipts" }
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }

[dev-dependencies]
sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-trie = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }

[features]
default = ["std"]
Expand Down
16 changes: 8 additions & 8 deletions crates/pallet-feeds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.2.1", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" }

[dev-dependencies]
serde = "1.0.147"
sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
serde = "1.0.152"
sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }

[features]
default = ["std"]
Expand Down
26 changes: 13 additions & 13 deletions crates/pallet-grandpa-finality-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ description = "Pallet to verify GRANDPA finality proofs for Substrate based chai
readme = "README.md"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.2.1", default-features = false }
finality-grandpa = { version = "0.16.0", default-features = false }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
finality-grandpa = { version = "0.16.1", default-features = false }
log = { version = "0.4.17", default-features = false }
num-traits = { version = "0.2.15", default-features = false }
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.147", optional = true }
serde = { version = "1.0.152", optional = true }

# Substrate Dependencies

frame-support = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
frame-system = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
sp-core = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
sp-finality-grandpa = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
sp-runtime = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
sp-std = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
sp-trie = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34", default-features = false }
frame-support = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }
frame-system = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }
sp-consensus-grandpa = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }
sp-core = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }
sp-runtime = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }
sp-std = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }
sp-trie = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232", default-features = false }

[dev-dependencies]
ed25519-dalek = { version = "1.0", default-features = false, features = ["u64_backend"] }
sp-io = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-application-crypto = { git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-io = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-application-crypto = { git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }

[features]
default = ["std"]
Expand All @@ -43,8 +43,8 @@ std = [
"num-traits/std",
"scale-info/std",
"serde",
"sp-consensus-grandpa/std",
"sp-core/std",
"sp-finality-grandpa/std",
"sp-runtime/std",
"sp-std/std",
"sp-trie/std",
Expand Down
8 changes: 4 additions & 4 deletions crates/pallet-grandpa-finality-verifier/src/grandpa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use finality_grandpa::voter_set::VoterSet;
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_finality_grandpa::{
use sp_consensus_grandpa::{
AuthorityId, AuthorityList, AuthoritySignature, ConsensusLog, SetId, GRANDPA_ENGINE_ID,
};
use sp_runtime::traits::Header as HeaderT;
Expand Down Expand Up @@ -187,7 +187,7 @@ where
.checked_add(authority_info.weight().0.into())
.ok_or(Error::ArithematicOverflow)?;
// verify authority signature
if !sp_finality_grandpa::check_message_signature_with_buffer(
if !sp_consensus_grandpa::check_message_signature_with_buffer(
&finality_grandpa::Message::Precommit(signed.precommit.clone()),
&signed.id,
&signed.signature,
Expand Down Expand Up @@ -216,7 +216,7 @@ where

pub(crate) fn find_scheduled_change<H: HeaderT>(
header: &H,
) -> Option<sp_finality_grandpa::ScheduledChange<H::Number>> {
) -> Option<sp_consensus_grandpa::ScheduledChange<H::Number>> {
use sp_runtime::generic::OpaqueDigestItemId;

let id = OpaqueDigestItemId::Consensus(&GRANDPA_ENGINE_ID);
Expand All @@ -237,7 +237,7 @@ pub(crate) fn find_scheduled_change<H: HeaderT>(
/// extracts it.
pub(crate) fn find_forced_change<H: HeaderT>(
header: &H,
) -> Option<(H::Number, sp_finality_grandpa::ScheduledChange<H::Number>)> {
) -> Option<(H::Number, sp_consensus_grandpa::ScheduledChange<H::Number>)> {
use sp_runtime::generic::OpaqueDigestItemId;

let id = OpaqueDigestItemId::Consensus(&GRANDPA_ENGINE_ID);
Expand Down
6 changes: 3 additions & 3 deletions crates/pallet-grandpa-finality-verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use codec::{Decode, Encode};
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_finality_grandpa::SetId;
use sp_consensus_grandpa::SetId;
use sp_std::fmt::Debug;
use sp_std::vec::Vec;

Expand Down Expand Up @@ -70,7 +70,7 @@ pub mod pallet {
use crate::{EncodedBlockHash, EncodedBlockNumber, EncodedHeader, InitializationData};
use finality_grandpa::voter_set::VoterSet;
use frame_support::pallet_prelude::*;
use sp_finality_grandpa::GRANDPA_ENGINE_ID;
use sp_consensus_grandpa::GRANDPA_ENGINE_ID;
use sp_runtime::traits::{CheckedAdd, CheckedSub, Hash, Header, One, Zero};
use sp_runtime::ArithmeticError;
use sp_std::fmt::Debug;
Expand Down Expand Up @@ -282,7 +282,7 @@ pub mod pallet {
pub(crate) fn try_enact_authority_change<T: Config, C: Chain>(
chain_id: T::ChainId,
header: &C::Header,
current_set_id: sp_finality_grandpa::SetId,
current_set_id: sp_consensus_grandpa::SetId,
) -> DispatchResult {
// We don't support forced changes - at that point governance intervention is required.
ensure!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::grandpa::GrandpaJustification;
use crate::tests::keyring::{test_keyring, Account};
use crate::tests::valid_extrinsics_root;
use codec::Encode;
use sp_finality_grandpa::{AuthorityId, AuthoritySignature, AuthorityWeight, SetId};
use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, AuthorityWeight, SetId};
use sp_runtime::traits::{Header as HeaderT, One, Zero};
use sp_std::prelude::*;

Expand Down Expand Up @@ -167,7 +167,7 @@ pub(crate) fn signed_precommit<H: HeaderT>(
target_number: target.1,
};

let encoded = sp_finality_grandpa::localized_payload(
let encoded = sp_consensus_grandpa::localized_payload(
round,
set_id,
&finality_grandpa::Message::Precommit(precommit.clone()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use codec::Encode;
use ed25519_dalek::{Keypair, PublicKey, SecretKey, Signature};
use finality_grandpa::voter_set::VoterSet;
use sp_finality_grandpa::{AuthorityId, AuthorityList, AuthorityWeight};
use sp_consensus_grandpa::{AuthorityId, AuthorityList, AuthorityWeight};
use sp_std::prelude::*;

/// Set of test accounts with friendly names.
Expand Down
4 changes: 2 additions & 2 deletions crates/pallet-grandpa-finality-verifier/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use frame_support::{assert_err, assert_ok};
use justification::*;
use keyring::*;
use mock::{run_test, ChainId, TestRuntime};
use sp_consensus_grandpa::{ConsensusLog, ScheduledChange, GRANDPA_ENGINE_ID};
use sp_core::Hasher as HasherT;
use sp_finality_grandpa::{ConsensusLog, ScheduledChange, GRANDPA_ENGINE_ID};
use sp_runtime::generic::SignedBlock;
use sp_runtime::traits::{BlakeTwo256, Hash, Header};
use sp_runtime::{generic, Digest, DigestItem, DispatchError};
Expand Down Expand Up @@ -86,7 +86,7 @@ fn valid_justification_accepted_with_single_fork() {
#[test]
fn valid_justification_accepted_with_arbitrary_number_of_authorities() {
use finality_grandpa::voter_set::VoterSet;
use sp_finality_grandpa::AuthorityId;
use sp_consensus_grandpa::AuthorityId;

let n = 15;
let authorities = accounts(n).iter().map(|k| (*k, 1)).collect::<Vec<_>>();
Expand Down
16 changes: 8 additions & 8 deletions crates/pallet-object-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.2.1", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" }

[dev-dependencies]
serde = "1.0.147"
sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
serde = "1.0.152"
sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-runtime = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }

[features]
default = ["std"]
Expand Down
14 changes: 7 additions & 7 deletions crates/pallet-offences-subspace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.2.1", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }

[dev-dependencies]
sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "100d6c90d4122578006a47c1dcaf155b9c685f34" }
sp-io = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
sp-core = { version = "7.0.0", git = "https://github.com/subspace/substrate", rev = "456cfad45a178617f6886ec400c312f2fea59232" }
schnorrkel = "0.9.1"

[features]
Expand Down
Loading