mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Companion for Substrate#14612 (#2923)
* Companion for Substrate#14612 https://github.com/paritytech/substrate/pull/14612 * Remove patch * Cargo.lock * Fix * Fix compilation * Fix Fix * ... * :face_palm: * ................. * update lockfile for {"polkadot", "substrate"} * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -50,10 +50,7 @@ use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerH
|
||||
use sp_api::{ApiExt, ConstructRuntimeApi};
|
||||
use sp_consensus_aura::AuraApi;
|
||||
use sp_keystore::KeystorePtr;
|
||||
use sp_runtime::{
|
||||
app_crypto::AppCrypto,
|
||||
traits::{BlakeTwo256, Header as HeaderT},
|
||||
};
|
||||
use sp_runtime::{app_crypto::AppCrypto, traits::Header as HeaderT};
|
||||
use std::{marker::PhantomData, sync::Arc, time::Duration};
|
||||
use substrate_prometheus_endpoint::Registry;
|
||||
|
||||
@@ -233,7 +230,7 @@ pub fn new_partial<RuntimeApi, BIQ>(
|
||||
ParachainClient<RuntimeApi>,
|
||||
ParachainBackend,
|
||||
(),
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_consensus::DefaultImportQueue<Block>,
|
||||
sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>,
|
||||
(ParachainBlockImport<RuntimeApi>, Option<Telemetry>, Option<TelemetryWorkerHandle>),
|
||||
>,
|
||||
@@ -244,22 +241,16 @@ where
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
>,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>,
|
||||
{
|
||||
let telemetry = config
|
||||
.telemetry_endpoints
|
||||
@@ -349,13 +340,10 @@ where
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>
|
||||
+ cumulus_primitives_core::CollectCollationInfo<Block>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>
|
||||
+ 'static,
|
||||
BIQ: FnOnce(
|
||||
@@ -364,10 +352,7 @@ where
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
>,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>,
|
||||
BIC: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
@@ -540,15 +525,12 @@ where
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>
|
||||
+ cumulus_primitives_core::CollectCollationInfo<Block>
|
||||
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
|
||||
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
@@ -556,10 +538,7 @@ where
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
>,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>,
|
||||
BIC: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
@@ -731,10 +710,7 @@ pub fn rococo_parachain_build_import_queue(
|
||||
config: &Configuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<rococo_parachain_runtime::RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
> {
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error> {
|
||||
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
|
||||
|
||||
cumulus_client_consensus_aura::import_queue::<
|
||||
@@ -862,18 +838,15 @@ pub fn shell_build_import_queue<RuntimeApi>(
|
||||
config: &Configuration,
|
||||
_: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>, sc_service::Error>
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>
|
||||
where
|
||||
RuntimeApi: ConstructRuntimeApi<Block, ParachainClient<RuntimeApi>> + Send + Sync + 'static,
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
{
|
||||
cumulus_client_consensus_relay_chain::import_queue(
|
||||
client,
|
||||
@@ -898,13 +871,10 @@ where
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>
|
||||
+ cumulus_primitives_core::CollectCollationInfo<Block>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
{
|
||||
start_shell_node_impl::<RuntimeApi, _, _, _>(
|
||||
parachain_config,
|
||||
@@ -1052,8 +1022,8 @@ where
|
||||
{
|
||||
async fn verify(
|
||||
&mut self,
|
||||
block_import: BlockImportParams<Block, ()>,
|
||||
) -> Result<BlockImportParams<Block, ()>, String> {
|
||||
block_import: BlockImportParams<Block>,
|
||||
) -> Result<BlockImportParams<Block>, String> {
|
||||
if self
|
||||
.client
|
||||
.runtime_api()
|
||||
@@ -1074,19 +1044,16 @@ pub fn aura_build_import_queue<RuntimeApi, AuraId: AppCrypto>(
|
||||
config: &Configuration,
|
||||
telemetry_handle: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>, sc_service::Error>
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>
|
||||
where
|
||||
RuntimeApi: ConstructRuntimeApi<Block, ParachainClient<RuntimeApi>> + Send + Sync + 'static,
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>
|
||||
+ sp_consensus_aura::AuraApi<Block, <<AuraId as AppCrypto>::Pair as Pair>::Public>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
<<AuraId as AppCrypto>::Pair as Pair>::Signature:
|
||||
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
|
||||
{
|
||||
@@ -1146,16 +1113,13 @@ where
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>
|
||||
+ cumulus_primitives_core::CollectCollationInfo<Block>
|
||||
+ sp_consensus_aura::AuraApi<Block, <<AuraId as AppCrypto>::Pair as Pair>::Public>
|
||||
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
|
||||
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
<<AuraId as AppCrypto>::Pair as Pair>::Signature:
|
||||
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
|
||||
{
|
||||
@@ -1314,15 +1278,12 @@ where
|
||||
RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
|
||||
+ sp_api::Metadata<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_api::ApiExt<
|
||||
Block,
|
||||
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
|
||||
> + sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_api::ApiExt<Block>
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_block_builder::BlockBuilder<Block>
|
||||
+ cumulus_primitives_core::CollectCollationInfo<Block>
|
||||
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
|
||||
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
@@ -1330,10 +1291,7 @@ where
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
>,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>,
|
||||
BIC: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
@@ -1504,10 +1462,7 @@ pub fn contracts_rococo_build_import_queue(
|
||||
config: &Configuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<contracts_rococo_runtime::RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
> {
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error> {
|
||||
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
|
||||
|
||||
cumulus_client_consensus_aura::import_queue::<
|
||||
|
||||
Reference in New Issue
Block a user