-
Notifications
You must be signed in to change notification settings - Fork 104
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
Use pallet instance in inbound queue origin #1033
Changes from 2 commits
4ce7da3
323d987
d217920
8aaa21a
98e0340
467c177
f0a1362
fb92c02
5ea29ab
dc15e05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
use frame_support::parameter_types; | ||
use xcm::opaque::lts::NetworkId; | ||
|
||
pub const INBOUND_QUEUE_MESSAGES_PALLET_INDEX: u8 = 80; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like there is an API for retrieving a pallet's index: https://substrate.stackexchange.com/a/794 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This works nicely in BridgeHub, but I need the EthereumInboundQueue pallet index on BridgeHub in the AssetHub runtime too: https://github.com/Snowfork/polkadot-sdk/pull/51/files#diff-a86375df98e04ca3cce1ea35c40257a222e2d5087f5f528ff33307678b78dc2dR863 I don't think it would be correct to import bridge hub as a dependency in the AssetHub crate, and I don't know how else to share the pallet index. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok makes sense 👌 |
||
|
||
parameter_types! { | ||
// Network and location for the Ethereum chain. | ||
pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 15 }; | ||
|
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.
Shouldn't this
DescendOrigin
be placed at the start of message, beforeBuyExecution
?As otherwise, we have three origins in this message, which makes it more complicated.
cc @alistair-singh
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.
This doesn't work, putting the
DescendOrigin
beforeBuyExecution
then results in a barrier error. The way I understand it, theDescendOrigin
shouldn't be beforeBuyExecution
because it's not really related to theBuyExecution
.BuyExecution
is to pay for fees in DOT, and then theDescendOrigin
is to further specialize the origin to beBridgeHub/Pallet(EthereumInboundQueue)
. @alistair-singh correct me if I am wrong.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.
@claravanstaden I agree with @vgeddes here, IMO it's better to move
DescendOrigin
to first, add another PR with some revamp accordingly inhttps://github.com/Snowfork/snowbridge/pull/1034/files#diff-9218e396410f01117c1c305b9cf006f6498bb0b3c0aedb8952a8450b4b1c5715 for us to review.
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.
Awesome! Thanks Ron, taking a look...
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.
Thanks @yrong, I merged it.