Skip to content
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

Snowbridge: Emit sent event from BH to AH #6965

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Dec 19, 2024

  • A separate Sent event for the xcm to AH.
  • Move the MessageReceived event ahead for less confusion.

@yrong yrong changed the title Emit event for the xcm Snowbridge: emit event for the xcm to asset hub Dec 19, 2024
@yrong yrong changed the title Snowbridge: emit event for the xcm to asset hub Snowbridge: Emit sent xcm from BH to AH Dec 19, 2024
@yrong yrong marked this pull request as ready for review December 19, 2024 12:40
@paritytech-review-bot paritytech-review-bot bot requested a review from a team December 19, 2024 12:42
@acatangiu acatangiu added the T15-bridges This PR/Issue is related to bridges. label Dec 19, 2024
@@ -160,6 +160,8 @@ pub mod pallet {
},
/// Set OperatingMode
OperatingModeChanged { mode: BasicOperatingMode },
/// A XCM message was sent.
Sent { destination: Location, message: Xcm<()>, message_id: XcmHash },
Copy link
Contributor

Choose a reason for hiding this comment

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

Including the full XCM message in the event makes it too big. You can add debug logging for full XCM, but for the event topic_id and message_id should be enough.

Suggested change
Sent { destination: Location, message: Xcm<()>, message_id: XcmHash },
Sent { destination: Location, message_id: XcmHash, topic_id: XcmHash },

You can populate topic_id for example like this.

Copy link
Contributor Author

@yrong yrong Dec 19, 2024

Choose a reason for hiding this comment

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

fab5bc9

Btw: message_id is generated from Ethereum and we sent it through all the way along. By using WithUniqueTopic the topic_id is just same as message_id(i.e. the t of the last instruction SetTopic(t))

@paritytech-review-bot paritytech-review-bot bot requested a review from a team December 19, 2024 17:06
@yrong yrong changed the title Snowbridge: Emit sent xcm from BH to AH Snowbridge: Emit sent event from BH to AH Dec 21, 2024
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.

2 participants