Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
update to polkadot-v0.9.37
Browse files Browse the repository at this point in the history
  • Loading branch information
weezy20 committed Jan 28, 2023
1 parent 17e5697 commit 461ef3d
Show file tree
Hide file tree
Showing 8 changed files with 1,572 additions and 803 deletions.
2,118 changes: 1,442 additions & 676 deletions Cargo.lock

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,61 +20,61 @@ serde = {version = "1.0.152", features = ["derive"]}
parachain-template-runtime = {path = "../runtime"}

# Substrate
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-network-common = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", optional = true}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-runtime = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
substrate-frame-rpc-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-network-common = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", optional = true}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-runtime = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
substrate-frame-rpc-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}

# Polkadot
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36"}
xcm = {git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.36"}
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37"}
xcm = {git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.37"}

# Cumulus
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-relay-chain-inprocess-interface = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-relay-chain-interface = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-relay-chain-minimal-node = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-relay-chain-rpc-interface = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36"}
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-relay-chain-inprocess-interface = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-relay-chain-interface = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-relay-chain-minimal-node = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}
cumulus-relay-chain-rpc-interface = {git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.37"}

[build-dependencies]
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36"}
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37"}

[features]
default = []
Expand Down
19 changes: 9 additions & 10 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub fn run() -> Result<()> {
let runner = cli.create_runner(cmd)?;
// Switch on the concrete benchmark sub-command-
match cmd {
BenchmarkCmd::Pallet(cmd) =>
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<Block, ParachainNativeExecutor>(config))
} else {
Expand All @@ -205,22 +205,24 @@ pub fn run() -> Result<()> {
cmd.run(partials.client)
}),
#[cfg(not(feature = "runtime-benchmarks"))]
BenchmarkCmd::Storage(_) =>
BenchmarkCmd::Storage(_) => {
return Err(sc_cli::Error::Input(
"Compile with --features=runtime-benchmarks \
to enable storage benchmarks."
.into(),
)
.into()),
.into())
},
#[cfg(feature = "runtime-benchmarks")]
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
let partials = new_partial(&config)?;
let db = partials.backend.expose_db();
let storage = partials.backend.expose_storage();
cmd.run(config, partials.client.clone(), db, storage)
}),
BenchmarkCmd::Machine(cmd) =>
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())),
BenchmarkCmd::Machine(cmd) => {
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()))
},
// NOTE: this allows the Client to leniently implement
// new benchmark commands without requiring a companion MR.
#[allow(unreachable_patterns)]
Expand Down Expand Up @@ -256,14 +258,11 @@ pub fn run() -> Result<()> {
let collator_options = cli.run.collator_options();

runner.run_node_until_exit(|config| async move {
let hwbench = if !cli.no_hardware_benchmarks {
let hwbench = (!cli.no_hardware_benchmarks).then_some(
config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(&database_path);
sc_sysinfo::gather_hwbench(Some(database_path))
})
} else {
None
};
})).flatten();

let para_id = chain_spec::Extensions::try_get(&*config.chain_spec)
.map(|e| e.para_id)
Expand Down
20 changes: 10 additions & 10 deletions pallets/motion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
] }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }

[dev-dependencies]
sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" }
pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" }
pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" }
sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.37" }
pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.37" }
pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.37" }

[features]
default = ["std"]
Expand Down
15 changes: 9 additions & 6 deletions pallets/motion/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ fn setup_proposal(threshold: u32, motion_type: MotionType) -> Proposal {

// Setup motion with specified origin type
let motion = match motion_type {
MotionType::SimpleMajority =>
RuntimeCall::Motion(pallet_motion::Call::simple_majority { call: Box::new(inner_call) }),
MotionType::SuperMajority =>
RuntimeCall::Motion(pallet_motion::Call::super_majority { call: Box::new(inner_call) }),
MotionType::Unanimous =>
RuntimeCall::Motion(pallet_motion::Call::unanimous { call: Box::new(inner_call) }),
MotionType::SimpleMajority => {
RuntimeCall::Motion(pallet_motion::Call::simple_majority { call: Box::new(inner_call) })
},
MotionType::SuperMajority => {
RuntimeCall::Motion(pallet_motion::Call::super_majority { call: Box::new(inner_call) })
},
MotionType::Unanimous => {
RuntimeCall::Motion(pallet_motion::Call::unanimous { call: Box::new(inner_call) })
},
};

let proposal_len: u32 = motion.using_encoded(|p| p.len() as u32);
Expand Down
Loading

0 comments on commit 461ef3d

Please sign in to comment.