-
Notifications
You must be signed in to change notification settings - Fork 1k
Snowbridge: Use AH as the enqueued origin for V2 #9867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@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. |
| let mut origin = AggregateMessageOrigin::SnowbridgeV2(ticket.origin); | ||
| if !ticket.from_governance { | ||
| origin = AggregateMessageOrigin::SnowbridgeV2(asset_hub_agent_id); | ||
| } |
There was a problem hiding this comment.
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.
how is it a burden?
which origin is governance in this case? |
It's the upgrade call from the system pallet on BridgeHub, with |
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.