Skip to content

Commit

Permalink
Adjust fresh weights and consts
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jan 5, 2025
1 parent ecad255 commit cddfbd3
Show file tree
Hide file tree
Showing 10 changed files with 437 additions and 419 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ impl ChainWithMessages for BridgeHubKusama {
WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME;
const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce =
MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce =
MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
/// This constant limits the maximum number of messages in `receive_messages_proof`.
/// We need to adjust it from 4096 to 2024 due to the actual weights identified by `check_message_lane_weights`.
/// A higher value can be set once we switch `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`.
const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 2024;
}

/// Public key of the chain account that may be used to verify signatures.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,15 @@ mod tests {

#[test]
fn ensure_bridge_hub_kusama_message_lane_weights_are_correct() {
use bp_messages::ChainWithMessages;
check_message_lane_weights::<
bp_bridge_hub_kusama::BridgeHubKusama,
Runtime,
WithBridgeHubPolkadotMessagesInstance,
>(
bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE,
bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
bp_bridge_hub_kusama::BridgeHubKusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_bridge_hub_kusama::BridgeHubKusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
true,
);
}
Expand Down

Large diffs are not rendered by default.

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

Loading

0 comments on commit cddfbd3

Please sign in to comment.