mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +00:00
committed by
Bastian Köcher
parent
944859319e
commit
a7e7c895f6
@@ -19,100 +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.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-rpc]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sp-core]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-executor]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-service]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sp-inherents]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-transaction-pool]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sp-transaction-pool]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-network]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-consensus-aura]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sp-consensus-aura]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sp-consensus]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.grandpa]
|
||||
package = "sc-finality-grandpa"
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.grandpa-primitives]
|
||||
package = "sp-finality-grandpa"
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-consensus]
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
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.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sp-runtime]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.sc-basic-authorship]
|
||||
version = "0.8.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "0.8.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[dependencies.substrate-frame-rpc-system]
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
[build-dependencies]
|
||||
@@ -120,6 +120,6 @@ vergen = "3.1.0"
|
||||
|
||||
[build-dependencies.build-script-utils]
|
||||
package = "substrate-build-script-utils"
|
||||
version = "2.0.0-alpha.6"
|
||||
rev = "c13ad41634d0bd7cf07897c2aa062b917d520520"
|
||||
version = "2.0.0-rc1"
|
||||
rev = "599ba75bc2b5acd238c21c5c7efe8e2ad8d401ee"
|
||||
git = "https://github.com/paritytech/substrate.git"
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
|
||||
|
||||
use bridge_node_runtime::{self, opaque::Block, RuntimeApi};
|
||||
use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
|
||||
use sc_client::LongestChain;
|
||||
use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState, StorageAndProofProvider};
|
||||
use sc_client_api::ExecutorProvider;
|
||||
use sc_consensus::LongestChain;
|
||||
use sc_executor::native_executor_instance;
|
||||
pub use sc_executor::NativeExecutor;
|
||||
use sc_service::{error::Error as ServiceError, AbstractService, Configuration, ServiceBuilder};
|
||||
@@ -51,7 +51,7 @@ macro_rules! new_full_start {
|
||||
bridge_node_runtime::RuntimeApi,
|
||||
crate::service::Executor,
|
||||
>($config)?
|
||||
.with_select_chain(|_config, backend| Ok(sc_client::LongestChain::new(backend.clone())))?
|
||||
.with_select_chain(|_config, backend| Ok(sc_consensus::LongestChain::new(backend.clone())))?
|
||||
.with_transaction_pool(|config, client, _fetcher, prometheus_registry| {
|
||||
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
|
||||
Ok(sc_transaction_pool::BasicPool::new(
|
||||
@@ -60,32 +60,36 @@ macro_rules! new_full_start {
|
||||
prometheus_registry,
|
||||
))
|
||||
})?
|
||||
.with_import_queue(|_config, client, mut select_chain, _transaction_pool| {
|
||||
let select_chain = select_chain
|
||||
.take()
|
||||
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
|
||||
.with_import_queue(
|
||||
|_config, client, mut select_chain, _transaction_pool, spawn_task_handle, registry| {
|
||||
let select_chain = select_chain
|
||||
.take()
|
||||
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
|
||||
|
||||
let (grandpa_block_import, grandpa_link) =
|
||||
grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), 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(),
|
||||
client.clone(),
|
||||
);
|
||||
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>(
|
||||
sc_consensus_aura::slot_duration(&*client)?,
|
||||
aura_block_import,
|
||||
Some(Box::new(grandpa_block_import.clone())),
|
||||
None,
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
)?;
|
||||
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,
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
spawn_task_handle,
|
||||
registry,
|
||||
)?;
|
||||
|
||||
import_setup = Some((grandpa_block_import, grandpa_link));
|
||||
import_setup = Some((grandpa_block_import, grandpa_link));
|
||||
|
||||
Ok(import_queue)
|
||||
})?
|
||||
Ok(import_queue)
|
||||
},
|
||||
)?
|
||||
.with_rpc_extensions(|builder| -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, _> {
|
||||
use substrate_frame_rpc_system::{FullSystem, SystemApi};
|
||||
|
||||
@@ -122,7 +126,11 @@ pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceEr
|
||||
.build()?;
|
||||
|
||||
if role.is_authority() {
|
||||
let proposer = sc_basic_authorship::ProposerFactory::new(service.client(), service.transaction_pool());
|
||||
let proposer = sc_basic_authorship::ProposerFactory::new(
|
||||
service.client(),
|
||||
service.transaction_pool(),
|
||||
service.prometheus_registry().as_ref(),
|
||||
);
|
||||
|
||||
let client = service.client();
|
||||
let select_chain = service.select_chain().ok_or(ServiceError::SelectChainRequired)?;
|
||||
@@ -181,6 +189,7 @@ pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceEr
|
||||
telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
|
||||
voting_rule: grandpa::VotingRulesBuilder::default().build(),
|
||||
prometheus_registry: service.prometheus_registry(),
|
||||
shared_voter_state: SharedVoterState::empty(),
|
||||
};
|
||||
|
||||
// the GRANDPA voter task is considered infallible, i.e.
|
||||
@@ -211,30 +220,34 @@ pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceE
|
||||
);
|
||||
Ok(pool)
|
||||
})?
|
||||
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| {
|
||||
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() 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();
|
||||
.with_import_queue_and_fprb(
|
||||
|_config, client, backend, fetcher, _select_chain, _tx_pool, spawn_task_handle, prometheus_registry| {
|
||||
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() 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();
|
||||
|
||||
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)),
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
)?;
|
||||
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)),
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
spawn_task_handle,
|
||||
prometheus_registry,
|
||||
)?;
|
||||
|
||||
Ok((import_queue, finality_proof_request_builder))
|
||||
})?
|
||||
Ok((import_queue, finality_proof_request_builder))
|
||||
},
|
||||
)?
|
||||
.with_finality_proof_provider(|client, backend| {
|
||||
let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;
|
||||
Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
|
||||
|
||||
Reference in New Issue
Block a user