Skip to content

Commit

Permalink
v0.7 dependency updates (paritytech#259)
Browse files Browse the repository at this point in the history
* Use official ethereum crate at version 0.7

* Point frontier at v0.7-moonbeam

* Bump Ethereum, cumulus/polkadot/substrate

Ethereum: v0.7
cumulus: 28d1d00747e1e60a3e26f0112b4580c805fa1557
polkadot: ce03f37
substrate: ca63242

* s/cumulus-primitives/cumulus-primitives-core/

* Remove cumulus-runtime; bump substrate-wasm-builder version

* Rename cumulus packages and update Cargo.lock

* Reflect rename of cumulus_primitives -> cumulus_primitives

* s/cumulus_service/cumulus_client_service/

* Update rust-toolchain from 2020-10-03 -> 2021-01-13

* More renaming to reflect upstream refactors

* Bump frontier c364ac4 -> 0db6896

* Bump frontier from 0bd068ab -> cf4be1a

* Update Cargo.lock

* Reflect upstream naming changes

* Update Cargo.lock

* Reflect more upstream name changes

* More fixes

* Reflect StartCollatorParams refactor

* Reflect ParachainInherentData refactor

* Bump frontier from cf4be1a -> 23f8442

* Use ethereum from current master (commit f11532e)

* Remove dead code

* cargo fmt

* fix author inherent mock

* fix stake mock and tests

* cargo fmt

* oops, how did dev_service.rs come back?

* Pass the wrapped FrontierBlockImport to build_relay_chain_consensus

* Update dependencies so as not to conflict with substrate

* Bump deps to avoid conflict with polkadot/cumulus

* Reflect frame_support logging refactor

* Point ethereum dependency back to official crate

* Point frontier branch to notlesh-substrate-a8c2bc66

* Point substrate back to a8c2bc6

* Bump substrate, polkadot, and cumulus

* Point frontier to correct branch in Cargo.toml files

* Update Cargo.lock

* Update RandomnessSource to include BlockNumber type

* Reflect Cumulus change to register_validate_block

* Add OnChargeTransaction

* Use polkadot commit c8649e5

* Point frontier to new PR

* Use frontier branch 1cf3f5b

* Update frontier to 3c0c13e

* Pass std feature through grandpa, update Cargo.lock

* Point frontier at 7866ef0

* Point frontier to d214085

* Point frontier to 6f48d04

* Disable logging in runtime on release build

* Point frontier to a65d617

* Incremental service refactor

* More incremental service.rs refactor

* Update trait impl method signature and unused telemetry argument

* Remove wrapping Option in GenesisConfig

* Add frontier_backend

* Add overrides to EthApi

* Remove dead code

* Point polkadot to PureStake/polkadot @ moonbeam-v0.7

* Point cumulus at PureStake/cumulus @ moonbeam-v0.7

* Bump binary version to v0.7.0

* Point frontier to PureStake/notlesh-moonbeam-v0.7

* Point frontier to 3fde366

* Updates script tu support purestake/polkadot repo

* Bump Frontier commit

* Point all substrate crates at 97ecd62

* Update Cargo.lock

* Point cumulus, polkadot, frontier, and substrate at purestake repos

* Hopeful fix for fc-db usage

* Point Cargo.toml files to purestake repos

* Update frontier from 383eb23 -> 52c691f

* Fixes for fc-mapping-sync

* Initialize frontier-mapping-sync-worker in dev service

* Update @polkadotjs/apps

* Update tests to reflect totalDiffullty returning 0 instead of null

* Substrate to rococo-v1#1404f2af

* prettier

* Fix test mocks

* master.into() // but staking tests fail. I probably botched that part of the merge.

* Fix staking tests

I'm not sure why the index changed, but it doesn't seem relevant to what 
we're trying to test. Ultimately we got the same error that Amar was 
expecting.

* little cleanup

* Fixes launching scripts

* Revert "Fixes launching scripts"

This reverts commit 53dca638b4d190fb4ad77a34225fc90d3adec4ee.

* Updates spec template for parachainStaking

* Both services compile

* Fix formatting

* Update moonbeam-types-bundle/package-lock.json

* Update gas limit used in subscription tests

* Update another low gas value in test-filter-api.ts

* Point to net_peerCount hex string fix in frontier

* Adds test failing contract should not generate log

* Moves test to the end to avoid breaking ordered tests

* point at runtime net version getter

* Generic BlockNumber type

* cargo fmt

* log version 0.4 and minor cleanup

* Crude attempt at documentating the updated gas cost of test transaction

* Revert change to alphanet parachain execution mode

* More thorough approach to magic gas constant

* [so much] prettier

* Prettier still

* Bump spec_version from 26 -> 27

Co-authored-by: Joshy Orndorff <[email protected]>
Co-authored-by: Crystalin <[email protected]>
Co-authored-by: Gorka Irazoqui <[email protected]>
Co-authored-by: Joshy Orndorff <[email protected]>
  • Loading branch information
5 people authored Mar 26, 2021
1 parent ae373f4 commit e6f98b5
Show file tree
Hide file tree
Showing 42 changed files with 2,778 additions and 2,504 deletions.
3,508 changes: 1,985 additions & 1,523 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions client/rpc-core/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ license = 'GPL-3.0-only'
repository = 'https://github.com/PureStake/moonbeam/'

[dependencies]
# ethereum = { git = "https://github.com/rust-blockchain/ethereum", branch = "master", features = ["with-codec"] }
ethereum = { git = "https://github.com/notlesh/ethereum", branch = "notlesh-moonbeam-v0.6", features = ["with-codec"] }
ethereum = { version = "0.7.1", default-features = false, features = ["with-codec"] }
ethereum-types = "0.11.0"
jsonrpc-core = "15.0.0"
jsonrpc-core-client = "14.0.3"
jsonrpc-derive = "14.0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
17 changes: 8 additions & 9 deletions client/rpc/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ repository = 'https://github.com/PureStake/moonbeam/'
sha3 = "0.8"
jsonrpc-core = "15.0.0"
ethereum-types = "0.11.0"
# ethereum = { git = "https://github.com/rust-blockchain/ethereum", branch = "master", features = ["with-codec"] }
ethereum = { git = "https://github.com/notlesh/ethereum", branch = "notlesh-moonbeam-v0.6", features = ["with-codec"] }
ethereum = { version = "0.7.1", default-features = false, features = ["with-codec"] }
moonbeam-rpc-core-txpool = { path = "../../rpc-core/txpool" }
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
serde = { version = "1.0", features = ["derive"] }

moonbeam-rpc-primitives-txpool = { path = "../../../primitives/rpc/txpool" }
3 changes: 2 additions & 1 deletion docker/polkadot-relay.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LABEL description="This is the build stage for Polkadot. Here we create the bina

ARG PROFILE=release
ARG POLKADOT_COMMIT=master
ARG POLKADOT_REPO=https://github.com/paritytech/polkadot
RUN echo "Using polkadot ${POLKADOT_COMMIT}"
WORKDIR /

Expand All @@ -16,7 +17,7 @@ RUN apt-get update && \

# Grab the Polkadot Code
# TODO how to grab the correct commit from the lock file?
RUN git clone https://github.com/paritytech/polkadot
RUN git clone ${POLKADOT_REPO}
WORKDIR /polkadot
RUN git checkout ${POLKADOT_COMMIT}

Expand Down
2 changes: 1 addition & 1 deletion moonbeam-types-bundle/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 63 additions & 59 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = 'moonbeam'
description = 'Moonbeam Collator'
homepage = 'https://moonbeam.network'
license = 'GPL-3.0-only'
version = '0.6.1'
version = '0.7.0'
authors = ["PureStake"]
build = 'build.rs'
edition = '2018'
Expand All @@ -14,10 +14,10 @@ path = 'src/main.rs'

[dependencies]
async-io = "1.3"
derive_more = '0.15.0'
derive_more = '0.99'
exit-future = '0.1.4'
futures = { version = "0.3.1", features = ["compat"] }
log = '0.4.8'
log = '0.4'
parking_lot = '0.9.0'
trie-root = '0.15.2'
parity-scale-codec = '2.0.0'
Expand All @@ -38,64 +38,68 @@ moonbeam-rpc-primitives-txpool = { path = "../primitives/rpc/txpool" }
author-inherent = { path = "../pallets/author-inherent"}

# Substrate dependencies
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["wasmtime"] }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["wasmtime"] }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-transaction-graph = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-informant = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", features = ["wasmtime"] }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", features = ["wasmtime"] }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-transaction-graph = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-informant = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }

evm = { package = "pallet-evm", git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
ethereum = { package = "pallet-ethereum", git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
evm = { package = "pallet-evm", git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
ethereum = { package = "pallet-ethereum", git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }

fc-consensus = { git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
fp-consensus = { git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "v0.6-moonbeam" }
fc-consensus = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
fp-consensus = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
fc-db = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }
fc-mapping-sync = { git = "https://github.com/purestake/frontier", branch = "notlesh-moonbeam-v0.7" }

# Cumulus dependencies
cumulus-consensus = { git = "https://github.com/paritytech/cumulus", branch = "master" }
cumulus-collator = { git = "https://github.com/paritytech/cumulus", branch = "master" }
cumulus-network = { git = "https://github.com/paritytech/cumulus", branch = "master" }
cumulus-primitives = { git = "https://github.com/paritytech/cumulus", branch = "master" }
cumulus-service = { git = "https://github.com/paritytech/cumulus", branch = "master" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "master" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1" }

# Polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }

[dev-dependencies]
assert_cmd = "0.12"
Expand All @@ -104,11 +108,11 @@ rand = "0.7.3"
tokio = { version = "0.2.13", features = ["macros"] }

# Polkadot dev-dependencies
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-test-runtime = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }
polkadot-test-runtime = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" }

# Substrate dev-dependencies
pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master" }
substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" }
substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" }
32 changes: 16 additions & 16 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! https://substrate.dev/docs/en/knowledgebase/integrate/chain-spec
use bip39::{Language, Mnemonic, Seed};
use cumulus_primitives::ParaId;
use cumulus_primitives_core::ParaId;
use log::debug;
use moonbeam_runtime::{
AccountId, Balance, BalancesConfig, DemocracyConfig, EVMConfig, EthereumChainIdConfig,
Expand Down Expand Up @@ -231,34 +231,34 @@ fn testnet_genesis(
chain_id: u64,
) -> GenesisConfig {
GenesisConfig {
frame_system: Some(SystemConfig {
frame_system: SystemConfig {
code: WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
}),
pallet_balances: Some(BalancesConfig {
},
pallet_balances: BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1 << 80))
.collect(),
}),
pallet_sudo: Some(SudoConfig { key: root_key }),
parachain_info: Some(ParachainInfoConfig {
},
pallet_sudo: SudoConfig { key: root_key },
parachain_info: ParachainInfoConfig {
parachain_id: para_id,
}),
pallet_ethereum_chain_id: Some(EthereumChainIdConfig { chain_id }),
pallet_evm: Some(EVMConfig {
},
pallet_ethereum_chain_id: EthereumChainIdConfig { chain_id },
pallet_evm: EVMConfig {
accounts: BTreeMap::new(),
}),
pallet_ethereum: Some(EthereumConfig {}),
pallet_democracy: Some(DemocracyConfig {}),
pallet_scheduler: Some(SchedulerConfig {}),
parachain_staking: Some(ParachainStakingConfig {
},
pallet_ethereum: EthereumConfig {},
pallet_democracy: DemocracyConfig {},
pallet_scheduler: SchedulerConfig {},
parachain_staking: ParachainStakingConfig {
stakers,
inflation_config,
}),
},
}
}

Expand Down
30 changes: 22 additions & 8 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ use crate::{
chain_spec,
cli::{Cli, RelayChainCli, Subcommand},
};
use cumulus_primitives::{genesis::generate_genesis_block, ParaId};
use cumulus_client_service::genesis::generate_genesis_block;
use cumulus_primitives_core::ParaId;
use log::info;
use moonbeam_runtime::{AccountId, Block};
use parity_scale_codec::Encode;
Expand Down Expand Up @@ -185,12 +186,19 @@ pub fn run() -> Result<()> {
Some(Subcommand::CheckBlock(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.async_run(|config| {
let extension = chain_spec::Extensions::try_get(&*config.chain_spec);
let relay_chain_id = extension.map(|e| e.relay_chain.clone());

let PartialComponents {
client,
task_manager,
import_queue,
..
} = crate::service::new_partial(&config, None, false)?;
} = if cli.run.dev_service || relay_chain_id == Some("dev-service".to_string()) {
crate::service::dev_partial(&config, None, false)?
} else {
crate::service::parachain_partial(&config, None, false)?
};
Ok((cmd.run(client, import_queue), task_manager))
})
}
Expand All @@ -201,7 +209,7 @@ pub fn run() -> Result<()> {
client,
task_manager,
..
} = crate::service::new_partial(&config, None, false)?;
} = crate::service::parachain_partial(&config, None, false)?;
Ok((cmd.run(client, config.database), task_manager))
})
}
Expand All @@ -212,19 +220,26 @@ pub fn run() -> Result<()> {
client,
task_manager,
..
} = crate::service::new_partial(&config, None, false)?;
} = crate::service::parachain_partial(&config, None, false)?;
Ok((cmd.run(client, config.chain_spec), task_manager))
})
}
Some(Subcommand::ImportBlocks(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.async_run(|config| {
let extension = chain_spec::Extensions::try_get(&*config.chain_spec);
let relay_chain_id = extension.map(|e| e.relay_chain.clone());

let PartialComponents {
client,
task_manager,
import_queue,
..
} = crate::service::new_partial(&config, None, false)?;
} = if cli.run.dev_service || relay_chain_id == Some("dev-service".to_string()) {
crate::service::dev_partial(&config, None, false)?
} else {
crate::service::parachain_partial(&config, None, false)?
};
Ok((cmd.run(client, import_queue), task_manager))
})
}
Expand All @@ -240,7 +255,7 @@ pub fn run() -> Result<()> {
task_manager,
backend,
..
} = crate::service::new_partial(&config, None, false)?;
} = crate::service::parachain_partial(&config, None, false)?;
Ok((cmd.run(client, backend), task_manager))
})
}
Expand Down Expand Up @@ -357,7 +372,6 @@ pub fn run() -> Result<()> {
&polkadot_cli,
&polkadot_cli,
task_executor,
config.telemetry_handle.clone(),
)
.map_err(|err| format!("Relay chain argument error: {}", err))?;

Expand Down Expand Up @@ -441,7 +455,7 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.prometheus_config(default_listen_port)
}

fn init<C: SubstrateCli>(&self) -> Result<sc_telemetry::TelemetryWorker> {
fn init<C: SubstrateCli>(&self) -> Result<()> {
unreachable!("PolkadotCli is never initialized; qed");
}

Expand Down
Loading

0 comments on commit e6f98b5

Please sign in to comment.