Trait pallet_beefy_mmr::pallet::Config
source · pub trait Config: Config + Config {
type LeafVersion: Get<MmrLeafVersion>;
type BeefyAuthorityToMerkleLeaf: Convert<<Self as Config>::BeefyId, Vec<u8>>;
type LeafExtra: Member + FullCodec;
type BeefyDataProvider: BeefyDataProvider<Self::LeafExtra>;
type WeightInfo: WeightInfo;
}
Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait. The module’s configuration trait.
Required Associated Types§
sourcetype LeafVersion: Get<MmrLeafVersion>
type LeafVersion: Get<MmrLeafVersion>
Current leaf version.
Specifies the version number added to every leaf that get’s appended to the MMR.
Read more in [MmrLeafVersion
] docs about versioning leaves.
sourcetype BeefyAuthorityToMerkleLeaf: Convert<<Self as Config>::BeefyId, Vec<u8>>
type BeefyAuthorityToMerkleLeaf: Convert<<Self as Config>::BeefyId, Vec<u8>>
Convert BEEFY AuthorityId to a form that would end up in the Merkle Tree.
For instance for ECDSA (secp256k1) we want to store uncompressed public keys (65 bytes) and later to Ethereum Addresses (160 bits) to simplify using them on Ethereum chain, but the rest of the Substrate codebase is storing them compressed (33 bytes) for efficiency reasons.
sourcetype BeefyDataProvider: BeefyDataProvider<Self::LeafExtra>
type BeefyDataProvider: BeefyDataProvider<Self::LeafExtra>
Retrieve arbitrary data that should be added to the mmr leaf