Bump BEEFY (#3302)

This commit is contained in:
Andreas Doerr
2021-06-19 17:46:06 +02:00
committed by GitHub
parent 039df45f00
commit be2d1ce01b
12 changed files with 31 additions and 34 deletions
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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.
///
+2 -2
View File
@@ -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 }
+2 -2
View File
@@ -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 }
+3 -3
View File
@@ -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()
}
+2 -2
View File
@@ -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 }
+2 -2
View File
@@ -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 }