mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 09:45:41 +00:00
Bump BEEFY (#3302)
This commit is contained in:
@@ -36,7 +36,7 @@ mod mock;
|
||||
#[cfg(test)]
|
||||
mod integration_tests;
|
||||
|
||||
use beefy_primitives::ecdsa::AuthorityId as BeefyId;
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use primitives::v1::{AccountId, AssignmentId, BlockNumber, ValidatorId};
|
||||
use sp_runtime::{Perquintill, Perbill, FixedPointNumber};
|
||||
use frame_system::limits;
|
||||
|
||||
@@ -37,7 +37,7 @@ impl<T> pallet_mmr::primitives::OnNewRoot<beefy_primitives::MmrRootHash> for Dep
|
||||
let digest = sp_runtime::generic::DigestItem::Consensus(
|
||||
beefy_primitives::BEEFY_ENGINE_ID,
|
||||
parity_scale_codec::Encode::encode(
|
||||
&beefy_primitives::ConsensusLog::<<T as pallet_beefy::Config>::AuthorityId>::MmrRoot(*root)
|
||||
&beefy_primitives::ConsensusLog::<<T as pallet_beefy::Config>::BeefyId>::MmrRoot(*root)
|
||||
),
|
||||
);
|
||||
<frame_system::Pallet<T>>::deposit_log(digest);
|
||||
@@ -46,8 +46,8 @@ impl<T> pallet_mmr::primitives::OnNewRoot<beefy_primitives::MmrRootHash> for Dep
|
||||
|
||||
/// Convert BEEFY secp256k1 public keys into uncompressed form
|
||||
pub struct UncompressBeefyEcdsaKeys;
|
||||
impl Convert<beefy_primitives::ecdsa::AuthorityId, Vec<u8>> for UncompressBeefyEcdsaKeys {
|
||||
fn convert(a: beefy_primitives::ecdsa::AuthorityId) -> Vec<u8> {
|
||||
impl Convert<beefy_primitives::crypto::AuthorityId, Vec<u8>> for UncompressBeefyEcdsaKeys {
|
||||
fn convert(a: beefy_primitives::crypto::AuthorityId) -> Vec<u8> {
|
||||
use sp_core::crypto::Public;
|
||||
let compressed_key = a.as_slice();
|
||||
// TODO [ToDr] Temporary workaround until we have a better way to get uncompressed keys.
|
||||
@@ -137,7 +137,7 @@ pub mod pallet {
|
||||
/// For instance for ECDSA (secp256k1) we want to store uncompressed public keys (65 bytes)
|
||||
/// to simplify using them on Ethereum chain, but the rest of the Substrate codebase
|
||||
/// is storing them compressed (33 bytes) for efficiency reasons.
|
||||
type BeefyAuthorityToMerkleLeaf: Convert<<Self as pallet_beefy::Config>::AuthorityId, Vec<u8>>;
|
||||
type BeefyAuthorityToMerkleLeaf: Convert<<Self as pallet_beefy::Config>::BeefyId, Vec<u8>>;
|
||||
|
||||
/// Retrieve a list of current parachain heads.
|
||||
///
|
||||
@@ -179,7 +179,7 @@ impl<T: Config> LeafDataProvider for Pallet<T> where
|
||||
|
||||
impl<T: Config> Pallet<T> where
|
||||
MerkleRootOf<T>: From<H256>,
|
||||
<T as pallet_beefy::Config>::AuthorityId:
|
||||
<T as pallet_beefy::Config>::BeefyId:
|
||||
{
|
||||
/// Returns latest root hash of a merkle tree constructed from all registered parachain headers.
|
||||
///
|
||||
|
||||
@@ -91,7 +91,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||
use pallet_session::historical as session_historical;
|
||||
use static_assertions::const_assert;
|
||||
use beefy_primitives::ecdsa::AuthorityId as BeefyId;
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use pallet_mmr_primitives as mmr;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -1664,7 +1664,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
|
||||
impl beefy_primitives::BeefyApi<Block> for Runtime {
|
||||
fn validator_set() -> beefy_primitives::ValidatorSet<BeefyId> {
|
||||
// dummy implementation due to lack of BEEFY pallet.
|
||||
beefy_primitives::ValidatorSet { validators: Vec::new(), id: 0 }
|
||||
|
||||
@@ -67,7 +67,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||
use pallet_session::historical as session_historical;
|
||||
use static_assertions::const_assert;
|
||||
use beefy_primitives::ecdsa::AuthorityId as BeefyId;
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use pallet_mmr_primitives as mmr;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -1241,7 +1241,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
|
||||
impl beefy_primitives::BeefyApi<Block> for Runtime {
|
||||
fn validator_set() -> beefy_primitives::ValidatorSet<BeefyId> {
|
||||
// dummy implementation due to lack of BEEFY pallet.
|
||||
beefy_primitives::ValidatorSet { validators: Vec::new(), id: 0 }
|
||||
|
||||
@@ -64,7 +64,7 @@ use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
||||
use sp_core::{OpaqueMetadata, RuntimeDebug};
|
||||
use sp_staking::SessionIndex;
|
||||
use pallet_session::historical as session_historical;
|
||||
use beefy_primitives::ecdsa::AuthorityId as BeefyId;
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use pallet_mmr_primitives as mmr;
|
||||
use frame_system::EnsureRoot;
|
||||
use runtime_common::{paras_sudo_wrapper, paras_registrar, xcm_sender, auctions, crowdloan, slots};
|
||||
@@ -812,7 +812,7 @@ impl paras_registrar::Config for Runtime {
|
||||
pub struct ParentHashRandomness;
|
||||
|
||||
impl pallet_beefy::Config for Runtime {
|
||||
type AuthorityId = BeefyId;
|
||||
type BeefyId = BeefyId;
|
||||
}
|
||||
|
||||
impl pallet_mmr::Config for Runtime {
|
||||
@@ -1244,7 +1244,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
|
||||
impl beefy_primitives::BeefyApi<Block> for Runtime {
|
||||
fn validator_set() -> beefy_primitives::ValidatorSet<BeefyId> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||
use pallet_session::historical as session_historical;
|
||||
use polkadot_runtime_parachains::reward_points::RewardValidatorsWithEraPoints;
|
||||
use beefy_primitives::ecdsa::AuthorityId as BeefyId;
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use pallet_mmr_primitives as mmr;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -704,7 +704,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
|
||||
impl beefy_primitives::BeefyApi<Block> for Runtime {
|
||||
fn validator_set() -> beefy_primitives::ValidatorSet<BeefyId> {
|
||||
// dummy implementation due to lack of BEEFY pallet.
|
||||
beefy_primitives::ValidatorSet { validators: Vec::new(), id: 0 }
|
||||
|
||||
@@ -90,7 +90,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||
use pallet_session::historical as session_historical;
|
||||
use frame_system::{EnsureRoot};
|
||||
use beefy_primitives::ecdsa::AuthorityId as BeefyId;
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use pallet_mmr_primitives as mmr;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -1248,7 +1248,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
|
||||
impl beefy_primitives::BeefyApi<Block> for Runtime {
|
||||
fn validator_set() -> beefy_primitives::ValidatorSet<BeefyId> {
|
||||
// dummy implementation due to lack of BEEFY pallet.
|
||||
beefy_primitives::ValidatorSet { validators: Vec::new(), id: 0 }
|
||||
|
||||
Reference in New Issue
Block a user