mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 09:21:02 +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.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user