Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
To polkadot-v0.9.36 (#213)
Browse files Browse the repository at this point in the history
* Anchor polkadot-v0.9.36

* Companion for paritytech/cumulus#1860

* Companion for paritytech/cumulus#1876

* Companion for paritytech/cumulus#1904

* Companion for paritytech/substrate#12310

* Companion for paritytech/substrate#12740

* Bump array-bytes to 6.0.0

* Companion for paritytech/substrate#12868

* Companion for paritytech/cumulus#1930

* Companion for paritytech/cumulus#1905

* Companion for paritytech/cumulus#1880

* Companion for paritytech/cumulus#1997

* Companion for paritytech/cumulus#1559

* Prepare messages-substrate

* Companion for paritytech/substrate#12684

* Companion for paritytech/substrate#12740

* Fix compile  paritytech/substrate#12740

* Compile done

* Format

* Add call index

* Compile done

* Fix CI

* Bump moonbeam

* Fix CI

* Try fix tests

* Use into instead of `Compact`

* Patch substrate & Fix compile

* Fix try-runtime

* Remove parity-util-mem

* Format

* Format

* Opt

* Format

* Use `codec::Compact<AssetId>`

* Format

---------

Co-authored-by: Xavier Lau <xavier@inv.cafe>
  • Loading branch information
Guantong and AurevoirXavier committed Feb 7, 2023
1 parent 60d19da commit ead3449
Show file tree
Hide file tree
Showing 61 changed files with 1,770 additions and 1,342 deletions.
1,311 changes: 663 additions & 648 deletions Cargo.lock

Large diffs are not rendered by default.

168 changes: 168 additions & 0 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/inflation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dc-types = { path = "../types" }
substrate-fixed = { default-features = false, git = "https://github.com/encointer/substrate-fixed" }

[dev-dependencies]
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }

[features]
default = ["std"]
Expand Down
6 changes: 3 additions & 3 deletions core/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ version = "6.0.0"
dc-types = { path = "../types" }

# moonbeam
account = { default-features = false, git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.33" }
account = { default-features = false, git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.36" }

# substrate
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }

[features]
default = ["std"]
Expand Down
123 changes: 64 additions & 59 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/darwinia-network/darwinia"
version = "6.0.0"

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

[dependencies]
# crates.io
Expand All @@ -19,21 +19,20 @@ async-trait = { version = "0.1" }
clap = { version = "4.0", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.3" }
futures = { version = "0.3" }
jsonrpsee = { version = "0.15", features = ["server"] }
jsonrpsee = { version = "0.16", features = ["server"] }
log = { version = "0.4" }
serde = { version = "1.0", features = ["derive"] }

# cumulus
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.33" }
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-client-collator = { 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-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }

# darwinia
crab-runtime = { path = "../runtime/crab" }
Expand All @@ -42,57 +41,63 @@ dc-primitives = { path = "../core/primitives" }
pangolin-runtime = { path = "../runtime/pangolin" }

# frontier
fc-cli = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fc-db = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fc-mapping-sync = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fc-rpc = { features = ["rpc_binary_search_estimate"], git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fc-rpc-core = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fp-evm = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fp-rpc = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fp-storage = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.33" }
fc-cli = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fc-consensus = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fc-db = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fc-mapping-sync = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fc-rpc = { features = ["rpc_binary_search_estimate"], git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fc-rpc-core = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fp-evm = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fp-rpc = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }
fp-storage = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.36" }

# polkadot
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" }
polkadot-parachain = { 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", branch = "release-v0.9.36" }

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

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub enum Subcommand {
/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
Benchmark(Box<frame_benchmarking_cli::BenchmarkCmd>),

/// Try some testing command against a specified runtime state.
#[cfg(feature = "try-runtime")]
Expand Down
25 changes: 16 additions & 9 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@ pub fn run() -> Result<()> {
})
},
Some(Subcommand::Benchmark(cmd)) => {
let runner = cli.create_runner(cmd)?;
let runner = cli.create_runner(&**cmd)?;

// Switch on the concrete benchmark sub-command-
match cmd {
match &**cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| {
Expand Down Expand Up @@ -504,22 +504,29 @@ pub fn run() -> Result<()> {
let chain_spec = &runner.config().chain_spec;

set_default_ss58_version(chain_spec);

use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
type HostFunctionsOf<E> = ExtendedHostFunctions<
sp_io::SubstrateHostFunctions,
<E as NativeExecutionDispatch>::ExtendHostFunctions,
>;

// grab the task manager.
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
let task_manager = TaskManager::new(runner.config().tokio_handle.clone(), *registry)
.map_err(|e| format!("Error: {:?}", e))?;

if chain_spec.is_crab() {
runner.async_run(|config| {
Ok((cmd.run::<Block, CrabRuntimeExecutor>(config), task_manager))
runner.async_run(|_| {
Ok((cmd.run::<Block, HostFunctionsOf<CrabRuntimeExecutor>>(), task_manager))
})
} else if chain_spec.is_pangolin() {
runner.async_run(|config| {
Ok((cmd.run::<Block, PangolinRuntimeExecutor>(config), task_manager))
runner.async_run(|_| {
Ok((cmd.run::<Block, HostFunctionsOf<PangolinRuntimeExecutor>>(), task_manager))
})
} else {
runner.async_run(|config| {
Ok((cmd.run::<Block, DarwiniaRuntimeExecutor>(config), task_manager))
runner.async_run(|_| {
Ok((cmd.run::<Block, HostFunctionsOf<DarwiniaRuntimeExecutor>>(), task_manager))
})
}
},
Expand Down Expand Up @@ -570,7 +577,7 @@ pub fn run() -> Result<()> {
if config.role.is_authority() { "yes" } else { "no" }
);

if collator_options.relay_chain_rpc_url.is_some() && !cli.relay_chain_args.is_empty() {
if !collator_options.relay_chain_rpc_urls.is_empty() && !cli.relay_chain_args.is_empty() {
log::warn!("Detected relay chain node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
}

Expand Down
Loading

0 comments on commit ead3449

Please sign in to comment.