Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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,698 changes: 901 additions & 797 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 = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-cli = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-client-api = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-client-db = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-consensus = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-consensus-slots = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-executor = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-informant = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-keystore = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-network = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-offchain = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-rpc = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-service = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", rev = "77007ed87727a761169d4c57cbeae0151d9efb81" }

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

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

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

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

[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 @@ -94,9 +94,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 @@ -127,26 +129,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
78 changes: 32 additions & 46 deletions cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ use futures::prelude::*;
use sc_client_api::{ExecutorProvider, RemoteBackend};
use sc_finality_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider;
use sc_network::{Event, NetworkService};
use sc_service::{
config::{Configuration, Role},
error::Error as ServiceError,
TaskManager,
};
use sc_service::{config::Configuration, error::Error as ServiceError, TaskManager};
use sp_inherents::InherentDataProviders;
use sp_runtime::traits::Block as BlockT;

Expand Down Expand Up @@ -52,7 +48,7 @@ pub fn new_partial(
>,
ServiceError,
> {
let (client, backend, keystore, task_manager) =
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
let client = Arc::new(client);

Expand Down Expand Up @@ -112,7 +108,7 @@ pub fn new_partial(
let client = client.clone();
let pool = transaction_pool.clone();
let select_chain = select_chain.clone();
let keystore = keystore.clone();
let keystore = keystore_container.sync_keystore();

let rpc_extensions_builder = Box::new(move |deny_unsafe, subscription_executor| {
let deps = chainx_rpc::FullDeps {
Expand Down Expand Up @@ -143,7 +139,7 @@ pub fn new_partial(
client,
backend,
task_manager,
keystore,
keystore_container,
select_chain,
import_queue,
transaction_pool,
Expand All @@ -168,7 +164,7 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>
backend,
mut task_manager,
import_queue,
keystore,
keystore_container,
select_chain,
transaction_pool,
inherent_data_providers,
Expand Down Expand Up @@ -202,6 +198,8 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>

let role = config.role.clone();
let force_authoring = config.force_authoring;
let backoff_authoring_blocks =
Some(sc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default());
let name = config.network.node_name.clone();
let enable_grandpa = !config.disable_grandpa;
let prometheus_registry = config.prometheus_registry().cloned();
Expand All @@ -211,7 +209,7 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>
config,
backend: backend.clone(),
client: client.clone(),
keystore: keystore.clone(),
keystore: keystore_container.sync_keystore(),
network: network.clone(),
rpc_extensions_builder: Box::new(rpc_extensions_builder),
transaction_pool: transaction_pool.clone(),
Expand All @@ -227,6 +225,7 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>

if role.is_authority() {
let proposer = sc_basic_authorship::ProposerFactory::new(
task_manager.spawn_handle(),
client.clone(),
transaction_pool.clone(),
prometheus_registry.as_ref(),
Expand All @@ -236,14 +235,15 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>
sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());

let babe_config = sc_consensus_babe::BabeParams {
keystore: keystore.clone(),
keystore: keystore_container.sync_keystore(),
client: client.clone(),
select_chain,
env: proposer,
block_import,
sync_oracle: network.clone(),
inherent_data_providers: inherent_data_providers.clone(),
force_authoring,
backoff_authoring_blocks,
babe_link,
can_author_with,
};
Expand All @@ -255,45 +255,36 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>
}

// Spawn authority discovery module.
if matches!(role, Role::Authority{..} | Role::Sentry {..}) {
let (sentries, authority_discovery_role) = match role {
sc_service::config::Role::Authority { ref sentry_nodes } => (
sentry_nodes.clone(),
sc_authority_discovery::Role::Authority(keystore.clone()),
),
sc_service::config::Role::Sentry { .. } => {
(vec![], sc_authority_discovery::Role::Sentry)
}
_ => unreachable!("Due to outer matches! constraint; qed."),
};

let dht_event_stream = network
.event_stream("authority-discovery")
.filter_map(|e| async move {
match e {
Event::Dht(e) => Some(e),
_ => None,
}
})
.boxed();
if role.is_authority() {
let authority_discovery_role =
sc_authority_discovery::Role::PublishAndDiscover(keystore_container.keystore());
let dht_event_stream =
network
.event_stream("authority-discovery")
.filter_map(|e| async move {
match e {
Event::Dht(e) => Some(e),
_ => None,
}
});
let (authority_discovery_worker, _service) = sc_authority_discovery::new_worker_and_service(
client.clone(),
network.clone(),
sentries,
dht_event_stream,
Box::pin(dht_event_stream),
authority_discovery_role,
prometheus_registry.clone(),
);

task_manager
.spawn_handle()
.spawn("authority-discovery-worker", authority_discovery_worker);
task_manager.spawn_handle().spawn(
"authority-discovery-worker",
authority_discovery_worker.run(),
);
}

// if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() {
Some(keystore as sp_core::traits::BareCryptoStorePtr)
Some(keystore_container.sync_keystore())
} else {
None
};
Expand All @@ -319,7 +310,6 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>
config,
link: grandpa_link,
network: network.clone(),
inherent_data_providers: inherent_data_providers.clone(),
telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()),
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry,
Expand All @@ -333,11 +323,7 @@ pub fn new_full_base(config: Configuration) -> Result<NewFullBase, ServiceError>
sc_finality_grandpa::run_grandpa_voter(grandpa_config)?,
);
} else {
sc_finality_grandpa::setup_disabled_grandpa(
client.clone(),
&inherent_data_providers,
network.clone(),
)?;
sc_finality_grandpa::setup_disabled_grandpa(network.clone())?;
}

network_starter.start_network();
Expand All @@ -358,7 +344,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {

/// Builds a new service for a light client.
pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
let (client, backend, keystore, mut task_manager, on_demand) =
let (client, backend, keystore_container, mut task_manager, on_demand) =
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;

let select_chain = sc_consensus::LongestChain::new(backend.clone());
Expand Down Expand Up @@ -446,7 +432,7 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
client: client.clone(),
transaction_pool: transaction_pool.clone(),
config,
keystore,
keystore: keystore_container.sync_keystore(),
backend,
network_status_sinks,
system_rpc_tx,
Expand Down
Loading