Bump substrate/polkadot/cumulus (#1962)

* Bump substrate/polkadot/cumulus

* sp_finality_grandpa - >sp_consensus_grandpa

* sp_beefy -> sp_consensus_beefy

* pallet_randomness_collective_flip -> pallet_insecure_randomness_collective_flip

* fix

* Cumulus parachain stuff

* Cumulus parachain stuff one more

* Millau/Rialto runtimes

* Removed pallet_insecure_randomness_collective_flip

* Millau node

* Removed session historial

* TMP: just try disable all fetches

* Docs in gitlab.yml
This commit is contained in:
Branislav Kontur
2023-03-14 13:03:40 +01:00
committed by Bastian Köcher
parent a1c6502d9a
commit 874ab44e00
38 changed files with 184 additions and 157 deletions
+33 -28
View File
@@ -39,8 +39,8 @@ use pallet_grandpa::{
use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
use sp_api::impl_runtime_apis;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet};
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_consensus_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet};
use sp_core::OpaqueMetadata;
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{AccountIdLookup, Block as BlockT, Keccak256, NumberFor, OpaqueKeys},
@@ -225,56 +225,47 @@ parameter_types! {
impl pallet_babe::Config for Runtime {
type EpochDuration = EpochDuration;
type ExpectedBlockTime = ExpectedBlockTime;
type MaxAuthorities = ConstU32<10>;
// session module is the trigger
type EpochChangeTrigger = pallet_babe::ExternalTrigger;
// equivocation related configuration - we don't expect any equivocations in our testnets
type KeyOwnerProofSystem = ();
type KeyOwnerProof = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
pallet_babe::AuthorityId,
)>>::Proof;
type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
pallet_babe::AuthorityId,
)>>::IdentificationTuple;
type HandleEquivocation = ();
type DisabledValidators = ();
type WeightInfo = ();
type MaxAuthorities = ConstU32<10>;
// equivocation related configuration - we don't expect any equivocations in our testnets
type KeyOwnerProof = sp_core::Void;
type EquivocationReportSystem = ();
}
impl pallet_beefy::Config for Runtime {
type BeefyId = BeefyId;
type MaxAuthorities = ConstU32<10>;
type MaxSetIdSessionEntries = ConstU64<0>;
type OnNewValidatorSet = MmrLeaf;
type WeightInfo = ();
type KeyOwnerProof = sp_core::Void;
type EquivocationReportSystem = ();
}
impl pallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type MaxAuthorities = ConstU32<10>;
type KeyOwnerProofSystem = ();
type KeyOwnerProof =
<Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
GrandpaId,
)>>::IdentificationTuple;
type HandleEquivocation = ();
// TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78)
type WeightInfo = ();
type MaxAuthorities = ConstU32<10>;
type MaxSetIdSessionEntries = ConstU64<0>;
type KeyOwnerProof = sp_core::Void;
type EquivocationReportSystem = ();
}
impl pallet_mmr::Config for Runtime {
const INDEXING_PREFIX: &'static [u8] = b"mmr";
type Hashing = Keccak256;
type Hash = <Keccak256 as sp_runtime::traits::Hash>::Output;
type LeafData = pallet_beefy_mmr::Pallet<Runtime>;
type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest<Runtime>;
type WeightInfo = ();
type LeafData = pallet_beefy_mmr::Pallet<Runtime>;
}
parameter_types! {
@@ -296,7 +287,7 @@ parameter_types! {
pub struct BeefyDummyDataProvider;
impl sp_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider {
impl sp_consensus_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider {
fn extra_data() {}
}
@@ -616,7 +607,7 @@ impl_runtime_apis! {
}
}
impl sp_beefy::BeefyApi<Block> for Runtime {
impl sp_consensus_beefy::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
Beefy::genesis_block()
}
@@ -624,6 +615,20 @@ impl_runtime_apis! {
fn validator_set() -> Option<ValidatorSet<BeefyId>> {
Beefy::validator_set()
}
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: sp_consensus_beefy::EquivocationProof<
NumberFor<Block>,
sp_consensus_beefy::crypto::AuthorityId,
sp_consensus_beefy::crypto::Signature
>,
_key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
) -> Option<()> { None }
fn generate_key_ownership_proof(
_set_id: sp_consensus_beefy::ValidatorSetId,
_authority_id: sp_consensus_beefy::crypto::AuthorityId,
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> { None }
}
impl pallet_mmr::primitives::MmrApi<