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
16 changes: 16 additions & 0 deletions bin/millau/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,25 @@ parameter_types! {
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS as u32;
}

parameter_types! {
/// Maximal number of authorities at Rialto.
pub const MaxAuthoritiesAtRialto: u32 = bp_rialto::MAX_AUTHORITIES_COUNT;
/// Maximal size of SCALE-encoded Rialto header.
pub const MaxRialtoHeaderSize: u32 = bp_rialto::MAX_HEADER_SIZE;

/// Maximal number of authorities at Westend.
pub const MaxAuthoritiesAtWestend: u32 = bp_westend::MAX_AUTHORITIES_COUNT;
/// Maximal size of SCALE-encoded Westend header.
pub const MaxWestendHeaderSize: u32 = bp_westend::MAX_HEADER_SIZE;
}

pub type RialtoGrandpaInstance = ();
impl pallet_bridge_grandpa::Config for Runtime {
type BridgedChain = bp_rialto::Rialto;
type MaxRequests = MaxRequests;
type HeadersToKeep = HeadersToKeep;
type MaxBridgedAuthorities = MaxAuthoritiesAtRialto;
type MaxBridgedHeaderSize = MaxRialtoHeaderSize;

type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
}
Expand All @@ -440,6 +454,8 @@ impl pallet_bridge_grandpa::Config<WestendGrandpaInstance> for Runtime {
type BridgedChain = bp_westend::Westend;
type MaxRequests = MaxRequests;
type HeadersToKeep = HeadersToKeep;
type MaxBridgedAuthorities = MaxAuthoritiesAtWestend;
type MaxBridgedHeaderSize = MaxWestendHeaderSize;

type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
}
Expand Down
7 changes: 7 additions & 0 deletions bin/rialto-parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,20 @@ parameter_types! {
/// Assuming the worst case of every header being finalized, we will keep headers at least for a
/// week.
pub const HeadersToKeep: u32 = 7 * bp_millau::DAYS as u32;

/// Maximal number of authorities at Millau.
pub const MaxAuthoritiesAtMillau: u32 = bp_millau::MAX_AUTHORITIES_COUNT;
/// Maximal size of SCALE-encoded Millau header.
pub const MaxMillauHeaderSize: u32 = bp_millau::MAX_HEADER_SIZE;
}

pub type MillauGrandpaInstance = ();
impl pallet_bridge_grandpa::Config for Runtime {
type BridgedChain = bp_millau::Millau;
type MaxRequests = MaxRequests;
type HeadersToKeep = HeadersToKeep;
type MaxBridgedAuthorities = MaxAuthoritiesAtMillau;
type MaxBridgedHeaderSize = MaxMillauHeaderSize;
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
}

Expand Down
7 changes: 7 additions & 0 deletions bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,20 @@ parameter_types! {
/// Assuming the worst case of every header being finalized, we will keep headers at least for a
/// week.
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS as u32;

/// Maximal number of authorities at Millau.
pub const MaxAuthoritiesAtMillau: u32 = bp_millau::MAX_AUTHORITIES_COUNT;
/// Maximal size of SCALE-encoded Millau header.
pub const MaxMillauHeaderSize: u32 = bp_millau::MAX_HEADER_SIZE;
}

pub type MillauGrandpaInstance = ();
impl pallet_bridge_grandpa::Config for Runtime {
type BridgedChain = bp_millau::Millau;
type MaxRequests = MaxRequests;
type HeadersToKeep = HeadersToKeep;
type MaxBridgedAuthorities = MaxAuthoritiesAtMillau;
type MaxBridgedHeaderSize = MaxMillauHeaderSize;
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
}

Expand Down
Loading