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

Asset module migration #260

Merged
merged 41 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d6ec5db
Anchor polkadot-v0.9.36
Jan 17, 2023
6079a59
Companion for paritytech/cumulus#1860
Jan 17, 2023
4e1012c
Companion for paritytech/cumulus#1876
Jan 17, 2023
33dffeb
Companion for paritytech/cumulus#1904
Jan 17, 2023
2260b86
Companion for paritytech/substrate#12310
Jan 17, 2023
69b8b60
Companion for paritytech/substrate#12740
Jan 17, 2023
578ecf9
Bump array-bytes to 6.0.0
Jan 17, 2023
89d724f
Companion for paritytech/substrate#12868
Jan 17, 2023
19e0213
Companion for paritytech/cumulus#1930
Jan 17, 2023
71a09ea
Companion for paritytech/cumulus#1905
Jan 17, 2023
8a7b991
Companion for paritytech/cumulus#1880
Jan 17, 2023
f830826
Companion for paritytech/cumulus#1997
Jan 17, 2023
c120ab2
Companion for paritytech/cumulus#1559
Jan 17, 2023
45d5dd5
Prepare messages-substrate
Jan 28, 2023
e0e43c7
Companion for paritytech/substrate#12684
Jan 28, 2023
2bc644a
Companion for paritytech/substrate#12740
Jan 28, 2023
7458b49
Fix compile paritytech/substrate#12740
Jan 28, 2023
7bd3983
Compile done
Jan 28, 2023
ee6b187
Format
Jan 28, 2023
0fc11d3
Add call index
Jan 29, 2023
6ae68f3
Merge branch 'main' into prepare-polkadot-v0.9.36
Jan 29, 2023
309683a
Compile done
Feb 2, 2023
7107bc0
Merge branch 'main' into prepare-polkadot-v0.9.36
Feb 2, 2023
7b57d0f
Fix CI
Feb 2, 2023
e94375b
Bump moonbeam
Feb 2, 2023
b877161
Merge branch 'main' into prepare-polkadot-v0.9.36
Feb 2, 2023
e24be36
Fix CI
Feb 2, 2023
2cdd2a5
Try fix tests
Feb 3, 2023
65e66ce
Merge branch 'main' into prepare-polkadot-v0.9.36
Feb 3, 2023
d3b7ece
Use into instead of `Compact`
Feb 3, 2023
89593c4
Merge branch 'main' into prepare-polkadot-v0.9.36
Feb 3, 2023
7a5710e
Patch substrate & Fix compile
Feb 3, 2023
e76813d
Merge branch 'prepare-polkadot-v0.9.36' of https://github.com/darwini…
Feb 3, 2023
abd93a0
Fix try-runtime
Feb 3, 2023
1c94d4b
Remove parity-util-mem
Feb 3, 2023
77ecbd4
Companion for https://github.com/paritytech/substrate/pull/12310
boundless-forest Feb 6, 2023
6f85166
Update state processor
boundless-forest Feb 6, 2023
96c09fa
Add type link
boundless-forest Feb 6, 2023
3503118
Merge branch 'main' into bear-migration
boundless-forest Feb 8, 2023
45e1b4d
Fix review issues
boundless-forest Feb 8, 2023
e70ee46
Format
boundless-forest Feb 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions node/src/chain_spec/darwinia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub fn genesis_config() -> ChainSpec {
},
transaction_payment: Default::default(),
assets: AssetsConfig {
assets: vec![(AssetIds::Kton as _, ROOT, true, 1)],
assets: vec![(AssetIds::Kton as AssetId, ROOT, true, 1)],
metadata: vec![(
AssetIds::Kton as _,
b"Darwinia Commitment Token".to_vec(),
Expand Down Expand Up @@ -257,7 +257,7 @@ fn testnet_genesis(
},
transaction_payment: Default::default(),
assets: AssetsConfig {
assets: vec![(AssetIds::Kton as _, ROOT, true, 1)],
assets: vec![(AssetIds::Kton as AssetId, ROOT, true, 1)],
metadata: vec![(
AssetIds::Kton as _,
b"Darwinia Commitment Token".to_vec(),
Expand Down
21 changes: 14 additions & 7 deletions node/src/command.rs
Original file line number Diff line number Diff line change
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