mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 21:51:06 +00:00
Companion for aura CompatibilityMode (#1803)
* Companion for aura CompatibilityMode
As no parachain was launched with the broken authority set change handling we don't need to expose
the compatibility mode.
* FMT
* update lockfile for {"substrate", "polkadot"}
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+253
-253
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ use codec::Codec;
|
|||||||
use cumulus_client_consensus_common::ParachainBlockImport;
|
use cumulus_client_consensus_common::ParachainBlockImport;
|
||||||
use sc_client_api::{backend::AuxStore, BlockOf, UsageProvider};
|
use sc_client_api::{backend::AuxStore, BlockOf, UsageProvider};
|
||||||
use sc_consensus::{import_queue::DefaultImportQueue, BlockImport};
|
use sc_consensus::{import_queue::DefaultImportQueue, BlockImport};
|
||||||
use sc_consensus_aura::AuraVerifier;
|
use sc_consensus_aura::{AuraVerifier, CompatibilityMode};
|
||||||
use sc_consensus_slots::InherentDataProviderExt;
|
use sc_consensus_slots::InherentDataProviderExt;
|
||||||
use sc_telemetry::TelemetryHandle;
|
use sc_telemetry::TelemetryHandle;
|
||||||
use sp_api::{ApiExt, ProvideRuntimeApi};
|
use sp_api::{ApiExt, ProvideRuntimeApi};
|
||||||
@@ -92,6 +92,7 @@ where
|
|||||||
registry,
|
registry,
|
||||||
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
||||||
telemetry,
|
telemetry,
|
||||||
|
compatibility_mode: CompatibilityMode::None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,16 +107,17 @@ pub struct BuildVerifierParams<C, CIDP> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Build the [`AuraVerifier`].
|
/// Build the [`AuraVerifier`].
|
||||||
pub fn build_verifier<P, C, CIDP>(
|
pub fn build_verifier<P, C, CIDP, N>(
|
||||||
BuildVerifierParams { client, create_inherent_data_providers, telemetry }: BuildVerifierParams<
|
BuildVerifierParams { client, create_inherent_data_providers, telemetry }: BuildVerifierParams<
|
||||||
C,
|
C,
|
||||||
CIDP,
|
CIDP,
|
||||||
>,
|
>,
|
||||||
) -> AuraVerifier<C, P, CIDP> {
|
) -> AuraVerifier<C, P, CIDP, N> {
|
||||||
sc_consensus_aura::build_verifier(sc_consensus_aura::BuildVerifierParams {
|
sc_consensus_aura::build_verifier(sc_consensus_aura::BuildVerifierParams {
|
||||||
client,
|
client,
|
||||||
create_inherent_data_providers,
|
create_inherent_data_providers,
|
||||||
telemetry,
|
telemetry,
|
||||||
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
||||||
|
compatibility_mode: CompatibilityMode::None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ where
|
|||||||
telemetry,
|
telemetry,
|
||||||
block_proposal_slot_portion,
|
block_proposal_slot_portion,
|
||||||
max_block_proposal_slot_portion,
|
max_block_proposal_slot_portion,
|
||||||
|
compatibility_mode: sc_consensus_aura::CompatibilityMode::None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1029,23 +1029,25 @@ 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(cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _>(
|
Box::new(
|
||||||
cumulus_client_consensus_aura::BuildVerifierParams {
|
cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _, _>(
|
||||||
client: client2.clone(),
|
cumulus_client_consensus_aura::BuildVerifierParams {
|
||||||
create_inherent_data_providers: move |_, _| async move {
|
client: client2.clone(),
|
||||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
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 =
|
||||||
|
|||||||
Reference in New Issue
Block a user