Skip to content

Snowbridge V2: Add generic AggregateMessageOrigin#8106

Merged
bkontur merged 73 commits into
paritytech:masterfrom
dimartiro:generic-aggregate_message_origin
Oct 27, 2025
Merged

Snowbridge V2: Add generic AggregateMessageOrigin#8106
bkontur merged 73 commits into
paritytech:masterfrom
dimartiro:generic-aggregate_message_origin

Conversation

@dimartiro
Copy link
Copy Markdown
Contributor

@dimartiro dimartiro commented Mar 31, 2025

Description

This PR introduces a generic AggregateMessageOrigin in Snowbridge V2 to provide a more flexible mechanism for message-queue origin recognition and handling. This approach aims to support broader use cases beyond parachains. By enabling custom origins, scenarios like solo chains, can build specialized message routing and processing making use of this configuration.

Motivation

  • Enhanced Integration: While Snowbridge traditionally focuses on bridging parachains, there is also a need to send messages from various substrate-based chains (e.g., solo chains) and in different contexts. This change expands the protocol's ability to handle multiple, distinct origin types.

  • Custom Command Structures: Some projects need to incorporate custom Snowbridge commands or message structures, which cannot be processed by the default outbound queue. By introducing a more generic origin, these commands can be cleanly differentiated and securely processed.

  • Flexibility: Parachains, solo chains, or any environment running Snowbridge benefit from a uniform pattern to handle both common and custom message processing.

Use Case

Consider a scenario where you need to send messages to Ethereum directly from your runtime:

  • You have your own set of commands or data structures different from those provided by the traditional Snowbridge outbound queue.
  • You want to introduce a custom message processor that specifically handles your commands.
  • You need a distinct origin to differentiate your messages from standard Snowbridge traffic.

By using the AggregateMessageOrigin, you can verify whether a message comes from a parachain, from Snowbridge itself, or from a custom origin. This is especially relevant in solo chain contexts, where you might not rely on the parachain assumptions but still want to leverage a robust bridging framework.

@dimartiro dimartiro changed the title Add generic AggregateMessageOrigin for snowbridgeV2 Snowbridge V2: Add generic AggregateMessageOrigin Apr 1, 2025
@dimartiro dimartiro marked this pull request as ready for review April 1, 2025 14:20
@paritytech-review-bot paritytech-review-bot Bot requested a review from a team April 1, 2025 14:22
@dimartiro dimartiro force-pushed the generic-aggregate_message_origin branch from ba065d2 to 01702b9 Compare April 1, 2025 14:22
@dimartiro
Copy link
Copy Markdown
Contributor Author

@claravanstaden if you get a chance, could you please review this? I think it’ll really help support more generic use cases

Copy link
Copy Markdown
Contributor

@claravanstaden claravanstaden left a comment

Choose a reason for hiding this comment

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

Looks great! :) Few nits around naming and fmt, but otherwise good to go.

Comment thread cumulus/xcm/xcm-emulator/src/lib.rs Outdated
Comment thread cumulus/xcm/xcm-emulator/src/lib.rs Outdated
Comment thread cumulus/xcm/xcm-emulator/src/lib.rs Outdated
Comment thread bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs Outdated
Comment thread bridges/snowbridge/pallets/outbound-queue-v2/src/process_message_impl.rs Outdated
Comment thread cumulus/xcm/xcm-emulator/src/lib.rs Outdated
@dimartiro dimartiro requested a review from claravanstaden April 3, 2025 13:05
@dimartiro dimartiro force-pushed the generic-aggregate_message_origin branch from 888caf9 to 495c743 Compare April 3, 2025 13:20
Comment thread polkadot/runtime/parachains/src/inclusion/mod.rs Outdated
@dimartiro dimartiro force-pushed the generic-aggregate_message_origin branch from 495c743 to 750d728 Compare April 5, 2025 00:10
@paritytech-review-bot paritytech-review-bot Bot requested a review from a team April 5, 2025 00:11
@dimartiro dimartiro force-pushed the generic-aggregate_message_origin branch from 750d728 to 21eb9b5 Compare April 7, 2025 12:54
@dimartiro dimartiro requested a review from bkontur April 7, 2025 12:54
@dimartiro
Copy link
Copy Markdown
Contributor Author

@bkontur @claravanstaden Thank you for your initial review. I was wondering if there's anything else I can do on my end to help move this PR forward?

@dimartiro dimartiro force-pushed the generic-aggregate_message_origin branch from 21eb9b5 to b102d1b Compare April 30, 2025 16:16
@raymondkfcheung raymondkfcheung added the T15-bridges This PR/Issue is related to bridges. label May 6, 2025
@dimartiro dimartiro requested a review from a team as a code owner May 27, 2025 02:09
@dimartiro dimartiro requested a review from bkontur October 27, 2025 13:06
Comment thread prdoc/pr_8106.prdoc
@bkontur bkontur enabled auto-merge October 27, 2025 13:18
Comment thread prdoc/pr_8106.prdoc Outdated
@bkontur bkontur added this pull request to the merge queue Oct 27, 2025
Merged via the queue into paritytech:master with commit 51cf7d6 Oct 27, 2025
211 of 212 checks passed
girazoki pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Nov 3, 2025
girazoki pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Nov 10, 2025
girazoki pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Nov 12, 2025
sistemd added a commit that referenced this pull request Nov 24, 2025
# Description

This PR introduces a generic `AggregateMessageOrigin` in Snowbridge V2
to provide a more flexible mechanism for message-queue origin
recognition and handling. This approach aims to support broader use
cases beyond parachains. By enabling custom origins, scenarios like solo
chains, can build specialized message routing and processing making use
of this configuration.

## Motivation

- **Enhanced Integration**: While Snowbridge traditionally focuses on
bridging parachains, there is also a need to send messages from various
substrate-based chains (e.g., solo chains) and in different contexts.
This change expands the protocol's ability to handle multiple, distinct
origin types.

- **Custom Command Structures**: Some projects need to incorporate
custom Snowbridge commands or message structures, which cannot be
processed by the default outbound queue. By introducing a more generic
origin, these commands can be cleanly differentiated and securely
processed.

- **Flexibility**: Parachains, solo chains, or any environment running
Snowbridge benefit from a uniform pattern to handle both common and
custom message processing.

## Use Case

Consider a scenario where you need to send messages to Ethereum directly
from your runtime:

- You have your own set of commands or data structures different from
those provided by the traditional Snowbridge outbound queue.
- You want to introduce a custom message processor that specifically
handles your commands.
- You need a distinct origin to differentiate your messages from
standard Snowbridge traffic.

By using the `AggregateMessageOrigin`, you can verify whether a message
comes from a parachain, from Snowbridge itself, or from a custom origin.
This is especially relevant in solo chain contexts, where you might not
rely on the parachain assumptions but still want to leverage a robust
bridging framework.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T15-bridges This PR/Issue is related to bridges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants