Add BEEFY finality pallet with basic functionality (#1606)

* pallet-bridge-beefy: initial commit
This commit is contained in:
Serban Iorga
2022-11-21 18:52:24 +02:00
committed by Bastian Köcher
parent b3ab4a1b6a
commit 1f9110a065
11 changed files with 1813 additions and 0 deletions
+2
View File
@@ -19,6 +19,7 @@ bp-relayers = { path = "../../../primitives/relayers", default-features = false
bp-rialto = { path = "../../../primitives/chain-rialto", default-features = false }
bp-runtime = { path = "../../../primitives/runtime", default-features = false }
bridge-runtime-common = { path = "../../runtime-common", default-features = false }
pallet-bridge-beefy = { path = "../../../modules/beefy", default-features = false }
pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false }
pallet-bridge-messages = { path = "../../../modules/messages", default-features = false }
pallet-bridge-relayers = { path = "../../../modules/relayers", default-features = false }
@@ -98,6 +99,7 @@ std = [
"pallet-balances/std",
"pallet-beefy/std",
"pallet-beefy-mmr/std",
"pallet-bridge-beefy/std",
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-relayers/std",
+11
View File
@@ -68,6 +68,7 @@ pub use frame_support::{
pub use frame_system::Call as SystemCall;
pub use pallet_balances::Call as BalancesCall;
pub use pallet_bridge_beefy::Call as BridgeBeefyCall;
pub use pallet_bridge_grandpa::Call as BridgeGrandpaCall;
pub use pallet_bridge_messages::Call as MessagesCall;
pub use pallet_sudo::Call as SudoCall;
@@ -474,6 +475,13 @@ impl pallet_bridge_messages::Config<WithMillauMessagesInstance> for Runtime {
type BridgedChainId = BridgedChainId;
}
pub type MillauBeefyInstance = ();
impl pallet_bridge_beefy::Config<MillauBeefyInstance> for Runtime {
type MaxRequests = frame_support::traits::ConstU32<16>;
type CommitmentsToKeep = frame_support::traits::ConstU32<8>;
type BridgedChain = bp_millau::Millau;
}
construct_runtime!(
pub enum Runtime where
Block = Block,
@@ -506,6 +514,9 @@ construct_runtime!(
BridgeMillauGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage},
BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},
// Millau bridge modules (BEEFY based).
BridgeMillauBeefy: pallet_bridge_beefy::{Pallet, Call, Storage},
// Parachain modules.
ParachainsOrigin: polkadot_runtime_parachains::origin::{Pallet, Origin},
Configuration: polkadot_runtime_parachains::configuration::{Pallet, Call, Storage, Config<T>},