Skip to content
Snippets Groups Projects
Commit b7cb0623 authored by Svyatoslav Nikolsky's avatar Svyatoslav Nikolsky Committed by Bastian Köcher
Browse files

Update substrate reference to rc6 (#321)


* update substrate to rc6

* clippy

* fixed benchmarks compilation

* Update bin/node/node/src/service.rs

Co-authored-by: default avatarHernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: default avatarHernando Castano <HCastano@users.noreply.github.com>
parent aa90d168
Branches
No related merge requests found
Showing with 340 additions and 299 deletions
......@@ -25,110 +25,110 @@ default-features = false
features = ["std"]
[dependencies.sc-cli]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-rpc]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-core]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-executor]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-service]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-inherents]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-transaction-pool]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-transaction-pool]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-network]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-consensus-aura]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-consensus-aura]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-consensus]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-finality-grandpa]
package = "sc-finality-grandpa"
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.grandpa-primitives]
package = "sp-finality-grandpa"
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-consensus]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-client-api]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-basic-authorship]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.substrate-frame-rpc-system]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.frame-benchmarking]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.frame-benchmarking-cli]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[build-dependencies]
......@@ -136,13 +136,13 @@ vergen = "3.1.0"
[build-dependencies.build-script-utils]
package = "substrate-build-script-utils"
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[build-dependencies.frame-benchmarking-cli]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[features]
......
......@@ -32,10 +32,10 @@
use crate::cli::{Cli, Subcommand};
use crate::service;
use crate::service::new_full_params;
use crate::service::new_partial;
use bridge_node_runtime::Block;
use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli};
use sc_service::ServiceParams;
use sc_service::PartialComponents;
impl SubstrateCli for Cli {
fn impl_name() -> String {
......@@ -103,16 +103,13 @@ pub fn run() -> sc_cli::Result<()> {
Some(Subcommand::Base(subcommand)) => {
let runner = cli.create_runner(subcommand)?;
runner.run_subcommand(subcommand, |config| {
let (
ServiceParams {
client,
backend,
task_manager,
import_queue,
..
},
..,
) = new_full_params(config)?;
let PartialComponents {
client,
backend,
task_manager,
import_queue,
..
} = new_partial(&config)?;
Ok((client, backend, import_queue, task_manager))
})
}
......
......@@ -16,14 +16,24 @@
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
// =====================================================================================
// =====================================================================================
// =====================================================================================
// UPDATE GUIDE:
// 1) replace everything with node-template/src/service.rs contents (found in main Substrate repo);
// 2) the only thing to keep from old code, is `rpc_extensions_builder` - we use our own custom RPCs;
// 3) fix compilation errors;
// 4) test :)
// =====================================================================================
// =====================================================================================
// =====================================================================================
use bridge_node_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, StorageAndProofProvider,
};
use sc_service::{error::Error as ServiceError, Configuration, ServiceComponents, TaskManager};
use sc_finality_grandpa::{FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState};
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use sp_inherents::InherentDataProviders;
use std::sync::Arc;
......@@ -42,23 +52,20 @@ type FullBackend = sc_service::TFullBackend<Block>;
type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
#[allow(clippy::type_complexity)]
pub fn new_full_params(
config: Configuration,
pub fn new_partial(
config: &Configuration,
) -> Result<
(
sc_service::ServiceParams<
Block,
FullClient,
sc_consensus_aura::AuraImportQueue<Block, FullClient>,
sc_transaction_pool::FullPool<Block, FullClient>,
jsonrpc_core::IoHandler<sc_rpc::Metadata>,
FullBackend,
>,
sc_service::PartialComponents<
FullClient,
FullBackend,
FullSelectChain,
sp_inherents::InherentDataProviders,
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
),
sp_consensus::DefaultImportQueue<Block, FullClient>,
sc_transaction_pool::FullPool<Block, FullClient>,
(
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
),
>,
ServiceError,
> {
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
......@@ -68,10 +75,8 @@ pub fn new_full_params(
let select_chain = sc_consensus::LongestChain::new(backend.clone());
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone(), config.prometheus_registry());
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
config.transaction_pool.clone(),
std::sync::Arc::new(pool_api),
config.prometheus_registry(),
task_manager.spawn_handle(),
client.clone(),
......@@ -83,7 +88,7 @@ pub fn new_full_params(
let aura_block_import =
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(
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())),
......@@ -92,8 +97,68 @@ pub fn new_full_params(
inherent_data_providers.clone(),
&task_manager.spawn_handle(),
config.prometheus_registry(),
sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
)?;
Ok(sc_service::PartialComponents {
client,
backend,
task_manager,
import_queue,
keystore,
select_chain,
transaction_pool,
inherent_data_providers,
other: (grandpa_block_import, grandpa_link),
})
}
/// Builds a new service for a full client.
pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
let sc_service::PartialComponents {
client,
backend,
mut task_manager,
import_queue,
keystore,
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,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
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 {
sc_service::build_offchain_workers(
&config,
backend.clone(),
task_manager.spawn_handle(),
client.clone(),
network.clone(),
);
}
let role = config.role.clone();
let force_authoring = config.force_authoring;
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 sc_rpc::DenyUnsafe;
use substrate_frame_rpc_system::{FullSystem, SystemApi};
......@@ -101,7 +166,7 @@ pub fn new_full_params(
let client = client.clone();
let pool = transaction_pool.clone();
Box::new(move |_| {
Box::new(move |_, _| {
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(SystemApi::to_delegate(FullSystem::new(
client.clone(),
......@@ -113,65 +178,21 @@ pub fn new_full_params(
})
};
let provider = client.clone() as Arc<dyn StorageAndProofProvider<_, _>>;
let finality_proof_provider = Arc::new(GrandpaFinalityProofProvider::new(backend.clone(), provider));
let params = sc_service::ServiceParams {
backend,
client,
import_queue,
keystore,
task_manager,
transaction_pool,
config,
block_announce_validator_builder: None,
finality_proof_request_builder: None,
finality_proof_provider: Some(finality_proof_provider),
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
network: network.clone(),
client: client.clone(),
keystore: keystore.clone(),
task_manager: &mut task_manager,
transaction_pool: transaction_pool.clone(),
telemetry_connection_sinks: telemetry_connection_sinks.clone(),
rpc_extensions_builder,
on_demand: None,
remote_blockchain: None,
rpc_extensions_builder,
};
Ok((
params,
select_chain,
inherent_data_providers,
grandpa_block_import,
grandpa_link,
))
}
/// Builds a new service for a full client.
pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
let (params, select_chain, inherent_data_providers, block_import, grandpa_link) = new_full_params(config)?;
let (role, force_authoring, name, enable_grandpa, prometheus_registry, client, transaction_pool, keystore) = {
let sc_service::ServiceParams {
config,
client,
transaction_pool,
keystore,
..
} = &params;
(
config.role.clone(),
config.force_authoring,
config.network.node_name.clone(),
!config.disable_grandpa,
config.prometheus_registry().cloned(),
client.clone(),
transaction_pool.clone(),
keystore.clone(),
)
};
let ServiceComponents {
task_manager,
network,
telemetry_on_connect_sinks,
..
} = sc_service::build(params)?;
backend,
network_status_sinks,
system_rpc_tx,
config,
})?;
if role.is_authority() {
let proposer =
......@@ -227,7 +248,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
link: grandpa_link,
network,
inherent_data_providers,
telemetry_on_connect: Some(telemetry_on_connect_sinks.on_connect_stream()),
telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()),
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry,
shared_voter_state: SharedVoterState::empty(),
......@@ -242,24 +263,22 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
sc_finality_grandpa::setup_disabled_grandpa(client, &inherent_data_providers, network)?;
}
network_starter.start_network();
Ok(task_manager)
}
/// Builds a new service for a light client.
pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
let (client, backend, keystore, task_manager, on_demand) =
let (client, backend, keystore, mut task_manager, on_demand) =
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
let transaction_pool_api = Arc::new(sc_transaction_pool::LightChainApi::new(
client.clone(),
on_demand.clone(),
));
let transaction_pool = sc_transaction_pool::BasicPool::new_light(
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
config.transaction_pool.clone(),
transaction_pool_api,
config.prometheus_registry(),
task_manager.spawn_handle(),
);
client.clone(),
on_demand.clone(),
));
let grandpa_block_import = sc_finality_grandpa::light_block_import(
client.clone(),
......@@ -270,7 +289,7 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
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)?,
grandpa_block_import,
None,
......@@ -279,27 +298,51 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
InherentDataProviders::new(),
&task_manager.spawn_handle(),
config.prometheus_registry(),
sp_consensus::NeverCanAuthor,
)?;
let finality_proof_provider = Arc::new(GrandpaFinalityProofProvider::new(
backend.clone(),
client.clone() as Arc<_>,
));
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,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
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 {
sc_service::build_offchain_workers(
&config,
backend.clone(),
task_manager.spawn_handle(),
client.clone(),
network.clone(),
);
}
sc_service::build(sc_service::ServiceParams {
block_announce_validator_builder: None,
finality_proof_request_builder: Some(finality_proof_request_builder),
finality_proof_provider: Some(finality_proof_provider),
on_demand: Some(on_demand),
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
remote_blockchain: Some(backend.remote_blockchain()),
rpc_extensions_builder: Box::new(|_| ()),
transaction_pool: Arc::new(transaction_pool),
transaction_pool,
task_manager: &mut task_manager,
on_demand: Some(on_demand),
rpc_extensions_builder: Box::new(|_, _| ()),
telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(),
config,
client,
import_queue,
keystore,
backend,
task_manager,
})
.map(|ServiceComponents { task_manager, .. }| task_manager)
network,
network_status_sinks,
system_rpc_tx,
})?;
network_starter.start_network();
Ok(task_manager)
}
......@@ -29,14 +29,14 @@ features = ["derive"]
# Substrate Dependencies
[dependencies.pallet-aura]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-balances]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
......@@ -51,148 +51,148 @@ default-features = false
path = "../../../modules/currency-exchange"
[dependencies.frame-support]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-grandpa]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-randomness-collective-flip]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-sudo]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-session]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-system]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-system-rpc-runtime-api]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-timestamp]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-transaction-payment]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-executive]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
# Substrate Primitives
[dependencies.sp-api]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-block-builder]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-consensus-aura]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-core]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-inherents]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-io]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-offchain]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-session]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-staking]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-std]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-transaction-pool]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-version]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-benchmarking]
optional = true
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
......@@ -226,7 +226,7 @@ path = "../../../primitives/ethereum-poa"
[build-dependencies.wasm-builder-runner]
version = "1.0.5"
tag = 'v2.0.0-rc5'
tag = 'v2.0.0-rc6'
package = "substrate-wasm-builder-runner"
git = "https://github.com/paritytech/substrate/"
......
......@@ -128,7 +128,7 @@ impl MaybeLockFundsTransaction for EthTransaction {
/// Prepares everything required to bench claim of funds locked by given transaction.
#[cfg(feature = "runtime-benchmarks")]
pub(crate) fn prepare_environment_for_claim<T: pallet_bridge_eth_poa::Trait<I>, I: pallet_bridge_eth_poa::Instance>(
pub(crate) fn prepare_environment_for_claim<T: pallet_bridge_eth_poa::Trait<I>, I: frame_support::traits::Instance>(
transactions: &[(RawTransaction, RawTransactionReceipt)],
) -> bp_eth_poa::H256 {
use bp_eth_poa::compute_merkle_root;
......
......@@ -687,22 +687,23 @@ impl_runtime_apis! {
highest_range_values: Vec<u32>,
steps: Vec<u32>,
repeat: u32,
extra: bool,
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark};
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, add_benchmark};
let mut batches = Vec::<BenchmarkBatch>::new();
let whitelist: Vec<Vec<u8>> = vec![
let whitelist: Vec<TrackedStorageKey> = vec![
// Block Number
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec(),
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
// Execution Phase
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec(),
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
// Event Count
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec(),
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
// System Events
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec(),
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
// Caller 0 Account
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da946c154ffd9992e395af90b5b13cc6f295c77033fce8a9045824a6690bbf99c6db269502f0a8d1d2a008542d5690a0749").to_vec(),
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da946c154ffd9992e395af90b5b13cc6f295c77033fce8a9045824a6690bbf99c6db269502f0a8d1d2a008542d5690a0749").to_vec().into(),
];
let params = (&pallet, &benchmark, &lowest_range_values, &highest_range_values, &steps, repeat, &whitelist);
let params = (&pallet, &benchmark, &lowest_range_values, &highest_range_values, &steps, repeat, &whitelist, extra);
use pallet_bridge_currency_exchange::benchmarking::{
Module as BridgeCurrencyExchangeBench,
......
......@@ -9,49 +9,49 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
bp-currency-exchange = { path = "../../primitives/currency-exchange", default-features = false }
bp-header-chain = { path = "../../primitives/header-chain", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
serde = { version = "1.0", optional = true }
# Substrate Based Dependencies
[dependencies.frame-support]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-system]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-std]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-benchmarking]
optional = true
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dev-dependencies.sp-core]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[dev-dependencies.sp-io]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[features]
......
......@@ -10,7 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
# General dependencies
codec = { package = "parity-scale-codec", version = "1.3.1" }
codec = { package = "parity-scale-codec", version = "1.3.4" }
ethereum-types = "0.9.2"
finality-grandpa = "0.12.3"
hex = "0.4"
......@@ -21,29 +21,29 @@ log = "0.4.11"
bridge-node-runtime = { path = "../../../bin/node/runtime" }
[dependencies.sp-blockchain]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-finality-grandpa]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[dependencies.sc-finality-grandpa]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[dev-dependencies]
hex = "0.4"
[dev-dependencies.sp-core]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
......@@ -8,45 +8,45 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
bp-eth-poa = { path = "../../primitives/ethereum-poa", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
hex-literal = "0.3"
serde = { version = "1.0", optional = true }
# Substrate Based Dependencies
[dependencies.frame-support]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-system]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-std]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-io]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-benchmarking]
optional = true
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
......
......@@ -13,14 +13,14 @@ hash-db = { version = "0.15.2", default-features = false }
# Substrate Based Dependencies
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
[dependencies.sp-trie]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate/"
......
......@@ -7,25 +7,25 @@ edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
# Substrate Based Dependencies
[dependencies.sp-api]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-std]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
[dependencies.frame-support]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
......
......@@ -15,7 +15,7 @@ primitive-types = { version = "0.7", default-features = false, features = ["code
fixed-hash = { version = "0.5", default-features = false }
impl-rlp = { version = "0.2", default-features = false }
impl-serde = { version = "0.2.3", optional = true }
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
rlp = { version = "0.4", default-features = false }
hash-db = { version = "0.15.2", default-features = false }
triehash = { version = "0.8.2", default-features = false }
......@@ -23,26 +23,26 @@ plain_hasher = { version = "0.2.2", default-features = false }
# Substrate Based Dependencies
[dependencies.sp-api]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-std]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-io]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
default-features = false
git = "https://github.com/paritytech/substrate.git"
......
......@@ -14,7 +14,7 @@ backoff = "0.2"
bp-currency-exchange = { path = "../../primitives/currency-exchange" }
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
clap = { version = "2.33.3", features = ["yaml"] }
codec = { package = "parity-scale-codec", version = "1.3.1" }
codec = { package = "parity-scale-codec", version = "1.3.4" }
env_logger = "0.7.0"
ethabi = "12.0"
ethabi-contract = "11.0"
......@@ -43,38 +43,38 @@ features = ["http"]
# Substrate Based Dependencies
[dependencies.frame-system]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-transaction-payment]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.node-primitives]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-core]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-keyring]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-runtime]
version = "2.0.0-rc5"
tag = 'v2.0.0-rc5'
version = "2.0.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.substrate-prometheus-endpoint]
version = "0.8.0-rc5"
tag = 'v2.0.0-rc5'
version = "0.8.0-rc6"
tag = 'v2.0.0-rc6'
git = "https://github.com/paritytech/substrate.git"
[dependencies.bridge-node-runtime]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment