Skip to content

Conversation

@yrong
Copy link
Contributor

@yrong yrong commented Sep 29, 2025

Description

In V1, the origin of AggregateMessageOrigin is the channel ID (i.e., AH). In V2, however, the origin is the actual sender’s location, preserved through AliasOrigin from the source chain.

A potential issue here is that there could be hundreds or even thousands of unique user origins, which might become a burden for the message queue.

Since the preserved origin is already included in the Message and will be forwarded to Ethereum, it doesn’t need to remain the origin when enqueued into the message queue.

Therefore, in this PR, we’re restricting the enqueued origin to the AH, the hub from which all bridge messages are dispatched.

Meanwhile, we should still respect the origin of governance messages dispatched from the BridgeHub system pallet, so that governance actions like Upgrades are not overshadowed by user messages.

The original ticket is here: https://linear.app/snowfork/issue/SNO-1549 I had forgotten about it — hopefully it’s not too late.

@yrong yrong changed the title Snowbridge: Use AH as the origin for V2 Snowbridge: Use AH as the enqueued origin for V2 Sep 29, 2025
@yrong
Copy link
Contributor Author

yrong commented Sep 29, 2025

A potential issue here is that there could be hundreds or even thousands of unique user origins, which might become a burden for the message queue.

@acatangiu Is this concern valid, or is it unnecessary? I’d appreciate some early feedback before moving forward.

By the way, there is actually no priority control in the MessageQueue, meaning we can’t guarantee that governance-origin messages (such as Gateway upgrades) are prioritized over user-origin messages (like transfers). IIUC, Messages are simply scheduled in a round-robin manner across multiple origins.

Therefore, aggregating all user messages to AssetHub helps ensure that governance actions aren’t overshadowed by user traffic. I believe this PR makes sense for this reason alone, and we should follow the same pattern used in V1.

@yrong yrong marked this pull request as ready for review September 30, 2025 01:54
@paritytech-review-bot paritytech-review-bot bot requested a review from a team September 30, 2025 01:54
Comment on lines +45 to +48
let mut origin = AggregateMessageOrigin::SnowbridgeV2(ticket.origin);
if !ticket.from_governance {
origin = AggregateMessageOrigin::SnowbridgeV2(asset_hub_agent_id);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aggregate non-governance messages (e.g., user transfers) originating from AssetHub.

@acatangiu
Copy link
Contributor

A potential issue here is that there could be hundreds or even thousands of unique user origins, which might become a burden for the message queue.

how is it a burden?

Aggregate non-governance messages (e.g., user transfers) originating from AssetHub.

which origin is governance in this case?

@yrong
Copy link
Contributor Author

yrong commented Oct 9, 2025

which origin is governance in this case?

It's the upgrade call from the system pallet on BridgeHub, with GovernanceOrigin configured as Here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants