mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 06:21:02 +00:00
Add BEEFY finality pallet with basic functionality (#1606)
* pallet-bridge-beefy: initial commit
This commit is contained in:
committed by
Bastian Köcher
parent
b3ab4a1b6a
commit
1f9110a065
@@ -20,6 +20,7 @@
|
||||
|
||||
mod millau_hash;
|
||||
|
||||
use bp_beefy::ChainWithBeefy;
|
||||
use bp_messages::{
|
||||
InboundMessageDetails, LaneId, MessageNonce, MessagePayload, OutboundMessageDetails,
|
||||
};
|
||||
@@ -41,6 +42,7 @@ use sp_trie::{LayoutV0, LayoutV1, TrieConfiguration};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sp_runtime::traits::Keccak256;
|
||||
|
||||
pub use millau_hash::MillauHash;
|
||||
|
||||
@@ -155,6 +157,16 @@ impl Chain for Millau {
|
||||
}
|
||||
}
|
||||
|
||||
impl ChainWithBeefy for Millau {
|
||||
type CommitmentHasher = Keccak256;
|
||||
type MmrHashing = Keccak256;
|
||||
type MmrHash = <Keccak256 as sp_runtime::traits::Hash>::Output;
|
||||
type BeefyMmrLeafExtra = ();
|
||||
type AuthorityId = bp_beefy::EcdsaValidatorId;
|
||||
type Signature = bp_beefy::EcdsaValidatorSignature;
|
||||
type AuthorityIdToMerkleLeaf = bp_beefy::BeefyEcdsaToEthereum;
|
||||
}
|
||||
|
||||
/// Millau Hasher (Blake2-256 ++ Keccak-256) implementation.
|
||||
#[derive(PartialEq, Eq, Clone, Copy, RuntimeDebug, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
|
||||
Reference in New Issue
Block a user