Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .maintain/millau-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#![allow(clippy::all)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
Expand Down
41 changes: 41 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions bin/millau/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ bp-header-chain = { path = "../../../primitives/header-chain", default-features
bp-messages = { path = "../../../primitives/messages", default-features = false }
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
bp-polkadot-core = { path = "../../../primitives/polkadot-core", default-features = false }
bp-relayers = { path = "../../../primitives/relayers", default-features = false }
bp-rialto = { path = "../../../primitives/chain-rialto", default-features = false }
bp-rialto-parachain = { path = "../../../primitives/chain-rialto-parachain", default-features = false }
bp-runtime = { path = "../../../primitives/runtime", default-features = false }
Expand All @@ -28,6 +29,7 @@ bridge-runtime-common = { path = "../../runtime-common", default-features = fals
pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false }
pallet-bridge-messages = { path = "../../../modules/messages", default-features = false }
pallet-bridge-parachains = { path = "../../../modules/parachains", default-features = false }
pallet-bridge-relayers = { path = "../../../modules/relayers", default-features = false }
pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false }

# Substrate Dependencies
Expand Down Expand Up @@ -89,6 +91,7 @@ std = [
"bp-messages/std",
"bp-millau/std",
"bp-polkadot-core/std",
"bp-relayers/std",
"bp-rialto/std",
"bp-rialto-parachain/std",
"bp-runtime/std",
Expand All @@ -107,6 +110,7 @@ std = [
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-parachains/std",
"pallet-bridge-relayers/std",
"pallet-grandpa/std",
"pallet-mmr/std",
"pallet-randomness-collective-flip/std",
Expand Down Expand Up @@ -145,6 +149,7 @@ runtime-benchmarks = [
"libsecp256k1",
"pallet-bridge-messages/runtime-benchmarks",
"pallet-bridge-parachains/runtime-benchmarks",
"pallet-bridge-relayers/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down
24 changes: 22 additions & 2 deletions bin/millau/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,13 @@ parameter_types! {
pub const MaxRequests: u32 = 50;
}

impl pallet_bridge_relayers::Config for Runtime {
type Event = Event;
type Reward = Balance;
type PaymentProcedure = bp_relayers::MintReward<pallet_balances::Pallet<Runtime>, AccountId>;
type WeightInfo = ();
}

#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
/// Number of headers to keep in benchmarks.
Expand Down Expand Up @@ -463,7 +470,12 @@ impl pallet_bridge_messages::Config<WithRialtoMessagesInstance> for Runtime {

type TargetHeaderChain = crate::rialto_messages::Rialto;
type LaneMessageVerifier = crate::rialto_messages::ToRialtoMessageVerifier;
type MessageDeliveryAndDispatchPayment = ();
type MessageDeliveryAndDispatchPayment =
pallet_bridge_relayers::MessageDeliveryAndDispatchPaymentAdapter<
Runtime,
WithRialtoMessagesInstance,
GetDeliveryConfirmationTransactionFee,
>;
type OnMessageAccepted = ();
type OnDeliveryConfirmed = ();

Expand Down Expand Up @@ -494,7 +506,12 @@ impl pallet_bridge_messages::Config<WithRialtoParachainMessagesInstance> for Run

type TargetHeaderChain = crate::rialto_parachain_messages::RialtoParachain;
type LaneMessageVerifier = crate::rialto_parachain_messages::ToRialtoParachainMessageVerifier;
type MessageDeliveryAndDispatchPayment = ();
type MessageDeliveryAndDispatchPayment =
pallet_bridge_relayers::MessageDeliveryAndDispatchPaymentAdapter<
Runtime,
WithRialtoParachainMessagesInstance,
GetDeliveryConfirmationTransactionFee,
>;
type OnMessageAccepted = ();
type OnDeliveryConfirmed = ();

Expand Down Expand Up @@ -558,6 +575,7 @@ construct_runtime!(
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage},

// Rialto bridge modules.
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>},
BridgeRialtoGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage},
BridgeRialtoMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},

Expand Down Expand Up @@ -937,6 +955,7 @@ impl_runtime_apis! {
list_benchmark!(list, extra, pallet_bridge_messages, MessagesBench::<Runtime, WithRialtoMessagesInstance>);
list_benchmark!(list, extra, pallet_bridge_grandpa, BridgeRialtoGrandpa);
list_benchmark!(list, extra, pallet_bridge_parachains, ParachainsBench::<Runtime, WithRialtoMessagesInstance>);
list_benchmark!(list, extra, pallet_bridge_relayers, BridgeRelayers);

let storage_info = AllPalletsWithSystem::storage_info();

Expand Down Expand Up @@ -1058,6 +1077,7 @@ impl_runtime_apis! {
pallet_bridge_parachains,
ParachainsBench::<Runtime, WithRialtoParachainsInstance>
);
add_benchmark!(params, batches, pallet_bridge_relayers, BridgeRelayers);

Ok(batches)
}
Expand Down
4 changes: 4 additions & 0 deletions bin/rialto-parachain/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ serde = { version = '1.0', optional = true, features = ['derive'] }

bp-messages = { path = "../../../primitives/messages", default-features = false }
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
bp-relayers = { path = "../../../primitives/relayers", default-features = false }
bp-runtime = { path = "../../../primitives/runtime", default-features = false }
bp-rialto-parachain = { path = "../../../primitives/chain-rialto-parachain", default-features = false }
bridge-runtime-common = { path = "../../runtime-common", 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 }

# Substrate Dependencies
## Substrate Primitive Dependencies
Expand Down Expand Up @@ -89,6 +91,7 @@ runtime-benchmarks = [
std = [
"bp-messages/std",
"bp-millau/std",
"bp-relayers/std",
"bp-runtime/std",
"bp-rialto-parachain/std",
"bridge-runtime-common/std",
Expand All @@ -113,6 +116,7 @@ std = [
"pallet-balances/std",
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-relayers/std",
"pallet-randomness-collective-flip/std",
"pallet-timestamp/std",
"pallet-sudo/std",
Expand Down
15 changes: 14 additions & 1 deletion bin/rialto-parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,13 @@ impl pallet_aura::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}

impl pallet_bridge_relayers::Config for Runtime {
type Event = Event;
type Reward = Balance;
type PaymentProcedure = bp_relayers::MintReward<pallet_balances::Pallet<Runtime>, AccountId>;
type WeightInfo = ();
}

parameter_types! {
/// This is a pretty unscientific cap.
///
Expand Down Expand Up @@ -530,7 +537,12 @@ impl pallet_bridge_messages::Config<WithMillauMessagesInstance> for Runtime {

type TargetHeaderChain = crate::millau_messages::Millau;
type LaneMessageVerifier = crate::millau_messages::ToMillauMessageVerifier;
type MessageDeliveryAndDispatchPayment = ();
type MessageDeliveryAndDispatchPayment =
pallet_bridge_relayers::MessageDeliveryAndDispatchPaymentAdapter<
Runtime,
WithMillauMessagesInstance,
GetDeliveryConfirmationTransactionFee,
>;
type OnMessageAccepted = ();
type OnDeliveryConfirmed = ();

Expand Down Expand Up @@ -567,6 +579,7 @@ construct_runtime!(
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,

// Millau bridge modules.
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>},
BridgeMillauGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage},
BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},
}
Expand Down
4 changes: 4 additions & 0 deletions bin/rialto/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ serde = { version = "1.0", optional = true, features = ["derive"] }
bp-header-chain = { path = "../../../primitives/header-chain", default-features = false }
bp-messages = { path = "../../../primitives/messages", default-features = false }
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
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-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 }
pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false }

# Substrate Dependencies
Expand Down Expand Up @@ -89,6 +91,7 @@ std = [
"bp-header-chain/std",
"bp-messages/std",
"bp-millau/std",
"bp-relayers/std",
"bp-rialto/std",
"bp-runtime/std",
"bridge-runtime-common/std",
Expand All @@ -106,6 +109,7 @@ std = [
"pallet-beefy-mmr/std",
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-relayers/std",
"pallet-grandpa/std",
"pallet-mmr/std",
"pallet-xcm/std",
Expand Down
15 changes: 14 additions & 1 deletion bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ impl pallet_authority_discovery::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}

impl pallet_bridge_relayers::Config for Runtime {
type Event = Event;
type Reward = Balance;
type PaymentProcedure = bp_relayers::MintReward<pallet_balances::Pallet<Runtime>, AccountId>;
type WeightInfo = ();
}

parameter_types! {
/// This is a pretty unscientific cap.
///
Expand Down Expand Up @@ -447,7 +454,12 @@ impl pallet_bridge_messages::Config<WithMillauMessagesInstance> for Runtime {

type TargetHeaderChain = crate::millau_messages::Millau;
type LaneMessageVerifier = crate::millau_messages::ToMillauMessageVerifier;
type MessageDeliveryAndDispatchPayment = ();
type MessageDeliveryAndDispatchPayment =
pallet_bridge_relayers::MessageDeliveryAndDispatchPaymentAdapter<
Runtime,
WithMillauMessagesInstance,
GetDeliveryConfirmationTransactionFee,
>;
type OnMessageAccepted = ();
type OnDeliveryConfirmed = ();

Expand Down Expand Up @@ -484,6 +496,7 @@ construct_runtime!(
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage},

// Millau bridge modules.
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>},
BridgeMillauGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage},
BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},

Expand Down
1 change: 1 addition & 0 deletions modules/grandpa/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#![allow(clippy::all)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{
traits::Get,
Expand Down
Loading