diff --git a/bridges/bin/node/node/Cargo.toml b/bridges/bin/node/node/Cargo.toml index 2b5c9775e194889153db20feafa2b7d5bfe832d6..6dfaa6b58e80c31a30e76da8aade88748ac3b70c 100644 --- a/bridges/bin/node/node/Cargo.toml +++ b/bridges/bin/node/node/Cargo.toml @@ -19,95 +19,100 @@ bridge-node-runtime = { version = "0.1.0", path = "../runtime" } sp-bridge-eth-poa = { version = "0.1.0", path = "../../../primitives/ethereum-poa" } [dependencies.sc-cli] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-rpc] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-core] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-executor] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-service] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-inherents] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-transaction-pool] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-transaction-pool] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-network] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-consensus-aura] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-consensus-aura] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-consensus] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.grandpa] package = "sc-finality-grandpa" -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.grandpa-primitives] package = "sp-finality-grandpa" -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" +git = "https://github.com/paritytech/substrate.git" + +[dependencies.sc-client-api] +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-client] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-runtime] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sc-basic-authorship] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.substrate-frame-rpc-system] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [build-dependencies] @@ -115,6 +120,6 @@ vergen = "3.1.0" [build-dependencies.build-script-utils] package = "substrate-build-script-utils" -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" diff --git a/bridges/bin/node/node/src/chain_spec.rs b/bridges/bin/node/node/src/chain_spec.rs index 13bb3f167d3691f48e6cbd9bf0544ed333fd3657..11a31c7ae1cb54d156fe871b83361cc6542e5ea5 100644 --- a/bridges/bin/node/node/src/chain_spec.rs +++ b/bridges/bin/node/node/src/chain_spec.rs @@ -25,7 +25,7 @@ use sp_core::{sr25519, Pair, Public}; use sp_runtime::traits::{IdentifyAccount, Verify}; /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::ChainSpec<GenesisConfig>; +pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>; /// The chain specification option. This is expected to come in from the CLI and /// is little more than one of a number of alternatives which can easily be converted @@ -71,6 +71,7 @@ impl Alternative { Alternative::Development => ChainSpec::from_genesis( "Development", "dev", + sc_service::ChainType::Development, || { testnet_genesis( vec![get_authority_keys_from_seed("Alice")], @@ -93,6 +94,7 @@ impl Alternative { Alternative::LocalTestnet => ChainSpec::from_genesis( "Local Testnet", "local_testnet", + sc_service::ChainType::Local, || { testnet_genesis( vec![ @@ -128,14 +130,6 @@ impl Alternative { ), }) } - - pub(crate) fn from(s: &str) -> Option<Self> { - match s { - "" | "dev" => Some(Alternative::Development), - "local" => Some(Alternative::LocalTestnet), - _ => None, - } - } } fn session_keys(aura: AuraId, grandpa: GrandpaId) -> SessionKeys { @@ -173,13 +167,6 @@ fn testnet_genesis( } } -pub fn load_spec(id: &str) -> Result<Option<ChainSpec>, String> { - Ok(match Alternative::from(id) { - Some(spec) => Some(spec.load()?), - None => None, - }) -} - fn load_kovan_config() -> Option<BridgeEthPoAConfig> { Some(BridgeEthPoAConfig { initial_header: sp_bridge_eth_poa::Header { diff --git a/bridges/bin/node/node/src/command.rs b/bridges/bin/node/node/src/command.rs index cdae1c8e3aae81fb2bfceba74c211c4b6e72f964..cfe7115239eebb95f8ba0b0d91bf27fc92d7eea8 100644 --- a/bridges/bin/node/node/src/command.rs +++ b/bridges/bin/node/node/src/command.rs @@ -30,28 +30,64 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>. -use crate::chain_spec; use crate::cli::Cli; use crate::service; -use sc_cli::VersionInfo; +use sc_cli::SubstrateCli; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; -/// Parse and run command line arguments -pub fn run(version: VersionInfo) -> sc_cli::Result<()> { - let opt = sc_cli::from_args::<Cli>(&version); +impl SubstrateCli for Cli { + fn impl_name() -> &'static str { + "Bridge Node" + } + + fn impl_version() -> &'static str { + env!("CARGO_PKG_VERSION") + } + + fn description() -> &'static str { + "Bridge Node" + } + + fn author() -> &'static str { + "Parity Technologies" + } + + fn support_url() -> &'static str { + "https://github.com/paritytech/parity-bridges-common/" + } + + fn copyright_start_year() -> i32 { + 2019 + } + + fn executable_name() -> &'static str { + "bridge-node" + } - let mut config = sc_service::Configuration::from_version(&version); + fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> { + Ok(Box::new( + match id { + "" | "dev" => crate::chain_spec::Alternative::Development, + "local" => crate::chain_spec::Alternative::LocalTestnet, + _ => return Err(format!("Unsupported chain specification: {}", id)), + } + .load()?, + )) + } +} + +/// Parse and run command line arguments +pub fn run() -> sc_cli::Result<()> { + let cli = Cli::from_args(); - match opt.subcommand { + match &cli.subcommand { Some(subcommand) => { - subcommand.init(&version)?; - subcommand.update_config(&mut config, chain_spec::load_spec, &version)?; - subcommand.run(config, |config: _| Ok(new_full_start!(config).0)) + let runner = cli.create_runner(subcommand)?; + runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0)) } None => { - opt.run.init(&version)?; - opt.run.update_config(&mut config, chain_spec::load_spec, &version)?; - opt.run.run(config, service::new_light, service::new_full, &version) + let runner = cli.create_runner(&cli.run)?; + runner.run_node(service::new_light, service::new_full, bridge_node_runtime::VERSION) } } } diff --git a/bridges/bin/node/node/src/main.rs b/bridges/bin/node/node/src/main.rs index 3a5823d8d743259401bf5d23145f219bc749006f..30b05d773b0ea25b78dd67f2afc911e6a84acdb1 100644 --- a/bridges/bin/node/node/src/main.rs +++ b/bridges/bin/node/node/src/main.rs @@ -24,16 +24,5 @@ mod cli; mod command; fn main() -> sc_cli::Result<()> { - let version = sc_cli::VersionInfo { - name: "Bridge Node", - commit: env!("VERGEN_SHA_SHORT"), - version: env!("CARGO_PKG_VERSION"), - executable_name: "bridge-node", - author: "Parity Technologies", - description: "Bridge Node", - support_url: "https://github.com/paritytech/parity-bridges-common/", - copyright_start_year: 2019, - }; - - command::run(version) + command::run() } diff --git a/bridges/bin/node/node/src/service.rs b/bridges/bin/node/node/src/service.rs index 4ed07fed2b1f543541a9a161e4eb34c3b64f645b..82bd60c11a3cff7d5afaffacfc2ea04d39c84f51 100644 --- a/bridges/bin/node/node/src/service.rs +++ b/bridges/bin/node/node/src/service.rs @@ -16,9 +16,10 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use bridge_node_runtime::{self, opaque::Block, GenesisConfig, RuntimeApi}; -use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; +use bridge_node_runtime::{self, opaque::Block, RuntimeApi}; +use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider}; use sc_client::LongestChain; +use sc_client_api::ExecutorProvider; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; use sc_service::{error::Error as ServiceError, AbstractService, Configuration, ServiceBuilder}; @@ -40,6 +41,8 @@ native_executor_instance!( /// be able to perform chain operations. macro_rules! new_full_start { ($config:expr) => {{ + use std::sync::Arc; + let mut import_setup = None; let inherent_data_providers = sp_inherents::InherentDataProviders::new(); @@ -49,11 +52,12 @@ macro_rules! new_full_start { crate::service::Executor, >($config)? .with_select_chain(|_config, backend| Ok(sc_client::LongestChain::new(backend.clone())))? - .with_transaction_pool(|config, client, _fetcher| { + .with_transaction_pool(|config, client, _fetcher, prometheus_registry| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); Ok(sc_transaction_pool::BasicPool::new( config, std::sync::Arc::new(pool_api), + prometheus_registry, )) })? .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { @@ -61,7 +65,8 @@ macro_rules! new_full_start { .take() .ok_or_else(|| sc_service::Error::SelectChainRequired)?; - let (grandpa_block_import, grandpa_link) = grandpa::block_import(client.clone(), &*client, select_chain)?; + let (grandpa_block_import, grandpa_link) = + grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?; let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( grandpa_block_import.clone(), @@ -97,17 +102,12 @@ macro_rules! new_full_start { } /// Builds a new service for a full client. -pub fn new_full(config: Configuration<GenesisConfig>) -> Result<impl AbstractService, ServiceError> { - let is_authority = config.roles.is_authority(); +pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceError> { + let role = config.role.clone(); let force_authoring = config.force_authoring; - let name = config.name.clone(); + let name = config.network.node_name.clone(); let disable_grandpa = config.disable_grandpa; - // sentry nodes announce themselves as authorities to the network - // and should run the same protocols authorities do, but it should - // never actively participate in any consensus process. - let participates_in_consensus = is_authority && !config.sentry_mode; - let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config); let (block_import, grandpa_link) = import_setup @@ -116,15 +116,13 @@ pub fn new_full(config: Configuration<GenesisConfig>) -> Result<impl AbstractSer let service = builder .with_finality_proof_provider(|client, backend| { - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) + let provider = client as Arc<dyn StorageAndProofProvider<_, _>>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) })? .build()?; - if participates_in_consensus { - let proposer = sc_basic_authorship::ProposerFactory { - client: service.client(), - transaction_pool: service.transaction_pool(), - }; + if role.is_authority() { + let proposer = sc_basic_authorship::ProposerFactory::new(service.client(), service.transaction_pool()); let client = service.client(); let select_chain = service.select_chain().ok_or(ServiceError::SelectChainRequired)?; @@ -151,7 +149,7 @@ pub fn new_full(config: Configuration<GenesisConfig>) -> Result<impl AbstractSer // 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 participates_in_consensus { + let keystore = if role.is_authority() { Some(service.keystore()) } else { None @@ -164,7 +162,7 @@ pub fn new_full(config: Configuration<GenesisConfig>) -> Result<impl AbstractSer name: Some(name), observer_enabled: false, keystore, - is_authority, + is_authority: role.is_network_authority(), }; let enable_grandpa = !disable_grandpa; @@ -180,9 +178,9 @@ pub fn new_full(config: Configuration<GenesisConfig>) -> Result<impl AbstractSer link: grandpa_link, network: service.network(), inherent_data_providers: inherent_data_providers.clone(), - on_exit: service.on_exit(), telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: grandpa::VotingRulesBuilder::default().build(), + prometheus_registry: service.prometheus_registry(), }; // the GRANDPA voter task is considered infallible, i.e. @@ -196,18 +194,19 @@ pub fn new_full(config: Configuration<GenesisConfig>) -> Result<impl AbstractSer } /// Builds a new service for a light client. -pub fn new_light(config: Configuration<GenesisConfig>) -> Result<impl AbstractService, ServiceError> { +pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceError> { let inherent_data_providers = InherentDataProviders::new(); ServiceBuilder::new_light::<Block, RuntimeApi, Executor>(config)? .with_select_chain(|_config, backend| Ok(LongestChain::new(backend.clone())))? - .with_transaction_pool(|config, client, fetcher| { + .with_transaction_pool(|config, client, fetcher, prometheus_registry| { let fetcher = fetcher.ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); let pool = sc_transaction_pool::BasicPool::with_revalidation_type( config, Arc::new(pool_api), + prometheus_registry, sc_transaction_pool::RevalidationType::Light, ); Ok(pool) @@ -216,8 +215,12 @@ pub fn new_light(config: Configuration<GenesisConfig>) -> Result<impl AbstractSe let fetch_checker = fetcher .map(|fetcher| fetcher.checker().clone()) .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; - let grandpa_block_import = - grandpa::light_block_import(client.clone(), backend, &*client.clone(), Arc::new(fetch_checker))?; + let grandpa_block_import = grandpa::light_block_import( + client.clone(), + backend, + &(client.clone() as Arc<_>), + Arc::new(fetch_checker), + )?; let finality_proof_import = grandpa_block_import.clone(); let finality_proof_request_builder = finality_proof_import.create_finality_proof_request_builder(); @@ -233,7 +236,8 @@ pub fn new_light(config: Configuration<GenesisConfig>) -> Result<impl AbstractSe Ok((import_queue, finality_proof_request_builder)) })? .with_finality_proof_provider(|client, backend| { - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) + let provider = client as Arc<dyn StorageAndProofProvider<_, _>>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) })? .build() } diff --git a/bridges/bin/node/runtime/Cargo.toml b/bridges/bin/node/runtime/Cargo.toml index 394db75e179fd7f308972fd6ade3bb44b8ee7024..f39b55625afbbce4b8b16fae7441d56f93c2bb7f 100644 --- a/bridges/bin/node/runtime/Cargo.toml +++ b/bridges/bin/node/runtime/Cargo.toml @@ -19,15 +19,15 @@ features = ["derive"] # Substrate Dependencies [dependencies.pallet-aura] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-balances] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-bridge-eth-poa] @@ -36,76 +36,76 @@ default-features = false path = "../../../modules/ethereum" [dependencies.frame-support] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-grandpa] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-randomness-collective-flip] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-sudo] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-session] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.frame-system] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.frame-system-rpc-runtime-api] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-timestamp] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-transaction-payment] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.frame-executive] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" # Substrate Primitives [dependencies.sp-api] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-block-builder] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-bridge-eth-poa] @@ -114,75 +114,75 @@ default-features = false path = "../../../primitives/ethereum-poa" [dependencies.sp-consensus-aura] -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-core] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-inherents] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-io] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-offchain] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-runtime] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-session] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-staking] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-std] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-transaction-pool] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-version] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [build-dependencies.wasm-builder-runner] version = "1.0.5" package = "substrate-wasm-builder-runner" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [features] diff --git a/bridges/bin/node/runtime/src/lib.rs b/bridges/bin/node/runtime/src/lib.rs index 5128ec58e9cf132aaf47dcc2dfdb3e486b15bd5a..45db36476e3df66d5e954226789582cb49dbe0b1 100644 --- a/bridges/bin/node/runtime/src/lib.rs +++ b/bridges/bin/node/runtime/src/lib.rs @@ -34,8 +34,9 @@ use sp_runtime::traits::{ BlakeTwo256, Block as BlockT, ConvertInto, IdentifyAccount, IdentityLookup, OpaqueKeys, Verify, }; use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, transaction_validity::TransactionValidity, ApplyExtrinsicResult, - MultiSignature, + create_runtime_str, generic, impl_opaque_keys, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, MultiSignature, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -43,7 +44,12 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. -pub use frame_support::{construct_runtime, parameter_types, traits::Randomness, weights::Weight, StorageValue}; +pub use frame_support::{ + construct_runtime, parameter_types, + traits::Randomness, + weights::{RuntimeDbWeight, Weight}, + StorageValue, +}; pub use pallet_balances::Call as BalancesCall; pub use pallet_bridge_eth_poa::Call as BridgeEthPoACall; pub use pallet_timestamp::Call as TimestampCall; @@ -109,6 +115,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; pub const MILLISECS_PER_BLOCK: u64 = 6000; @@ -131,10 +138,15 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000; + pub const MaximumBlockWeight: Weight = 2_000_000_000_000; + pub const ExtrinsicBaseWeight: Weight = 10_000_000; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; + pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 60_000_000, // ~0.06 ms = ~60 µs + write: 200_000_000, // ~0.2 ms = 200 µs + }; } impl frame_system::Trait for Runtime { @@ -162,6 +174,14 @@ impl frame_system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = DbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = (); + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -225,7 +245,6 @@ parameter_types! { impl pallet_transaction_payment::Trait for Runtime { type Currency = pallet_balances::Module<Runtime>; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); @@ -246,6 +265,7 @@ impl pallet_session::Trait for Runtime { type ValidatorId = <Self as frame_system::Trait>::AccountId; type ValidatorIdOf = (); type ShouldEndSession = pallet_session::PeriodicSessions<Period, Offset>; + type NextSessionRotation = pallet_session::PeriodicSessions<Period, Offset>; type SessionManager = ShiftSessionManager; type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders; type Keys = SessionKeys; @@ -279,6 +299,7 @@ impl ShiftSessionManager { impl pallet_session::SessionManager<AccountId> for ShiftSessionManager { fn end_session(_: sp_staking::SessionIndex) {} + fn start_session(_: sp_staking::SessionIndex) {} fn new_session(session_index: sp_staking::SessionIndex) -> Option<Vec<AccountId>> { // can't access genesis config here :/ if session_index == 0 || session_index == 1 { @@ -376,10 +397,6 @@ impl_runtime_apis! { Executive::apply_extrinsic(extrinsic) } - fn apply_trusted_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_trusted_extrinsic(extrinsic) - } - fn finalize_block() -> <Block as BlockT>::Header { Executive::finalize_block() } @@ -421,8 +438,11 @@ impl_runtime_apis! { } impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime { - fn validate_transaction(tx: <Block as BlockT>::Extrinsic) -> TransactionValidity { - Executive::validate_transaction(tx) + fn validate_transaction( + source: TransactionSource, + tx: <Block as BlockT>::Extrinsic, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx) } } diff --git a/bridges/modules/ethereum/Cargo.toml b/bridges/modules/ethereum/Cargo.toml index 3b752212ec9bf33e313af1fcc6a60e36c236fddc..96024f0ac70a0e8078cfa3f803be4fe602a36ac4 100644 --- a/bridges/modules/ethereum/Cargo.toml +++ b/bridges/modules/ethereum/Cargo.toml @@ -12,33 +12,33 @@ primitives = { package = "sp-bridge-eth-poa", path = "../../primitives/ethereum- # Substrate Based Dependencies [dependencies.frame-support] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.frame-system] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-std] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-io] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-runtime] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" # Dev Dependencies diff --git a/bridges/modules/ethereum/src/lib.rs b/bridges/modules/ethereum/src/lib.rs index b7bdd066b256783155b7390b67748994771b2335..9f0b0cbd03171f96f85df2d2655892a32b7b2ec7 100644 --- a/bridges/modules/ethereum/src/lib.rs +++ b/bridges/modules/ethereum/src/lib.rs @@ -21,8 +21,8 @@ use frame_support::{decl_module, decl_storage}; use primitives::{Address, Header, Receipt, H256, U256}; use sp_runtime::{ transaction_validity::{ - InvalidTransaction, TransactionLongevity, TransactionPriority, TransactionValidity, UnknownTransaction, - ValidTransaction, + InvalidTransaction, TransactionLongevity, TransactionPriority, TransactionSource, TransactionValidity, + UnknownTransaction, ValidTransaction, }, RuntimeDebug, }; @@ -293,6 +293,7 @@ pub trait Trait: frame_system::Trait { decl_module! { pub struct Module<T: Trait> for enum Call where origin: T::Origin { /// Import single Aura header. Requires transaction to be **UNSIGNED**. + #[weight = 0] // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) pub fn import_unsigned_header(origin, header: Header, receipts: Option<Vec<Receipt>>) { frame_system::ensure_none(origin)?; @@ -313,6 +314,7 @@ decl_module! { /// /// This should be used with caution - passing too many headers could lead to /// enormous block production/import time. + #[weight = 0] // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) pub fn import_signed_headers(origin, headers_with_receipts: Vec<(Header, Option<Vec<Receipt>>)>) { let submitter = frame_system::ensure_signed(origin)?; let mut finalized_headers = BTreeMap::new(); @@ -359,19 +361,19 @@ decl_storage! { /// Oldest unpruned block(s) number. OldestUnprunedBlock: u64; /// Map of imported headers by hash. - Headers: map hasher(blake2_256) H256 => Option<StoredHeader<T::AccountId>>; + Headers: map hasher(identity) H256 => Option<StoredHeader<T::AccountId>>; /// Map of imported header hashes by number. - HeadersByNumber: map hasher(blake2_256) u64 => Option<Vec<H256>>; + HeadersByNumber: map hasher(blake2_128_concat) u64 => Option<Vec<H256>>; /// The ID of next validator set. NextValidatorsSetId: u64; /// Map of validators sets by their id. - ValidatorsSets: map hasher(blake2_256) u64 => Option<ValidatorsSet>; + ValidatorsSets: map hasher(twox_64_concat) u64 => Option<ValidatorsSet>; /// Validators sets reference count. Each header that is authored by this set increases /// the reference count. When we prune this header, we decrease the reference count. /// When it reaches zero, we are free to prune validator set as well. - ValidatorsSetsRc: map hasher(blake2_256) u64 => Option<u64>; + ValidatorsSetsRc: map hasher(twox_64_concat) u64 => Option<u64>; /// Map of validators set changes scheduled by given header. - ScheduledChanges: map hasher(blake2_256) H256 => Option<ScheduledChange>; + ScheduledChanges: map hasher(identity) H256 => Option<ScheduledChange>; } add_extra_genesis { config(initial_header): Header; @@ -434,7 +436,7 @@ impl<T: Trait> Module<T> { impl<T: Trait> frame_support::unsigned::ValidateUnsigned for Module<T> { type Call = Call<T>; - fn validate_unsigned(call: &Self::Call) -> TransactionValidity { + fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { match *call { Self::Call::import_unsigned_header(ref header, ref receipts) => { let accept_result = verification::accept_aura_header_into_pool( diff --git a/bridges/modules/substrate/Cargo.toml b/bridges/modules/substrate/Cargo.toml index 2ac2269af44d87ed88455a753e85b0153c1ec590..a62ee1a57ef7fe1c243f74dfd03f67105c17df1a 100644 --- a/bridges/modules/substrate/Cargo.toml +++ b/bridges/modules/substrate/Cargo.toml @@ -13,57 +13,57 @@ hash-db = { version = "0.15.2", default-features = false } # Substrate Based Dependencies [dependencies.frame-support] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.frame-system] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-session] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-core] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-finality-grandpa] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-runtime] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-trie] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" # Dev Dependencies [dev-dependencies.sp-io] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dev-dependencies.sp-state-machine] -version = "0.8.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "0.8.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [features] diff --git a/bridges/modules/substrate/src/lib.rs b/bridges/modules/substrate/src/lib.rs index 3a0f9a0db557eb2dea399d9ed10a0a8e5a4fd9ad..efbe0904e6bd893e0abe2495b9329200dc66f038 100644 --- a/bridges/modules/substrate/src/lib.rs +++ b/bridges/modules/substrate/src/lib.rs @@ -96,11 +96,11 @@ pub trait Trait: system::Trait {} decl_storage! { trait Store for Module<T: Trait> as Bridge { /// The number of current bridges managed by the module. - pub NumBridges get(num_bridges) config(): BridgeId; + pub NumBridges get(fn num_bridges) config(): BridgeId; /// Maps a bridge id to a bridge struct. Allows a single /// `bridge` module to manage multiple bridges. - pub TrackedBridges get(tracked_bridges): map hasher(blake2_256) BridgeId => Option<BridgeInfo<T>>; + pub TrackedBridges get(fn tracked_bridges): map hasher(blake2_128_concat) BridgeId => Option<BridgeInfo<T>>; } } @@ -108,6 +108,7 @@ decl_module! { pub struct Module<T: Trait> for enum Call where origin: T::Origin { type Error = Error<T>; + #[weight = 0] // TODO: update me fn initialize_bridge( origin, block_header: T::Header, @@ -131,6 +132,7 @@ decl_module! { NumBridges::put(new_bridge_id); } + #[weight = 0] // TODO: update me fn submit_finalized_headers(origin) { let _sender = ensure_signed(origin)?; } @@ -155,8 +157,7 @@ impl<T: Trait> Module<T> { proof: StorageProof, validator_set: &Vec<(AuthorityId, AuthorityWeight)>, ) -> DispatchResult { - let checker = - <StorageProofChecker<<T::Hashing as sp_runtime::traits::Hash>::Hasher>>::new(*state_root, proof.clone()); + let checker = <StorageProofChecker<T::Hashing>>::new(*state_root, proof.clone()); let checker = checker.map_err(Self::map_storage_err)?; @@ -259,6 +260,9 @@ mod tests { type Event = (); type BlockHashCount = (); type MaximumBlockWeight = (); + type DbWeight = (); + type BlockExecutionWeight = (); + type ExtrinsicBaseWeight = (); type AvailableBlockRatio = (); type MaximumBlockLength = (); type Version = (); diff --git a/bridges/primitives/ethereum-poa/Cargo.toml b/bridges/primitives/ethereum-poa/Cargo.toml index 015cfacb4e0b7e48562109dbdc76ad671ec68b94..dca0750b3acde041fe10d111134d298847f0196a 100644 --- a/bridges/primitives/ethereum-poa/Cargo.toml +++ b/bridges/primitives/ethereum-poa/Cargo.toml @@ -10,7 +10,7 @@ serde = { version = "1.0", optional = true } serde-big-array = { version = "0.2", optional = true } ethbloom = { version = "0.8", default-features = false } parity-bytes = { version = "0.1", default-features = false } -primitive-types = { version = "0.6", default-features = false, features = ["codec", "rlp"] } +primitive-types = { version = "0.7", default-features = false, features = ["codec", "rlp"] } fixed-hash = { version = "0.5", default-features = false } impl-rlp = { version = "0.2", default-features = false } impl-serde = { version = "0.2.3", optional = true } @@ -22,27 +22,27 @@ plain_hasher = { version = "0.2.2", default-features = false } # Substrate Based Dependencies [dependencies.sp-api] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-std] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-runtime] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-io] -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.6" default-features = false -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [features] diff --git a/bridges/relays/ethereum/Cargo.toml b/bridges/relays/ethereum/Cargo.toml index 4d659365058b01fbb54cc2e6b19e2d7228623ca3..02698ef37cdbdf1a2343fdd9788322bf5582b971 100644 --- a/bridges/relays/ethereum/Cargo.toml +++ b/bridges/relays/ethereum/Cargo.toml @@ -22,40 +22,40 @@ serde = { version = "1.0.106", features = ["derive"] } serde_json = "1.0.51" sp-bridge-eth-poa = { path = "../../primitives/ethereum-poa" } time = "0.2" -web3 = { git = "https://github.com/svyatonik/rust-web3.git", branch = "fix_receipt" } +web3 = { git = "https://github.com/svyatonik/rust-web3.git", branch = "add-receipt-root" } # Substrate Based Dependencies [dependencies.frame-system] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.pallet-transaction-payment] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" # I think this is used for sr-io and stuff [dependencies.node-primitives] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" # Branch used for keccack256 hasher code # Could probably move the keccack hasher stuff to our own primitives [dependencies.sp-core] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-keyring] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" [dependencies.sp-runtime] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate.git" # This should get moved to our `bin` folder diff --git a/bridges/relays/substrate/Cargo.toml b/bridges/relays/substrate/Cargo.toml index 51c197e7f5c1b1e9295ca2a4ff45c0b986c35ee8..6521ec35f61a3f9a0e20a33abbdbee814f7e43aa 100644 --- a/bridges/relays/substrate/Cargo.toml +++ b/bridges/relays/substrate/Cargo.toml @@ -17,16 +17,16 @@ serde_json = "1.0.51" url = "2.1.0" [dependencies.sp-core] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.sp-rpc] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/" [dependencies.node-primitives] -version = "2.0.0-alpha.2" -rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31" +version = "2.0.0-alpha.6" +rev = "c13ad41634d0bd7cf07897c2aa062b917d520520" git = "https://github.com/paritytech/substrate/"