From dd7242bc79e773974c8d5946bacc4f34b52b19ed Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Tue, 24 Nov 2020 22:39:21 +0300 Subject: [PATCH] Migrate back to Substrate master (#528) * migrate back to Substrate master * fmt * clippy --- bridges/bin/millau/node/Cargo.toml | 42 +++++----- bridges/bin/millau/node/src/command.rs | 8 +- bridges/bin/millau/node/src/service.rs | 83 +++++++++---------- bridges/bin/millau/runtime/Cargo.toml | 50 +++++------ bridges/bin/millau/runtime/src/lib.rs | 3 +- bridges/bin/rialto/node/Cargo.toml | 42 +++++----- bridges/bin/rialto/node/src/command.rs | 8 +- bridges/bin/rialto/node/src/service.rs | 83 +++++++++---------- bridges/bin/rialto/runtime/Cargo.toml | 54 ++++++------ bridges/bin/rialto/runtime/src/lib.rs | 3 +- bridges/bin/runtime-common/Cargo.toml | 8 +- bridges/modules/call-dispatch/Cargo.toml | 12 +-- bridges/modules/call-dispatch/src/lib.rs | 4 +- bridges/modules/currency-exchange/Cargo.toml | 14 ++-- .../ethereum-contract/builtin/Cargo.toml | 10 +-- bridges/modules/ethereum/Cargo.toml | 12 +-- bridges/modules/message-lane/Cargo.toml | 12 +-- bridges/modules/message-lane/rpc/Cargo.toml | 18 ++-- .../modules/shift-session-manager/Cargo.toml | 14 ++-- bridges/modules/substrate/Cargo.toml | 20 ++--- .../primitives/currency-exchange/Cargo.toml | 6 +- bridges/primitives/ethereum-poa/Cargo.toml | 8 +- bridges/primitives/message-lane/Cargo.toml | 4 +- bridges/primitives/millau/Cargo.toml | 14 ++-- bridges/primitives/rialto/Cargo.toml | 10 +-- bridges/primitives/runtime/Cargo.toml | 8 +- bridges/relays/ethereum/Cargo.toml | 12 +-- bridges/relays/millau-client/Cargo.toml | 12 +-- bridges/relays/rialto-client/Cargo.toml | 12 +-- bridges/relays/substrate-client/Cargo.toml | 16 ++-- bridges/relays/substrate/Cargo.toml | 10 +-- bridges/relays/utils/Cargo.toml | 2 +- 32 files changed, 307 insertions(+), 307 deletions(-) diff --git a/bridges/bin/millau/node/Cargo.toml b/bridges/bin/millau/node/Cargo.toml index 7af2f6febda8..254dc4d27509 100644 --- a/bridges/bin/millau/node/Cargo.toml +++ b/bridges/bin/millau/node/Cargo.toml @@ -23,30 +23,30 @@ pallet-message-lane-rpc = { path = "../../../modules/message-lane/rpc" } # Substrate Dependencies -frame-benchmarking = "2.0" -frame-benchmarking-cli = "2.0" -sc-basic-authorship = "0.8" -sc-cli = "0.8" -sc-client-api = "2.0" -sc-consensus = "0.8" -sc-consensus-aura = "0.8" -sc-executor = "0.8" -sc-finality-grandpa = "0.8" -sc-finality-grandpa-rpc = "0.8" -sc-service = "0.8" -sc-rpc = "2.0" -sc-transaction-pool = "2.0" -sp-consensus = "0.8" -sp-consensus-aura = "0.8" -sp-core = "2.0" -sp-inherents = "2.0" -sp-finality-grandpa = "2.0" -sp-runtime = "2.0" -substrate-frame-rpc-system = "2.0" +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [build-dependencies] 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" [features] diff --git a/bridges/bin/millau/node/src/command.rs b/bridges/bin/millau/node/src/command.rs index fcd107d1ee00..651080bbf200 100644 --- a/bridges/bin/millau/node/src/command.rs +++ b/bridges/bin/millau/node/src/command.rs @@ -152,9 +152,11 @@ pub fn run() -> sc_cli::Result<()> { } None => { let runner = cli.create_runner(&cli.run)?; - 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), + } }) } } diff --git a/bridges/bin/millau/node/src/service.rs b/bridges/bin/millau/node/src/service.rs index 04ad152b37b0..10e613f5964a 100644 --- a/bridges/bin/millau/node/src/service.rs +++ b/bridges/bin/millau/node/src/service.rs @@ -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 sc_client_api::{ExecutorProvider, RemoteBackend}; use sc_executor::native_executor_instance; 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 sp_consensus_aura::sr25519::AuthorityPair as AuraPair; -use sp_core::storage::StorageKey; use sp_inherents::InherentDataProviders; use std::sync::Arc; use std::time::Duration; @@ -65,7 +62,12 @@ pub fn new_partial( sp_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, ( - sc_finality_grandpa::GrandpaBlockImport, + sc_consensus_aura::AuraBlockImport< + Block, + FullClient, + sc_finality_grandpa::GrandpaBlockImport, + AuraPair, + >, sc_finality_grandpa::LinkHalf, ), >, @@ -73,7 +75,8 @@ pub fn new_partial( > { let inherent_data_providers = sp_inherents::InherentDataProviders::new(); - let (client, backend, keystore, task_manager) = sc_service::new_full_parts::(&config)?; + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts::(&config)?; let client = Arc::new(client); 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, _, _>( sc_consensus_aura::slot_duration(&*client)?, - aura_block_import, - Some(Box::new(grandpa_block_import.clone())), - None, + aura_block_import.clone(), + Some(Box::new(grandpa_block_import)), client.clone(), inherent_data_providers.clone(), &task_manager.spawn_handle(), @@ -108,11 +110,11 @@ pub fn new_partial( backend, task_manager, import_queue, - keystore, + keystore_container, select_chain, transaction_pool, 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 { backend, mut task_manager, import_queue, - keystore, + keystore_container, select_chain, transaction_pool, inherent_data_providers, other: (block_import, grandpa_link), } = 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) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, @@ -141,8 +141,6 @@ pub fn new_full(config: Configuration) -> Result { import_queue, on_demand: None, block_announce_validator_builder: None, - finality_proof_request_builder: None, - finality_proof_provider: Some(finality_proof_provider), })?; if config.offchain_worker.enabled { @@ -157,12 +155,18 @@ pub fn new_full(config: Configuration) -> Result { let role = config.role.clone(); let force_authoring = config.force_authoring; + let backoff_authoring_blocks: Option<()> = None; let name = config.network.node_name.clone(); let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default(); 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. /// Millau runtime from message-lane RPC point of view. @@ -232,7 +236,7 @@ pub fn new_full(config: Configuration) -> Result { sc_service::spawn_tasks(sc_service::SpawnTasksParams { network: network.clone(), client: client.clone(), - keystore: keystore.clone(), + keystore: keystore_container.sync_keystore(), task_manager: &mut task_manager, transaction_pool: transaction_pool.clone(), telemetry_connection_sinks: telemetry_connection_sinks.clone(), @@ -246,21 +250,26 @@ pub fn new_full(config: Configuration) -> Result { })?; if role.is_authority() { - let proposer = - sc_basic_authorship::ProposerFactory::new(client.clone(), transaction_pool, prometheus_registry.as_ref()); + let proposer = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry.as_ref(), + ); 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)?, client.clone(), select_chain, block_import, proposer, network.clone(), - inherent_data_providers.clone(), + inherent_data_providers, force_authoring, - keystore.clone(), + backoff_authoring_blocks, + keystore_container.sync_keystore(), can_author_with, )?; @@ -272,7 +281,7 @@ pub fn new_full(config: Configuration) -> Result { // 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 }; @@ -298,7 +307,6 @@ pub fn new_full(config: Configuration) -> Result { config: grandpa_config, link: grandpa_link, network, - inherent_data_providers, telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, @@ -311,7 +319,7 @@ pub fn new_full(config: Configuration) -> Result { .spawn_essential_handle() .spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?); } else { - sc_finality_grandpa::setup_disabled_grandpa(client, &inherent_data_providers, network)?; + sc_finality_grandpa::setup_disabled_grandpa(network)?; } network_starter.start_network(); @@ -320,9 +328,11 @@ pub fn new_full(config: Configuration) -> Result { /// Builds a new service for a light client. pub fn new_light(config: Configuration) -> Result { - let (client, backend, keystore, mut task_manager, on_demand) = + let (client, backend, keystore_container, mut task_manager, on_demand) = sc_service::new_light_parts::(&config)?; + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( config.transaction_pool.clone(), config.prometheus_registry(), @@ -331,20 +341,13 @@ pub fn new_light(config: Configuration) -> Result { on_demand.clone(), )); - let grandpa_block_import = sc_finality_grandpa::light_block_import( - client.clone(), - 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 (grandpa_block_import, _) = + sc_finality_grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?; let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( sc_consensus_aura::slot_duration(&*client)?, - grandpa_block_import, - None, - Some(Box::new(finality_proof_import)), + grandpa_block_import.clone(), + Some(Box::new(grandpa_block_import)), client.clone(), InherentDataProviders::new(), &task_manager.spawn_handle(), @@ -352,8 +355,6 @@ pub fn new_light(config: Configuration) -> Result { 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) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, @@ -363,8 +364,6 @@ pub fn new_light(config: Configuration) -> Result { import_queue, on_demand: Some(on_demand.clone()), 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 { @@ -386,7 +385,7 @@ pub fn new_light(config: Configuration) -> Result { telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(), config, client, - keystore, + keystore: keystore_container.sync_keystore(), backend, network, network_status_sinks, diff --git a/bridges/bin/millau/runtime/Cargo.toml b/bridges/bin/millau/runtime/Cargo.toml index 0689bc4fbae4..19794755cf06 100644 --- a/bridges/bin/millau/runtime/Cargo.toml +++ b/bridges/bin/millau/runtime/Cargo.toml @@ -26,31 +26,31 @@ pallet-substrate-bridge = { path = "../../../modules/substrate", default-feature # Substrate Dependencies -frame-executive = { version = "2.0", default-features = false } -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -frame-system-rpc-runtime-api = { version = "2.0", default-features = false } -pallet-aura = { version = "2.0", default-features = false } -pallet-balances = { version = "2.0", default-features = false } -pallet-grandpa = { version = "2.0", default-features = false } -pallet-randomness-collective-flip = { version = "2.0", default-features = false } -pallet-session = { version = "2.0", default-features = false } -pallet-sudo = { version = "2.0", default-features = false } -pallet-timestamp = { version = "2.0", default-features = false } -pallet-transaction-payment = { version = "2.0", default-features = false } -sp-api = { version = "2.0", default-features = false } -sp-block-builder = { version = "2.0", default-features = false } -sp-consensus-aura = { version = "0.8", default-features = false } -sp-core = { version = "2.0", default-features = false } -sp-inherents = { version = "2.0", default-features = false } -sp-finality-grandpa = { version = "2.0", default-features = false } -sp-offchain = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-session = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } -sp-transaction-pool = { version = "2.0", default-features = false } -sp-trie = { version = "2.0", default-features = false } -sp-version = { version = "2.0", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "2.0.0" } diff --git a/bridges/bin/millau/runtime/src/lib.rs b/bridges/bin/millau/runtime/src/lib.rs index 55519b46382b..2949e695ffde 100644 --- a/bridges/bin/millau/runtime/src/lib.rs +++ b/bridges/bin/millau/runtime/src/lib.rs @@ -282,8 +282,7 @@ parameter_types! { } impl pallet_transaction_payment::Trait for Runtime { - type Currency = pallet_balances::Module; - type OnTransactionPayment = (); + type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); diff --git a/bridges/bin/rialto/node/Cargo.toml b/bridges/bin/rialto/node/Cargo.toml index dd905a53a9c2..59e97a64d1ea 100644 --- a/bridges/bin/rialto/node/Cargo.toml +++ b/bridges/bin/rialto/node/Cargo.toml @@ -22,30 +22,30 @@ rialto-runtime = { path = "../runtime" } # Substrate Dependencies -frame-benchmarking = "2.0" -frame-benchmarking-cli = "2.0" -sc-basic-authorship = "0.8" -sc-cli = "0.8" -sc-client-api = "2.0" -sc-consensus = "0.8" -sc-consensus-aura = "0.8" -sc-executor = "0.8" -sc-finality-grandpa = "0.8" -sc-finality-grandpa-rpc = "0.8" -sc-service = "0.8" -sc-rpc = "2.0" -sc-transaction-pool = "2.0" -sp-consensus = "0.8" -sp-consensus-aura = "0.8" -sp-core = "2.0" -sp-inherents = "2.0" -sp-finality-grandpa = "2.0" -sp-runtime = "2.0" -substrate-frame-rpc-system = "2.0" +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [build-dependencies] 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" [features] diff --git a/bridges/bin/rialto/node/src/command.rs b/bridges/bin/rialto/node/src/command.rs index fb07b77cb0f7..fe423f8803d9 100644 --- a/bridges/bin/rialto/node/src/command.rs +++ b/bridges/bin/rialto/node/src/command.rs @@ -152,9 +152,11 @@ pub fn run() -> sc_cli::Result<()> { } None => { let runner = cli.create_runner(&cli.run)?; - 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), + } }) } } diff --git a/bridges/bin/rialto/node/src/service.rs b/bridges/bin/rialto/node/src/service.rs index 1bb6e3b310fe..bd4c587618eb 100644 --- a/bridges/bin/rialto/node/src/service.rs +++ b/bridges/bin/rialto/node/src/service.rs @@ -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 sc_client_api::{ExecutorProvider, RemoteBackend}; use sc_executor::native_executor_instance; 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 sp_consensus_aura::sr25519::AuthorityPair as AuraPair; -use sp_core::storage::StorageKey; use sp_inherents::InherentDataProviders; use std::sync::Arc; use std::time::Duration; @@ -65,7 +62,12 @@ pub fn new_partial( sp_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, ( - sc_finality_grandpa::GrandpaBlockImport, + sc_consensus_aura::AuraBlockImport< + Block, + FullClient, + sc_finality_grandpa::GrandpaBlockImport, + AuraPair, + >, sc_finality_grandpa::LinkHalf, ), >, @@ -73,7 +75,8 @@ pub fn new_partial( > { let inherent_data_providers = sp_inherents::InherentDataProviders::new(); - let (client, backend, keystore, task_manager) = sc_service::new_full_parts::(&config)?; + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts::(&config)?; let client = Arc::new(client); 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, _, _>( sc_consensus_aura::slot_duration(&*client)?, - aura_block_import, - Some(Box::new(grandpa_block_import.clone())), - None, + aura_block_import.clone(), + Some(Box::new(grandpa_block_import)), client.clone(), inherent_data_providers.clone(), &task_manager.spawn_handle(), @@ -108,11 +110,11 @@ pub fn new_partial( backend, task_manager, import_queue, - keystore, + keystore_container, select_chain, transaction_pool, 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 { backend, mut task_manager, import_queue, - keystore, + keystore_container, select_chain, transaction_pool, inherent_data_providers, other: (block_import, grandpa_link), } = 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) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, @@ -141,8 +141,6 @@ pub fn new_full(config: Configuration) -> Result { import_queue, on_demand: None, block_announce_validator_builder: None, - finality_proof_request_builder: None, - finality_proof_provider: Some(finality_proof_provider), })?; if config.offchain_worker.enabled { @@ -157,12 +155,18 @@ pub fn new_full(config: Configuration) -> Result { let role = config.role.clone(); let force_authoring = config.force_authoring; + let backoff_authoring_blocks: Option<()> = None; let name = config.network.node_name.clone(); let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default(); 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. /// Rialto runtime from message-lane RPC point of view. @@ -231,7 +235,7 @@ pub fn new_full(config: Configuration) -> Result { sc_service::spawn_tasks(sc_service::SpawnTasksParams { network: network.clone(), client: client.clone(), - keystore: keystore.clone(), + keystore: keystore_container.sync_keystore(), task_manager: &mut task_manager, transaction_pool: transaction_pool.clone(), telemetry_connection_sinks: telemetry_connection_sinks.clone(), @@ -245,21 +249,26 @@ pub fn new_full(config: Configuration) -> Result { })?; if role.is_authority() { - let proposer = - sc_basic_authorship::ProposerFactory::new(client.clone(), transaction_pool, prometheus_registry.as_ref()); + let proposer = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry.as_ref(), + ); 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)?, client.clone(), select_chain, block_import, proposer, network.clone(), - inherent_data_providers.clone(), + inherent_data_providers, force_authoring, - keystore.clone(), + backoff_authoring_blocks, + keystore_container.sync_keystore(), can_author_with, )?; @@ -271,7 +280,7 @@ pub fn new_full(config: Configuration) -> Result { // 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 }; @@ -297,7 +306,6 @@ pub fn new_full(config: Configuration) -> Result { config: grandpa_config, link: grandpa_link, network, - inherent_data_providers, telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, @@ -310,7 +318,7 @@ pub fn new_full(config: Configuration) -> Result { .spawn_essential_handle() .spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?); } else { - sc_finality_grandpa::setup_disabled_grandpa(client, &inherent_data_providers, network)?; + sc_finality_grandpa::setup_disabled_grandpa(network)?; } network_starter.start_network(); @@ -319,9 +327,11 @@ pub fn new_full(config: Configuration) -> Result { /// Builds a new service for a light client. pub fn new_light(config: Configuration) -> Result { - let (client, backend, keystore, mut task_manager, on_demand) = + let (client, backend, keystore_container, mut task_manager, on_demand) = sc_service::new_light_parts::(&config)?; + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( config.transaction_pool.clone(), config.prometheus_registry(), @@ -330,20 +340,13 @@ pub fn new_light(config: Configuration) -> Result { on_demand.clone(), )); - let grandpa_block_import = sc_finality_grandpa::light_block_import( - client.clone(), - 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 (grandpa_block_import, _) = + sc_finality_grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?; let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( sc_consensus_aura::slot_duration(&*client)?, - grandpa_block_import, - None, - Some(Box::new(finality_proof_import)), + grandpa_block_import.clone(), + Some(Box::new(grandpa_block_import)), client.clone(), InherentDataProviders::new(), &task_manager.spawn_handle(), @@ -351,8 +354,6 @@ pub fn new_light(config: Configuration) -> Result { 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) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, @@ -362,8 +363,6 @@ pub fn new_light(config: Configuration) -> Result { import_queue, on_demand: Some(on_demand.clone()), 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 { @@ -385,7 +384,7 @@ pub fn new_light(config: Configuration) -> Result { telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(), config, client, - keystore, + keystore: keystore_container.sync_keystore(), backend, network, network_status_sinks, diff --git a/bridges/bin/rialto/runtime/Cargo.toml b/bridges/bin/rialto/runtime/Cargo.toml index 0b68971c8a37..0fa93448ff4e 100644 --- a/bridges/bin/rialto/runtime/Cargo.toml +++ b/bridges/bin/rialto/runtime/Cargo.toml @@ -33,33 +33,33 @@ pallet-shift-session-manager = { path = "../../../modules/shift-session-manager" # Substrate Dependencies -frame-benchmarking = { version = "2.0", default-features = false, optional = true } -frame-executive = { version = "2.0", default-features = false } -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -frame-system-rpc-runtime-api = { version = "2.0", default-features = false } -pallet-aura = { version = "2.0", default-features = false } -pallet-balances = { version = "2.0", default-features = false } -pallet-grandpa = { version = "2.0", default-features = false } -pallet-randomness-collective-flip = { version = "2.0", default-features = false } -pallet-session = { version = "2.0", default-features = false } -pallet-sudo = { version = "2.0", default-features = false } -pallet-timestamp = { version = "2.0", default-features = false } -pallet-transaction-payment = { version = "2.0", default-features = false } -sp-api = { version = "2.0", default-features = false } -sp-block-builder = { version = "2.0", default-features = false } -sp-consensus-aura = { version = "0.8", default-features = false } -sp-core = { version = "2.0", default-features = false } -sp-finality-grandpa = { version = "2.0", default-features = false } -sp-inherents = { version = "2.0", default-features = false } -sp-io = { version = "2.0", default-features = false } -sp-offchain = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-session = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } -sp-transaction-pool = { version = "2.0", default-features = false } -sp-trie = { version = "2.0", default-features = false } -sp-version = { version = "2.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true } +frame-executive = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] libsecp256k1 = { version = "0.3.4", features = ["hmac"] } diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index 7374a805a77b..cd5f2df34ed9 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -390,8 +390,7 @@ parameter_types! { } impl pallet_transaction_payment::Trait for Runtime { - type Currency = pallet_balances::Module; - type OnTransactionPayment = (); + type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml index 93e0bf6a2bf3..c7a00209bc3e 100644 --- a/bridges/bin/runtime-common/Cargo.toml +++ b/bridges/bin/runtime-common/Cargo.toml @@ -21,10 +21,10 @@ pallet-substrate-bridge = { path = "../../modules/substrate", default-features = # Substrate dependencies -frame-support = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } -sp-trie = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [features] default = ["std"] diff --git a/bridges/modules/call-dispatch/Cargo.toml b/bridges/modules/call-dispatch/Cargo.toml index b60cf14d7922..e80f98e0adc1 100644 --- a/bridges/modules/call-dispatch/Cargo.toml +++ b/bridges/modules/call-dispatch/Cargo.toml @@ -16,14 +16,14 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false } # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] -sp-core = "2.0" -sp-io = "2.0" +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [features] default = ["std"] diff --git a/bridges/modules/call-dispatch/src/lib.rs b/bridges/modules/call-dispatch/src/lib.rs index f6fda67fbae4..e7a35a342314 100644 --- a/bridges/modules/call-dispatch/src/lib.rs +++ b/bridges/modules/call-dispatch/src/lib.rs @@ -463,7 +463,7 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: TestEvent::call_dispatch(Event::::MessageWeightMismatch( - origin, id, 1305000, 0, + origin, id, 1973000, 0, )), topics: vec![], }], @@ -488,7 +488,7 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: TestEvent::call_dispatch(Event::::MessageWeightMismatch( - origin, id, 1305000, 0, + origin, id, 1973000, 0, )), topics: vec![], }], diff --git a/bridges/modules/currency-exchange/Cargo.toml b/bridges/modules/currency-exchange/Cargo.toml index 8d400e07bb21..967d57865907 100644 --- a/bridges/modules/currency-exchange/Cargo.toml +++ b/bridges/modules/currency-exchange/Cargo.toml @@ -17,15 +17,15 @@ bp-header-chain = { path = "../../primitives/header-chain", default-features = f # Substrate Dependencies -frame-benchmarking = { version = "2.0", default-features = false, optional = true } -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { 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 = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true } [dev-dependencies] -sp-core = "2.0" -sp-io = "2.0" +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [features] default = ["std"] diff --git a/bridges/modules/ethereum-contract/builtin/Cargo.toml b/bridges/modules/ethereum-contract/builtin/Cargo.toml index 631bc24c44a3..101a03fb8c26 100644 --- a/bridges/modules/ethereum-contract/builtin/Cargo.toml +++ b/bridges/modules/ethereum-contract/builtin/Cargo.toml @@ -19,10 +19,10 @@ rialto-runtime = { path = "../../../bin/rialto/runtime" } # Substrate Dependencies -sc-finality-grandpa = "0.8" -sp-blockchain = "2.0" -sp-finality-grandpa = "2.0" -sp-runtime = "2.0" +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [dev-dependencies] -sp-core = "2.0" +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } diff --git a/bridges/modules/ethereum/Cargo.toml b/bridges/modules/ethereum/Cargo.toml index 83be6d79639a..66db6f958612 100644 --- a/bridges/modules/ethereum/Cargo.toml +++ b/bridges/modules/ethereum/Cargo.toml @@ -17,12 +17,12 @@ bp-eth-poa = { path = "../../primitives/ethereum-poa", default-features = false # Substrate Dependencies -frame-benchmarking = { version = "2.0", default-features = false, optional = true } -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -sp-io = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] libsecp256k1 = { version = "0.3.4", features = ["hmac"] } diff --git a/bridges/modules/message-lane/Cargo.toml b/bridges/modules/message-lane/Cargo.toml index 480306d2b21b..05f16f189923 100644 --- a/bridges/modules/message-lane/Cargo.toml +++ b/bridges/modules/message-lane/Cargo.toml @@ -17,15 +17,15 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false } # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -sp-core = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] hex-literal = "0.3" -sp-io = "2.0" +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [features] default = ["std"] diff --git a/bridges/modules/message-lane/rpc/Cargo.toml b/bridges/modules/message-lane/rpc/Cargo.toml index e9ef6c1cc6b2..73111d0d28ec 100644 --- a/bridges/modules/message-lane/rpc/Cargo.toml +++ b/bridges/modules/message-lane/rpc/Cargo.toml @@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] derive_more = "0.99.2" futures = { version = "0.3.5", features = ["compat"] } -jsonrpc-core = "15.0.0" -jsonrpc-core-client = "15.0.0" -jsonrpc-derive = "15.0.0" +jsonrpc-core = "15.1.0" +jsonrpc-core-client = "15.1.0" +jsonrpc-derive = "15.1.0" # Bridge dependencies @@ -20,9 +20,9 @@ bp-message-lane = { path = "../../../primitives/message-lane" } # Substrate Dependencies -sc-client-api = "2.0" -sp-blockchain = "2.0" -sp-core = "2.0" -sp-runtime = "2.0" -sp-state-machine = "0.8" -sp-trie = "2.0" +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-state-machine = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" } diff --git a/bridges/modules/shift-session-manager/Cargo.toml b/bridges/modules/shift-session-manager/Cargo.toml index 3f54df20dfe0..1cba12f2f5c5 100644 --- a/bridges/modules/shift-session-manager/Cargo.toml +++ b/bridges/modules/shift-session-manager/Cargo.toml @@ -11,15 +11,15 @@ codec = { package = "parity-scale-codec", version = "1.3.1", default-features = # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -pallet-session = { version = "2.0", default-features = false } -sp-staking = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] -sp-core = "2.0" -sp-runtime = "2.0" +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [features] default = ["std"] diff --git a/bridges/modules/substrate/Cargo.toml b/bridges/modules/substrate/Cargo.toml index 82740fc1b4fc..03da6a16526f 100644 --- a/bridges/modules/substrate/Cargo.toml +++ b/bridges/modules/substrate/Cargo.toml @@ -19,18 +19,18 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false } # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -frame-system = { version = "2.0", default-features = false } -sp-finality-grandpa = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } -sp-trie = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] -sp-core = "2.0" -sp-io = "2.0" -sp-keyring = "2.0" -sp-state-machine = "0.8" +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-state-machine = { git = "https://github.com/paritytech/substrate.git", branch = "master" } [features] default = ["std"] diff --git a/bridges/primitives/currency-exchange/Cargo.toml b/bridges/primitives/currency-exchange/Cargo.toml index aebde40e902f..01f7005902b3 100644 --- a/bridges/primitives/currency-exchange/Cargo.toml +++ b/bridges/primitives/currency-exchange/Cargo.toml @@ -11,9 +11,9 @@ codec = { package = "parity-scale-codec", version = "1.3.4", default-features = # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -sp-api = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [features] default = ["std"] diff --git a/bridges/primitives/ethereum-poa/Cargo.toml b/bridges/primitives/ethereum-poa/Cargo.toml index 49eab4f08436..724f5594cdf4 100644 --- a/bridges/primitives/ethereum-poa/Cargo.toml +++ b/bridges/primitives/ethereum-poa/Cargo.toml @@ -24,10 +24,10 @@ triehash = { version = "0.8.2", default-features = false } # Substrate Dependencies -sp-api = { version = "2.0", default-features = false } -sp-io = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [dev-dependencies] hex-literal = "0.2" diff --git a/bridges/primitives/message-lane/Cargo.toml b/bridges/primitives/message-lane/Cargo.toml index ecd20d611ea7..63380914e794 100644 --- a/bridges/primitives/message-lane/Cargo.toml +++ b/bridges/primitives/message-lane/Cargo.toml @@ -11,8 +11,8 @@ codec = { package = "parity-scale-codec", version = "1.3.1", default-features = # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [features] default = ["std"] diff --git a/bridges/primitives/millau/Cargo.toml b/bridges/primitives/millau/Cargo.toml index db8fbf04feeb..1c22da3cd9bd 100644 --- a/bridges/primitives/millau/Cargo.toml +++ b/bridges/primitives/millau/Cargo.toml @@ -21,13 +21,13 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] } # Substrate Based Dependencies -frame-support = { version = "2.0", default-features = false } -sp-api = { version = "2.0", default-features = false } -sp-core = { version = "2.0", default-features = false } -sp-io = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } -sp-trie = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [features] default = ["std"] diff --git a/bridges/primitives/rialto/Cargo.toml b/bridges/primitives/rialto/Cargo.toml index 6dce5005b5d1..53305d7ed862 100644 --- a/bridges/primitives/rialto/Cargo.toml +++ b/bridges/primitives/rialto/Cargo.toml @@ -15,11 +15,11 @@ bp-runtime = { path = "../runtime", default-features = false } # Substrate Based Dependencies -frame-support = { version = "2.0", default-features = false } -sp-api = { version = "2.0", default-features = false } -sp-core = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [features] default = ["std"] diff --git a/bridges/primitives/runtime/Cargo.toml b/bridges/primitives/runtime/Cargo.toml index b42fa4bf3ecd..2452a9f44e63 100644 --- a/bridges/primitives/runtime/Cargo.toml +++ b/bridges/primitives/runtime/Cargo.toml @@ -12,10 +12,10 @@ num-traits = { version = "0.2", default-features = false } # Substrate Dependencies -frame-support = { version = "2.0", default-features = false } -sp-io = { version = "2.0", default-features = false } -sp-runtime = { version = "2.0", default-features = false } -sp-std = { version = "2.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" , default-features = false } [features] default = ["std"] diff --git a/bridges/relays/ethereum/Cargo.toml b/bridges/relays/ethereum/Cargo.toml index 69e9e010d850..ff05ac3dccf9 100644 --- a/bridges/relays/ethereum/Cargo.toml +++ b/bridges/relays/ethereum/Cargo.toml @@ -40,9 +40,9 @@ rialto-runtime = { path = "../../bin/rialto/runtime" } # Substrate Dependencies -frame-system = "2.0" -pallet-transaction-payment = "2.0" -sp-core = "2.0" -sp-keyring = "2.0" -sp-runtime = "2.0" -substrate-prometheus-endpoint = "0.8" +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "master" } diff --git a/bridges/relays/millau-client/Cargo.toml b/bridges/relays/millau-client/Cargo.toml index 487e4bb6347f..3ca425730730 100644 --- a/bridges/relays/millau-client/Cargo.toml +++ b/bridges/relays/millau-client/Cargo.toml @@ -17,9 +17,9 @@ millau-runtime = { path = "../../bin/millau/runtime" } # Substrate Dependencies -frame-support = "2.0" -frame-system = "2.0" -pallet-transaction-payment = "2.0" -sp-core = "2.0" -sp-keyring = "2.0" -sp-runtime = "2.0" +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } diff --git a/bridges/relays/rialto-client/Cargo.toml b/bridges/relays/rialto-client/Cargo.toml index 7f9b6e9be5f8..007ddfd26721 100644 --- a/bridges/relays/rialto-client/Cargo.toml +++ b/bridges/relays/rialto-client/Cargo.toml @@ -17,9 +17,9 @@ rialto-runtime = { path = "../../bin/rialto/runtime" } # Substrate Dependencies -frame-system = "2.0" -frame-support = "2.0" -pallet-transaction-payment = "2.0" -sp-core = "2.0" -sp-keyring = "2.0" -sp-runtime = "2.0" +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } diff --git a/bridges/relays/substrate-client/Cargo.toml b/bridges/relays/substrate-client/Cargo.toml index d8f9232b25e0..0e4b43bf7f6b 100644 --- a/bridges/relays/substrate-client/Cargo.toml +++ b/bridges/relays/substrate-client/Cargo.toml @@ -23,14 +23,14 @@ relay-utils = { path = "../utils" } # Substrate Dependencies -frame-support = "2.0" -frame-system = "2.0" -pallet-balances = "2.0" -sp-core = "2.0" -sp-runtime = "2.0" -sp-std = "2.0" -sp-trie = "2.0" -sp-version = "2.0" +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" } #[dev-dependencies] futures = "0.3.7" diff --git a/bridges/relays/substrate/Cargo.toml b/bridges/relays/substrate/Cargo.toml index 6cb9847ea2a6..e35021d44519 100644 --- a/bridges/relays/substrate/Cargo.toml +++ b/bridges/relays/substrate/Cargo.toml @@ -35,8 +35,8 @@ rialto-runtime = { path = "../../bin/rialto/runtime" } # Substrate Dependencies -frame-support = "2.0" -sp-core = "2.0" -sp-finality-grandpa = "2.0" -sp-runtime = "2.0" -sp-trie = "2.0" +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "master" } diff --git a/bridges/relays/utils/Cargo.toml b/bridges/relays/utils/Cargo.toml index 04ceb3ec0dc0..1f20a063de33 100644 --- a/bridges/relays/utils/Cargo.toml +++ b/bridges/relays/utils/Cargo.toml @@ -18,4 +18,4 @@ time = "0.2" # Substrate dependencies -substrate-prometheus-endpoint = "0.8" +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "master" }