Skip to content

Commit

Permalink
Add fallback_max_weight to snowbridge Transact (#6792)
Browse files Browse the repository at this point in the history
We removed the `require_weight_at_most` field and later changed it to
`fallback_max_weight`.
This was to have a fallback when sending a message to v4 chains, which
happens in the small time window when chains are upgrading.
We originally put no fallback for a message in snowbridge's inbound
queue but we should have one.
This PR adds it.

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
2 people authored and Ank4n committed Dec 15, 2024
1 parent a783e82 commit 8cfc536
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bridges/snowbridge/pallets/inbound-queue/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ fn test_submit_happy_path() {
.into(),
nonce: 1,
message_id: [
86, 101, 80, 125, 84, 10, 227, 145, 230, 209, 152, 38, 206, 251, 206, 208, 244,
221, 22, 215, 1, 252, 79, 181, 99, 207, 166, 220, 98, 3, 81, 7,
118, 166, 139, 182, 84, 52, 165, 189, 54, 14, 178, 73, 2, 228, 192, 97, 153, 201,
4, 75, 151, 15, 82, 6, 164, 187, 162, 133, 26, 183, 186, 126,
],
fee_burned: 110000000000,
}
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/primitives/router/src/inbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ where
// Call create_asset on foreign assets pallet.
Transact {
origin_kind: OriginKind::Xcm,
fallback_max_weight: None,
fallback_max_weight: Some(Weight::from_parts(400_000_000, 8_000)),
call: (
create_call_index,
asset_id,
Expand Down
11 changes: 11 additions & 0 deletions prdoc/pr_6792.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: Add fallback_max_weight to snowbridge Transact
doc:
- audience: Runtime Dev
description: |-
We removed the `require_weight_at_most` field and later changed it to `fallback_max_weight`.
This was to have a fallback when sending a message to v4 chains, which happens in the small time window when chains are upgrading.
We originally put no fallback for a message in snowbridge's inbound queue but we should have one.
This PR adds it.
crates:
- name: snowbridge-router-primitives
bump: patch

0 comments on commit 8cfc536

Please sign in to comment.