Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
43fcd63
Update to Substrate master
liuchengxu Nov 16, 2020
ac138c8
Merge branch 'develop-2.0' of https://github.com/chainx-org/ChainX in…
liuchengxu Nov 16, 2020
aac8bcd
Make the failed extrinsic log message distinguishable
liuchengxu Nov 16, 2020
22bd0bb
Use the default SubstrateWeight for Substrate pallets
liuchengxu Nov 16, 2020
2ddb3bc
Fix runtime-benchmarks building
liuchengxu Nov 16, 2020
b948997
Remove finality-tracker module
liuchengxu Nov 16, 2020
8583d7b
Update wasm-builder-runner to 2.0.0
liuchengxu Nov 16, 2020
c6eda9f
Add run_benchmarks.sh
liuchengxu Nov 17, 2020
ea8954c
Apply suggestions
liuchengxu Nov 17, 2020
29498ed
Remove useless comment
liuchengxu Nov 17, 2020
b69ae0c
Regenerate weights for xpallet-mining-staking
liuchengxu Nov 17, 2020
8a2bd32
Run rustfmt on the generated weights.rs
liuchengxu Nov 17, 2020
05c1291
Regenerate weights for xpallet-dex-spt
liuchengxu Nov 17, 2020
2b577a7
Regenerate weights for xpallet-assets-registrar
liuchengxu Nov 17, 2020
5109a97
Regenerate weights for xpallet-mining-asset
liuchengxu Nov 17, 2020
2220203
Regenerate weights for xpallet-gateway-{common, records}
liuchengxu Nov 17, 2020
0682c24
Only xpallet-gateway-bitcoin weights generation failed
liuchengxu Nov 17, 2020
90360a2
Merge branch 'develop-2.0' of https://github.com/chainx-org/ChainX in…
liuchengxu Nov 17, 2020
7d95ea0
Remove build-sync-spec
liuchengxu Nov 18, 2020
b694df0
Merge branch 'develop-2.0' of https://github.com/chainx-org/ChainX in…
liuchengxu Nov 18, 2020
013a61d
Update to https://github.com/paritytech/substrate/commit/11ace4ef8b2a…
liuchengxu Nov 18, 2020
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,702 changes: 909 additions & 793 deletions Cargo.lock

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,91 @@ cli = { package = "chainx-cli", path = "cli" }
[target.'cfg(target_arch="x86_64")'.dependencies]
cli = { package = "chainx-cli", path = "cli", features = [ "wasmtime" ] }

[patch.crates-io]
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-cli = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-client-api = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-client-db = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-consensus = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-consensus-slots = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-executor = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-informant = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-keystore = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-network = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-offchain = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-rpc = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-service = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }

sp-api = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-consensus = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-core = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-inherents = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-io = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-keystore = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-offchain = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-rpc = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-session = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-staking = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-std = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-storage = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-tracing = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-trie = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
sp-version = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }

frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
frame-executive = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
frame-support = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
frame-system = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }

substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }

pallet-authorship = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-babe = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-balances = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-collective = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-democracy = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-grandpa = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-identity = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-im-online = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-indices = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-membership = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-multisig = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-offences = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-scheduler = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-session = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-sudo = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-treasury = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }
pallet-utility = { git = "https://github.com/paritytech/substrate", rev = "11ace4ef8b2ad176293ad6db2b3dd795befd2c79" }

[workspace]
members = [
"cli",
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sc-chain-spec = "2.0.0"
sc-client-api = "2.0.0"
sc-consensus = "0.8.0"
sc-consensus-babe = "0.8.0"
sc-consensus-slots = "0.8.0"
sc-executor = "0.8.0"
sc-finality-grandpa = "0.8.0"
sc-network = "0.8.0"
Expand Down
3 changes: 0 additions & 3 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ pub enum Subcommand {
/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),

/// Build a chain specification with a light client sync state.
BuildSyncSpec(sc_cli::BuildSyncSpecCmd),

/// Validate blocks.
CheckBlock(sc_cli::CheckBlockCmd),

Expand Down
30 changes: 6 additions & 24 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use sc_service::PartialComponents;

use crate::chain_spec;
use crate::cli::{Cli, Subcommand};
use crate::service::{self, new_full_base, new_partial, NewFullBase};
use crate::service::{self, new_partial};

impl SubstrateCli for Cli {
fn impl_name() -> String {
Expand Down Expand Up @@ -97,9 +97,11 @@ pub fn run() -> sc_cli::Result<()> {
let chain_spec = &runner.config().chain_spec;
set_default_ss58_version(chain_spec);

runner.run_node_until_exit(|config| match config.role {
Role::Light => service::new_light(config),
_ => service::new_full(config),
runner.run_node_until_exit(|config| async move {
match config.role {
Role::Light => service::new_light(config),
_ => service::new_full(config),
}
})
}
Some(Subcommand::Benchmark(cmd)) => {
Expand Down Expand Up @@ -130,26 +132,6 @@ pub fn run() -> sc_cli::Result<()> {

runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
}
Some(Subcommand::BuildSyncSpec(cmd)) => {
let runner = cli.create_runner(cmd)?;
set_default_ss58_version(&runner.config().chain_spec);

runner.async_run(|config| {
let chain_spec = config.chain_spec.cloned_box();
let network_config = config.network.clone();
let NewFullBase {
task_manager,
client,
network_status_sinks,
..
} = new_full_base(config)?;

Ok((
cmd.run(chain_spec, network_config, client, network_status_sinks),
task_manager,
))
})
}
Some(Subcommand::CheckBlock(cmd)) => {
let runner = cli.create_runner(cmd)?;
set_default_ss58_version(&runner.config().chain_spec);
Expand Down
3 changes: 1 addition & 2 deletions cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ fn read_config_file(path: &Path) -> Result<HashMap<String, Value>, Box<dyn std::
}))
}

const SUB_COMMANDS: [&str; 14] = [
const SUB_COMMANDS: [&str; 13] = [
"benchmark",
"build-spec",
"build-sync-spec",
"check-block",
"export-blocks",
"export-state",
Expand Down
Loading