Companion for #13683 (#2371)

* Rename 'AppKey' to 'AppCrypto'

* update lockfile for {"substrate", "polkadot"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Davide Galassi
2023-03-24 16:12:50 +01:00
committed by GitHub
parent 67e7fcdded
commit 570b89c3b6
2 changed files with 278 additions and 277 deletions
Generated
+256 -256
View File
File diff suppressed because it is too large Load Diff
+22 -21
View File
@@ -51,7 +51,7 @@ use sp_api::{ApiExt, ConstructRuntimeApi};
use sp_consensus_aura::AuraApi; use sp_consensus_aura::AuraApi;
use sp_keystore::KeystorePtr; use sp_keystore::KeystorePtr;
use sp_runtime::{ use sp_runtime::{
app_crypto::AppKey, app_crypto::AppCrypto,
traits::{BlakeTwo256, Header as HeaderT}, traits::{BlakeTwo256, Header as HeaderT},
}; };
use std::{marker::PhantomData, sync::Arc, time::Duration}; use std::{marker::PhantomData, sync::Arc, time::Duration};
@@ -1042,7 +1042,7 @@ where
} }
/// Build the import queue for Statemint and other Aura-based runtimes. /// Build the import queue for Statemint and other Aura-based runtimes.
pub fn aura_build_import_queue<RuntimeApi, AuraId: AppKey>( pub fn aura_build_import_queue<RuntimeApi, AuraId: AppCrypto>(
client: Arc<ParachainClient<RuntimeApi>>, client: Arc<ParachainClient<RuntimeApi>>,
block_import: ParachainBlockImport<RuntimeApi>, block_import: ParachainBlockImport<RuntimeApi>,
config: &Configuration, config: &Configuration,
@@ -1059,9 +1059,9 @@ where
StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>, StateBackend = sc_client_api::StateBackendFor<ParachainBackend, Block>,
> + sp_offchain::OffchainWorkerApi<Block> > + sp_offchain::OffchainWorkerApi<Block>
+ sp_block_builder::BlockBuilder<Block> + sp_block_builder::BlockBuilder<Block>
+ sp_consensus_aura::AuraApi<Block, <<AuraId as AppKey>::Pair as Pair>::Public>, + sp_consensus_aura::AuraApi<Block, <<AuraId as AppCrypto>::Pair as Pair>::Public>,
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>, sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
<<AuraId as AppKey>::Pair as Pair>::Signature: <<AuraId as AppCrypto>::Pair as Pair>::Signature:
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec, TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
{ {
let client2 = client.clone(); let client2 = client.clone();
@@ -1069,25 +1069,26 @@ where
let aura_verifier = move || { let aura_verifier = move || {
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client2).unwrap(); let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client2).unwrap();
Box::new( Box::new(cumulus_client_consensus_aura::build_verifier::<
cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _, _>( <AuraId as AppCrypto>::Pair,
cumulus_client_consensus_aura::BuildVerifierParams { _,
client: client2.clone(), _,
create_inherent_data_providers: move |_, _| async move { _,
let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); >(cumulus_client_consensus_aura::BuildVerifierParams {
client: client2.clone(),
create_inherent_data_providers: move |_, _| async move {
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
let slot = let slot =
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*timestamp, *timestamp,
slot_duration, slot_duration,
); );
Ok((slot, timestamp)) Ok((slot, timestamp))
}, },
telemetry: telemetry_handle, telemetry: telemetry_handle,
}, })) as Box<_>
),
) as Box<_>
}; };
let relay_chain_verifier = let relay_chain_verifier =
@@ -1108,7 +1109,7 @@ where
/// Start an aura powered parachain node. /// Start an aura powered parachain node.
/// (collective-polkadot and statemine/t use this) /// (collective-polkadot and statemine/t use this)
pub async fn start_generic_aura_node<RuntimeApi, AuraId: AppKey>( pub async fn start_generic_aura_node<RuntimeApi, AuraId: AppCrypto>(
parachain_config: Configuration, parachain_config: Configuration,
polkadot_config: Configuration, polkadot_config: Configuration,
collator_options: CollatorOptions, collator_options: CollatorOptions,
@@ -1126,11 +1127,11 @@ where
> + sp_offchain::OffchainWorkerApi<Block> > + sp_offchain::OffchainWorkerApi<Block>
+ sp_block_builder::BlockBuilder<Block> + sp_block_builder::BlockBuilder<Block>
+ cumulus_primitives_core::CollectCollationInfo<Block> + cumulus_primitives_core::CollectCollationInfo<Block>
+ sp_consensus_aura::AuraApi<Block, <<AuraId as AppKey>::Pair as Pair>::Public> + sp_consensus_aura::AuraApi<Block, <<AuraId as AppCrypto>::Pair as Pair>::Public>
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance> + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>, + frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>, sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
<<AuraId as AppKey>::Pair as Pair>::Signature: <<AuraId as AppCrypto>::Pair as Pair>::Signature:
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec, TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
{ {
start_node_impl::<RuntimeApi, _, _, _>( start_node_impl::<RuntimeApi, _, _, _>(
@@ -1170,7 +1171,7 @@ where
telemetry2.clone(), telemetry2.clone(),
); );
AuraConsensus::build::<<AuraId as AppKey>::Pair, _, _, _, _, _, _>( AuraConsensus::build::<<AuraId as AppCrypto>::Pair, _, _, _, _, _, _>(
BuildAuraConsensusParams { BuildAuraConsensusParams {
proposer_factory, proposer_factory,
create_inherent_data_providers: create_inherent_data_providers: