Migrate back to Substrate master (#528)

* migrate back to Substrate master

* fmt

* clippy
This commit is contained in:
Svyatoslav Nikolsky
2020-11-24 22:39:21 +03:00
committed by Bastian Köcher
parent 698d8d5600
commit dd7242bc79
32 changed files with 307 additions and 307 deletions
+21 -21
View File
@@ -23,30 +23,30 @@ pallet-message-lane-rpc = { path = "../../../modules/message-lane/rpc" }
# Substrate Dependencies # Substrate Dependencies
frame-benchmarking = "2.0" frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-benchmarking-cli = "2.0" frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-basic-authorship = "0.8" sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-cli = "0.8" sc-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-client-api = "2.0" sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-consensus = "0.8" sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-consensus-aura = "0.8" sc-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-executor = "0.8" sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-finality-grandpa = "0.8" sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-finality-grandpa-rpc = "0.8" sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-service = "0.8" sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-rpc = "2.0" sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-transaction-pool = "2.0" sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus = "0.8" sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus-aura = "0.8" sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-inherents = "2.0" sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-finality-grandpa = "2.0" sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
substrate-frame-rpc-system = "2.0" substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[build-dependencies] [build-dependencies]
build-script-utils = { package = "substrate-build-script-utils", version = "2.0" } build-script-utils = { package = "substrate-build-script-utils", version = "2.0" }
frame-benchmarking-cli = "2.0" frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
vergen = "3.1.0" vergen = "3.1.0"
[features] [features]
+5 -3
View File
@@ -152,9 +152,11 @@ pub fn run() -> sc_cli::Result<()> {
} }
None => { None => {
let runner = cli.create_runner(&cli.run)?; let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| match config.role { runner.run_node_until_exit(|config| async move {
Role::Light => service::new_light(config), match config.role {
_ => service::new_full(config), Role::Light => service::new_light(config),
_ => service::new_full(config),
}
}) })
} }
} }
+41 -42
View File
@@ -28,16 +28,13 @@
// ===================================================================================== // =====================================================================================
// ===================================================================================== // =====================================================================================
use bp_message_lane::{LaneId, MessageNonce};
use bp_runtime::{InstanceId, RIALTO_BRIDGE_INSTANCE};
use millau_runtime::{self, opaque::Block, RuntimeApi}; use millau_runtime::{self, opaque::Block, RuntimeApi};
use sc_client_api::{ExecutorProvider, RemoteBackend}; use sc_client_api::{ExecutorProvider, RemoteBackend};
use sc_executor::native_executor_instance; use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor; pub use sc_executor::NativeExecutor;
use sc_finality_grandpa::{FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState}; use sc_finality_grandpa::SharedVoterState;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use sp_core::storage::StorageKey;
use sp_inherents::InherentDataProviders; use sp_inherents::InherentDataProviders;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
@@ -65,7 +62,12 @@ pub fn new_partial(
sp_consensus::DefaultImportQueue<Block, FullClient>, sp_consensus::DefaultImportQueue<Block, FullClient>,
sc_transaction_pool::FullPool<Block, FullClient>, sc_transaction_pool::FullPool<Block, FullClient>,
( (
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>, sc_consensus_aura::AuraBlockImport<
Block,
FullClient,
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
AuraPair,
>,
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>, sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
), ),
>, >,
@@ -73,7 +75,8 @@ pub fn new_partial(
> { > {
let inherent_data_providers = sp_inherents::InherentDataProviders::new(); let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let (client, backend, keystore, task_manager) = sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?; let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
let client = Arc::new(client); let client = Arc::new(client);
let select_chain = sc_consensus::LongestChain::new(backend.clone()); let select_chain = sc_consensus::LongestChain::new(backend.clone());
@@ -93,9 +96,8 @@ pub fn new_partial(
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
sc_consensus_aura::slot_duration(&*client)?, sc_consensus_aura::slot_duration(&*client)?,
aura_block_import, aura_block_import.clone(),
Some(Box::new(grandpa_block_import.clone())), Some(Box::new(grandpa_block_import)),
None,
client.clone(), client.clone(),
inherent_data_providers.clone(), inherent_data_providers.clone(),
&task_manager.spawn_handle(), &task_manager.spawn_handle(),
@@ -108,11 +110,11 @@ pub fn new_partial(
backend, backend,
task_manager, task_manager,
import_queue, import_queue,
keystore, keystore_container,
select_chain, select_chain,
transaction_pool, transaction_pool,
inherent_data_providers, inherent_data_providers,
other: (grandpa_block_import, grandpa_link), other: (aura_block_import, grandpa_link),
}) })
} }
@@ -123,15 +125,13 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
backend, backend,
mut task_manager, mut task_manager,
import_queue, import_queue,
keystore, keystore_container,
select_chain, select_chain,
transaction_pool, transaction_pool,
inherent_data_providers, inherent_data_providers,
other: (block_import, grandpa_link), other: (block_import, grandpa_link),
} = new_partial(&config)?; } = new_partial(&config)?;
let finality_proof_provider = GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
let (network, network_status_sinks, system_rpc_tx, network_starter) = let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams { sc_service::build_network(sc_service::BuildNetworkParams {
config: &config, config: &config,
@@ -141,8 +141,6 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
import_queue, import_queue,
on_demand: None, on_demand: None,
block_announce_validator_builder: None, block_announce_validator_builder: None,
finality_proof_request_builder: None,
finality_proof_provider: Some(finality_proof_provider),
})?; })?;
if config.offchain_worker.enabled { if config.offchain_worker.enabled {
@@ -157,12 +155,18 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
let role = config.role.clone(); let role = config.role.clone();
let force_authoring = config.force_authoring; let force_authoring = config.force_authoring;
let backoff_authoring_blocks: Option<()> = None;
let name = config.network.node_name.clone(); let name = config.network.node_name.clone();
let enable_grandpa = !config.disable_grandpa; let enable_grandpa = !config.disable_grandpa;
let prometheus_registry = config.prometheus_registry().cloned(); let prometheus_registry = config.prometheus_registry().cloned();
let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default(); let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default();
let rpc_extensions_builder = { let rpc_extensions_builder = {
use bp_message_lane::{LaneId, MessageNonce};
use bp_runtime::{InstanceId, RIALTO_BRIDGE_INSTANCE};
use sc_finality_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider;
use sp_core::storage::StorageKey;
// This struct is here to ease update process. // This struct is here to ease update process.
/// Millau runtime from message-lane RPC point of view. /// Millau runtime from message-lane RPC point of view.
@@ -232,7 +236,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
sc_service::spawn_tasks(sc_service::SpawnTasksParams { sc_service::spawn_tasks(sc_service::SpawnTasksParams {
network: network.clone(), network: network.clone(),
client: client.clone(), client: client.clone(),
keystore: keystore.clone(), keystore: keystore_container.sync_keystore(),
task_manager: &mut task_manager, task_manager: &mut task_manager,
transaction_pool: transaction_pool.clone(), transaction_pool: transaction_pool.clone(),
telemetry_connection_sinks: telemetry_connection_sinks.clone(), telemetry_connection_sinks: telemetry_connection_sinks.clone(),
@@ -246,21 +250,26 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
})?; })?;
if role.is_authority() { if role.is_authority() {
let proposer = let proposer = sc_basic_authorship::ProposerFactory::new(
sc_basic_authorship::ProposerFactory::new(client.clone(), transaction_pool, prometheus_registry.as_ref()); task_manager.spawn_handle(),
client.clone(),
transaction_pool,
prometheus_registry.as_ref(),
);
let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>( let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>(
sc_consensus_aura::slot_duration(&*client)?, sc_consensus_aura::slot_duration(&*client)?,
client.clone(), client.clone(),
select_chain, select_chain,
block_import, block_import,
proposer, proposer,
network.clone(), network.clone(),
inherent_data_providers.clone(), inherent_data_providers,
force_authoring, force_authoring,
keystore.clone(), backoff_authoring_blocks,
keystore_container.sync_keystore(),
can_author_with, can_author_with,
)?; )?;
@@ -272,7 +281,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
// if the node isn't actively participating in consensus then it doesn't // if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below. // need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() { let keystore = if role.is_authority() {
Some(keystore as sp_core::traits::BareCryptoStorePtr) Some(keystore_container.sync_keystore())
} else { } else {
None None
}; };
@@ -298,7 +307,6 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
config: grandpa_config, config: grandpa_config,
link: grandpa_link, link: grandpa_link,
network, network,
inherent_data_providers,
telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()),
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry, prometheus_registry,
@@ -311,7 +319,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
.spawn_essential_handle() .spawn_essential_handle()
.spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?); .spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?);
} else { } else {
sc_finality_grandpa::setup_disabled_grandpa(client, &inherent_data_providers, network)?; sc_finality_grandpa::setup_disabled_grandpa(network)?;
} }
network_starter.start_network(); network_starter.start_network();
@@ -320,9 +328,11 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
/// Builds a new service for a light client. /// Builds a new service for a light client.
pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> { 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)?; sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
let select_chain = sc_consensus::LongestChain::new(backend.clone());
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
config.transaction_pool.clone(), config.transaction_pool.clone(),
config.prometheus_registry(), config.prometheus_registry(),
@@ -331,20 +341,13 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
on_demand.clone(), on_demand.clone(),
)); ));
let grandpa_block_import = sc_finality_grandpa::light_block_import( let (grandpa_block_import, _) =
client.clone(), sc_finality_grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
backend.clone(),
&(client.clone() as Arc<_>),
Arc::new(on_demand.checker().clone()) as Arc<_>,
)?;
let finality_proof_import = grandpa_block_import.clone();
let finality_proof_request_builder = finality_proof_import.create_finality_proof_request_builder();
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
sc_consensus_aura::slot_duration(&*client)?, sc_consensus_aura::slot_duration(&*client)?,
grandpa_block_import, grandpa_block_import.clone(),
None, Some(Box::new(grandpa_block_import)),
Some(Box::new(finality_proof_import)),
client.clone(), client.clone(),
InherentDataProviders::new(), InherentDataProviders::new(),
&task_manager.spawn_handle(), &task_manager.spawn_handle(),
@@ -352,8 +355,6 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
sp_consensus::NeverCanAuthor, sp_consensus::NeverCanAuthor,
)?; )?;
let finality_proof_provider = GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
let (network, network_status_sinks, system_rpc_tx, network_starter) = let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams { sc_service::build_network(sc_service::BuildNetworkParams {
config: &config, config: &config,
@@ -363,8 +364,6 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
import_queue, import_queue,
on_demand: Some(on_demand.clone()), on_demand: Some(on_demand.clone()),
block_announce_validator_builder: None, block_announce_validator_builder: None,
finality_proof_request_builder: Some(finality_proof_request_builder),
finality_proof_provider: Some(finality_proof_provider),
})?; })?;
if config.offchain_worker.enabled { if config.offchain_worker.enabled {
@@ -386,7 +385,7 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(), telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(),
config, config,
client, client,
keystore, keystore: keystore_container.sync_keystore(),
backend, backend,
network, network,
network_status_sinks, network_status_sinks,
+25 -25
View File
@@ -26,31 +26,31 @@ pallet-substrate-bridge = { path = "../../../modules/substrate", default-feature
# Substrate Dependencies # Substrate Dependencies
frame-executive = { version = "2.0", default-features = false } frame-executive = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system-rpc-runtime-api = { version = "2.0", default-features = false } frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-aura = { version = "2.0", default-features = false } pallet-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-balances = { version = "2.0", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-grandpa = { version = "2.0", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-randomness-collective-flip = { version = "2.0", default-features = false } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-session = { version = "2.0", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-sudo = { version = "2.0", default-features = false } pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-timestamp = { version = "2.0", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-transaction-payment = { version = "2.0", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-api = { version = "2.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-block-builder = { version = "2.0", default-features = false } sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-consensus-aura = { version = "0.8", default-features = false } sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-core = { version = "2.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-inherents = { version = "2.0", default-features = false } sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-finality-grandpa = { version = "2.0", default-features = false } sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-offchain = { version = "2.0", default-features = false } sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-session = { version = "2.0", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-transaction-pool = { version = "2.0", default-features = false } sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-trie = { version = "2.0", default-features = false } sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-version = { version = "2.0", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[build-dependencies] [build-dependencies]
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "2.0.0" } wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "2.0.0" }
+1 -2
View File
@@ -282,8 +282,7 @@ parameter_types! {
} }
impl pallet_transaction_payment::Trait for Runtime { impl pallet_transaction_payment::Trait for Runtime {
type Currency = pallet_balances::Module<Runtime>; type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
type OnTransactionPayment = ();
type TransactionByteFee = TransactionByteFee; type TransactionByteFee = TransactionByteFee;
type WeightToFee = IdentityFee<Balance>; type WeightToFee = IdentityFee<Balance>;
type FeeMultiplierUpdate = (); type FeeMultiplierUpdate = ();
+21 -21
View File
@@ -22,30 +22,30 @@ rialto-runtime = { path = "../runtime" }
# Substrate Dependencies # Substrate Dependencies
frame-benchmarking = "2.0" frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-benchmarking-cli = "2.0" frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-basic-authorship = "0.8" sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-cli = "0.8" sc-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-client-api = "2.0" sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-consensus = "0.8" sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-consensus-aura = "0.8" sc-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-executor = "0.8" sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-finality-grandpa = "0.8" sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-finality-grandpa-rpc = "0.8" sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-service = "0.8" sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-rpc = "2.0" sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-transaction-pool = "2.0" sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus = "0.8" sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus-aura = "0.8" sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-inherents = "2.0" sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-finality-grandpa = "2.0" sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
substrate-frame-rpc-system = "2.0" substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[build-dependencies] [build-dependencies]
build-script-utils = { package = "substrate-build-script-utils", version = "2.0" } build-script-utils = { package = "substrate-build-script-utils", version = "2.0" }
frame-benchmarking-cli = "2.0" frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
vergen = "3.1.0" vergen = "3.1.0"
[features] [features]
+5 -3
View File
@@ -152,9 +152,11 @@ pub fn run() -> sc_cli::Result<()> {
} }
None => { None => {
let runner = cli.create_runner(&cli.run)?; let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| match config.role { runner.run_node_until_exit(|config| async move {
Role::Light => service::new_light(config), match config.role {
_ => service::new_full(config), Role::Light => service::new_light(config),
_ => service::new_full(config),
}
}) })
} }
} }
+41 -42
View File
@@ -28,16 +28,13 @@
// ===================================================================================== // =====================================================================================
// ===================================================================================== // =====================================================================================
use bp_message_lane::{LaneId, MessageNonce};
use bp_runtime::{InstanceId, MILLAU_BRIDGE_INSTANCE};
use rialto_runtime::{self, opaque::Block, RuntimeApi}; use rialto_runtime::{self, opaque::Block, RuntimeApi};
use sc_client_api::{ExecutorProvider, RemoteBackend}; use sc_client_api::{ExecutorProvider, RemoteBackend};
use sc_executor::native_executor_instance; use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor; pub use sc_executor::NativeExecutor;
use sc_finality_grandpa::{FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState}; use sc_finality_grandpa::SharedVoterState;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use sp_core::storage::StorageKey;
use sp_inherents::InherentDataProviders; use sp_inherents::InherentDataProviders;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
@@ -65,7 +62,12 @@ pub fn new_partial(
sp_consensus::DefaultImportQueue<Block, FullClient>, sp_consensus::DefaultImportQueue<Block, FullClient>,
sc_transaction_pool::FullPool<Block, FullClient>, sc_transaction_pool::FullPool<Block, FullClient>,
( (
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>, sc_consensus_aura::AuraBlockImport<
Block,
FullClient,
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
AuraPair,
>,
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>, sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
), ),
>, >,
@@ -73,7 +75,8 @@ pub fn new_partial(
> { > {
let inherent_data_providers = sp_inherents::InherentDataProviders::new(); let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let (client, backend, keystore, task_manager) = sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?; let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
let client = Arc::new(client); let client = Arc::new(client);
let select_chain = sc_consensus::LongestChain::new(backend.clone()); let select_chain = sc_consensus::LongestChain::new(backend.clone());
@@ -93,9 +96,8 @@ pub fn new_partial(
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
sc_consensus_aura::slot_duration(&*client)?, sc_consensus_aura::slot_duration(&*client)?,
aura_block_import, aura_block_import.clone(),
Some(Box::new(grandpa_block_import.clone())), Some(Box::new(grandpa_block_import)),
None,
client.clone(), client.clone(),
inherent_data_providers.clone(), inherent_data_providers.clone(),
&task_manager.spawn_handle(), &task_manager.spawn_handle(),
@@ -108,11 +110,11 @@ pub fn new_partial(
backend, backend,
task_manager, task_manager,
import_queue, import_queue,
keystore, keystore_container,
select_chain, select_chain,
transaction_pool, transaction_pool,
inherent_data_providers, inherent_data_providers,
other: (grandpa_block_import, grandpa_link), other: (aura_block_import, grandpa_link),
}) })
} }
@@ -123,15 +125,13 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
backend, backend,
mut task_manager, mut task_manager,
import_queue, import_queue,
keystore, keystore_container,
select_chain, select_chain,
transaction_pool, transaction_pool,
inherent_data_providers, inherent_data_providers,
other: (block_import, grandpa_link), other: (block_import, grandpa_link),
} = new_partial(&config)?; } = new_partial(&config)?;
let finality_proof_provider = GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
let (network, network_status_sinks, system_rpc_tx, network_starter) = let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams { sc_service::build_network(sc_service::BuildNetworkParams {
config: &config, config: &config,
@@ -141,8 +141,6 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
import_queue, import_queue,
on_demand: None, on_demand: None,
block_announce_validator_builder: None, block_announce_validator_builder: None,
finality_proof_request_builder: None,
finality_proof_provider: Some(finality_proof_provider),
})?; })?;
if config.offchain_worker.enabled { if config.offchain_worker.enabled {
@@ -157,12 +155,18 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
let role = config.role.clone(); let role = config.role.clone();
let force_authoring = config.force_authoring; let force_authoring = config.force_authoring;
let backoff_authoring_blocks: Option<()> = None;
let name = config.network.node_name.clone(); let name = config.network.node_name.clone();
let enable_grandpa = !config.disable_grandpa; let enable_grandpa = !config.disable_grandpa;
let prometheus_registry = config.prometheus_registry().cloned(); let prometheus_registry = config.prometheus_registry().cloned();
let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default(); let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default();
let rpc_extensions_builder = { let rpc_extensions_builder = {
use bp_message_lane::{LaneId, MessageNonce};
use bp_runtime::{InstanceId, MILLAU_BRIDGE_INSTANCE};
use sc_finality_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider;
use sp_core::storage::StorageKey;
// This struct is here to ease update process. // This struct is here to ease update process.
/// Rialto runtime from message-lane RPC point of view. /// Rialto runtime from message-lane RPC point of view.
@@ -231,7 +235,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
sc_service::spawn_tasks(sc_service::SpawnTasksParams { sc_service::spawn_tasks(sc_service::SpawnTasksParams {
network: network.clone(), network: network.clone(),
client: client.clone(), client: client.clone(),
keystore: keystore.clone(), keystore: keystore_container.sync_keystore(),
task_manager: &mut task_manager, task_manager: &mut task_manager,
transaction_pool: transaction_pool.clone(), transaction_pool: transaction_pool.clone(),
telemetry_connection_sinks: telemetry_connection_sinks.clone(), telemetry_connection_sinks: telemetry_connection_sinks.clone(),
@@ -245,21 +249,26 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
})?; })?;
if role.is_authority() { if role.is_authority() {
let proposer = let proposer = sc_basic_authorship::ProposerFactory::new(
sc_basic_authorship::ProposerFactory::new(client.clone(), transaction_pool, prometheus_registry.as_ref()); task_manager.spawn_handle(),
client.clone(),
transaction_pool,
prometheus_registry.as_ref(),
);
let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>( let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>(
sc_consensus_aura::slot_duration(&*client)?, sc_consensus_aura::slot_duration(&*client)?,
client.clone(), client.clone(),
select_chain, select_chain,
block_import, block_import,
proposer, proposer,
network.clone(), network.clone(),
inherent_data_providers.clone(), inherent_data_providers,
force_authoring, force_authoring,
keystore.clone(), backoff_authoring_blocks,
keystore_container.sync_keystore(),
can_author_with, can_author_with,
)?; )?;
@@ -271,7 +280,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
// if the node isn't actively participating in consensus then it doesn't // if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below. // need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() { let keystore = if role.is_authority() {
Some(keystore as sp_core::traits::BareCryptoStorePtr) Some(keystore_container.sync_keystore())
} else { } else {
None None
}; };
@@ -297,7 +306,6 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
config: grandpa_config, config: grandpa_config,
link: grandpa_link, link: grandpa_link,
network, network,
inherent_data_providers,
telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()),
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry, prometheus_registry,
@@ -310,7 +318,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
.spawn_essential_handle() .spawn_essential_handle()
.spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?); .spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?);
} else { } else {
sc_finality_grandpa::setup_disabled_grandpa(client, &inherent_data_providers, network)?; sc_finality_grandpa::setup_disabled_grandpa(network)?;
} }
network_starter.start_network(); network_starter.start_network();
@@ -319,9 +327,11 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
/// Builds a new service for a light client. /// Builds a new service for a light client.
pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> { 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)?; sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
let select_chain = sc_consensus::LongestChain::new(backend.clone());
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
config.transaction_pool.clone(), config.transaction_pool.clone(),
config.prometheus_registry(), config.prometheus_registry(),
@@ -330,20 +340,13 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
on_demand.clone(), on_demand.clone(),
)); ));
let grandpa_block_import = sc_finality_grandpa::light_block_import( let (grandpa_block_import, _) =
client.clone(), sc_finality_grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
backend.clone(),
&(client.clone() as Arc<_>),
Arc::new(on_demand.checker().clone()) as Arc<_>,
)?;
let finality_proof_import = grandpa_block_import.clone();
let finality_proof_request_builder = finality_proof_import.create_finality_proof_request_builder();
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
sc_consensus_aura::slot_duration(&*client)?, sc_consensus_aura::slot_duration(&*client)?,
grandpa_block_import, grandpa_block_import.clone(),
None, Some(Box::new(grandpa_block_import)),
Some(Box::new(finality_proof_import)),
client.clone(), client.clone(),
InherentDataProviders::new(), InherentDataProviders::new(),
&task_manager.spawn_handle(), &task_manager.spawn_handle(),
@@ -351,8 +354,6 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
sp_consensus::NeverCanAuthor, sp_consensus::NeverCanAuthor,
)?; )?;
let finality_proof_provider = GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
let (network, network_status_sinks, system_rpc_tx, network_starter) = let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams { sc_service::build_network(sc_service::BuildNetworkParams {
config: &config, config: &config,
@@ -362,8 +363,6 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
import_queue, import_queue,
on_demand: Some(on_demand.clone()), on_demand: Some(on_demand.clone()),
block_announce_validator_builder: None, block_announce_validator_builder: None,
finality_proof_request_builder: Some(finality_proof_request_builder),
finality_proof_provider: Some(finality_proof_provider),
})?; })?;
if config.offchain_worker.enabled { if config.offchain_worker.enabled {
@@ -385,7 +384,7 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(), telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(),
config, config,
client, client,
keystore, keystore: keystore_container.sync_keystore(),
backend, backend,
network, network,
network_status_sinks, network_status_sinks,
+27 -27
View File
@@ -33,33 +33,33 @@ pallet-shift-session-manager = { path = "../../../modules/shift-session-manager"
# Substrate Dependencies # Substrate Dependencies
frame-benchmarking = { version = "2.0", default-features = false, optional = true } frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true }
frame-executive = { version = "2.0", default-features = false } frame-executive = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system-rpc-runtime-api = { version = "2.0", default-features = false } frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-aura = { version = "2.0", default-features = false } pallet-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-balances = { version = "2.0", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-grandpa = { version = "2.0", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-randomness-collective-flip = { version = "2.0", default-features = false } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-session = { version = "2.0", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-sudo = { version = "2.0", default-features = false } pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-timestamp = { version = "2.0", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-transaction-payment = { version = "2.0", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-api = { version = "2.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-block-builder = { version = "2.0", default-features = false } sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-consensus-aura = { version = "0.8", default-features = false } sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-core = { version = "2.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-finality-grandpa = { version = "2.0", default-features = false } sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-inherents = { version = "2.0", default-features = false } sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-io = { version = "2.0", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-offchain = { version = "2.0", default-features = false } sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-session = { version = "2.0", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-transaction-pool = { version = "2.0", default-features = false } sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-trie = { version = "2.0", default-features = false } sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-version = { version = "2.0", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
libsecp256k1 = { version = "0.3.4", features = ["hmac"] } libsecp256k1 = { version = "0.3.4", features = ["hmac"] }
+1 -2
View File
@@ -390,8 +390,7 @@ parameter_types! {
} }
impl pallet_transaction_payment::Trait for Runtime { impl pallet_transaction_payment::Trait for Runtime {
type Currency = pallet_balances::Module<Runtime>; type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
type OnTransactionPayment = ();
type TransactionByteFee = TransactionByteFee; type TransactionByteFee = TransactionByteFee;
type WeightToFee = IdentityFee<Balance>; type WeightToFee = IdentityFee<Balance>;
type FeeMultiplierUpdate = (); type FeeMultiplierUpdate = ();
+4 -4
View File
@@ -21,10 +21,10 @@ pallet-substrate-bridge = { path = "../../modules/substrate", default-features =
# Substrate dependencies # Substrate dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-trie = { version = "2.0", default-features = false } sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[features] [features]
default = ["std"] default = ["std"]
+6 -6
View File
@@ -16,14 +16,14 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false }
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = "2.0" sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[features] [features]
default = ["std"] default = ["std"]
+2 -2
View File
@@ -463,7 +463,7 @@ mod tests {
vec![EventRecord { vec![EventRecord {
phase: Phase::Initialization, phase: Phase::Initialization,
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageWeightMismatch( event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageWeightMismatch(
origin, id, 1305000, 0, origin, id, 1973000, 0,
)), )),
topics: vec![], topics: vec![],
}], }],
@@ -488,7 +488,7 @@ mod tests {
vec![EventRecord { vec![EventRecord {
phase: Phase::Initialization, phase: Phase::Initialization,
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageWeightMismatch( event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageWeightMismatch(
origin, id, 1305000, 0, origin, id, 1973000, 0,
)), )),
topics: vec![], topics: vec![],
}], }],
+7 -7
View File
@@ -17,15 +17,15 @@ bp-header-chain = { path = "../../primitives/header-chain", default-features = f
# Substrate Dependencies # Substrate Dependencies
frame-benchmarking = { version = "2.0", default-features = false, optional = true } frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true }
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false, optional = true } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true }
[dev-dependencies] [dev-dependencies]
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = "2.0" sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[features] [features]
default = ["std"] default = ["std"]
@@ -19,10 +19,10 @@ rialto-runtime = { path = "../../../bin/rialto/runtime" }
# Substrate Dependencies # Substrate Dependencies
sc-finality-grandpa = "0.8" sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-blockchain = "2.0" sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-finality-grandpa = "2.0" sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[dev-dependencies] [dev-dependencies]
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+6 -6
View File
@@ -17,12 +17,12 @@ bp-eth-poa = { path = "../../primitives/ethereum-poa", default-features = false
# Substrate Dependencies # Substrate Dependencies
frame-benchmarking = { version = "2.0", default-features = false, optional = true } frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true }
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-io = { version = "2.0", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
libsecp256k1 = { version = "0.3.4", features = ["hmac"] } libsecp256k1 = { version = "0.3.4", features = ["hmac"] }
+6 -6
View File
@@ -17,15 +17,15 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false }
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-core = { version = "2.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
hex-literal = "0.3" hex-literal = "0.3"
sp-io = "2.0" sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[features] [features]
default = ["std"] default = ["std"]
+9 -9
View File
@@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies] [dependencies]
derive_more = "0.99.2" derive_more = "0.99.2"
futures = { version = "0.3.5", features = ["compat"] } futures = { version = "0.3.5", features = ["compat"] }
jsonrpc-core = "15.0.0" jsonrpc-core = "15.1.0"
jsonrpc-core-client = "15.0.0" jsonrpc-core-client = "15.1.0"
jsonrpc-derive = "15.0.0" jsonrpc-derive = "15.1.0"
# Bridge dependencies # Bridge dependencies
@@ -20,9 +20,9 @@ bp-message-lane = { path = "../../../primitives/message-lane" }
# Substrate Dependencies # Substrate Dependencies
sc-client-api = "2.0" sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-blockchain = "2.0" sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-state-machine = "0.8" sp-state-machine = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-trie = "2.0" sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
@@ -11,15 +11,15 @@ codec = { package = "parity-scale-codec", version = "1.3.1", default-features =
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
pallet-session = { version = "2.0", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-staking = { version = "2.0", default-features = false } sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[features] [features]
default = ["std"] default = ["std"]
+10 -10
View File
@@ -19,18 +19,18 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false }
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
frame-system = { version = "2.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-finality-grandpa = { version = "2.0", default-features = false } sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-trie = { version = "2.0", default-features = false } sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = "2.0" sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-keyring = "2.0" sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-state-machine = "0.8" sp-state-machine = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[features] [features]
default = ["std"] default = ["std"]
@@ -11,9 +11,9 @@ codec = { package = "parity-scale-codec", version = "1.3.4", default-features =
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-api = { version = "2.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[features] [features]
default = ["std"] default = ["std"]
+4 -4
View File
@@ -24,10 +24,10 @@ triehash = { version = "0.8.2", default-features = false }
# Substrate Dependencies # Substrate Dependencies
sp-api = { version = "2.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-io = { version = "2.0", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[dev-dependencies] [dev-dependencies]
hex-literal = "0.2" hex-literal = "0.2"
+2 -2
View File
@@ -11,8 +11,8 @@ codec = { package = "parity-scale-codec", version = "1.3.1", default-features =
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[features] [features]
default = ["std"] default = ["std"]
+7 -7
View File
@@ -21,13 +21,13 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] }
# Substrate Based Dependencies # Substrate Based Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-api = { version = "2.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-core = { version = "2.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-io = { version = "2.0", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-trie = { version = "2.0", default-features = false } sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[features] [features]
default = ["std"] default = ["std"]
+5 -5
View File
@@ -15,11 +15,11 @@ bp-runtime = { path = "../runtime", default-features = false }
# Substrate Based Dependencies # Substrate Based Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-api = { version = "2.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-core = { version = "2.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[features] [features]
default = ["std"] default = ["std"]
+4 -4
View File
@@ -12,10 +12,10 @@ num-traits = { version = "0.2", default-features = false }
# Substrate Dependencies # Substrate Dependencies
frame-support = { version = "2.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-io = { version = "2.0", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-runtime = { version = "2.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
sp-std = { version = "2.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false }
[features] [features]
default = ["std"] default = ["std"]
+6 -6
View File
@@ -40,9 +40,9 @@ rialto-runtime = { path = "../../bin/rialto/runtime" }
# Substrate Dependencies # Substrate Dependencies
frame-system = "2.0" frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-transaction-payment = "2.0" pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-keyring = "2.0" sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
substrate-prometheus-endpoint = "0.8" substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+6 -6
View File
@@ -17,9 +17,9 @@ millau-runtime = { path = "../../bin/millau/runtime" }
# Substrate Dependencies # Substrate Dependencies
frame-support = "2.0" frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-system = "2.0" frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-transaction-payment = "2.0" pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-keyring = "2.0" sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+6 -6
View File
@@ -17,9 +17,9 @@ rialto-runtime = { path = "../../bin/rialto/runtime" }
# Substrate Dependencies # Substrate Dependencies
frame-system = "2.0" frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-support = "2.0" frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-transaction-payment = "2.0" pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-keyring = "2.0" sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+8 -8
View File
@@ -23,14 +23,14 @@ relay-utils = { path = "../utils" }
# Substrate Dependencies # Substrate Dependencies
frame-support = "2.0" frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-system = "2.0" frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-balances = "2.0" pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = "2.0" sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-trie = "2.0" sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-version = "2.0" sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
#[dev-dependencies] #[dev-dependencies]
futures = "0.3.7" futures = "0.3.7"
+5 -5
View File
@@ -35,8 +35,8 @@ rialto-runtime = { path = "../../bin/rialto/runtime" }
# Substrate Dependencies # Substrate Dependencies
frame-support = "2.0" frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = "2.0" sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-finality-grandpa = "2.0" sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = "2.0" sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-trie = "2.0" sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+1 -1
View File
@@ -18,4 +18,4 @@ time = "0.2"
# Substrate dependencies # Substrate dependencies
substrate-prometheus-endpoint = "0.8" substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "master" }