-
Notifications
You must be signed in to change notification settings - Fork 754
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 v2 - Outbound Queue #6706
Open
yrong
wants to merge
74
commits into
paritytech:master
Choose a base branch
from
yrong:outbound-queue-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>
This was referenced Dec 6, 2024
yrong
force-pushed
the
outbound-queue-v2
branch
from
December 13, 2024 05:29
5823b11
to
b67f89a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This PR is for implement the design in SnowbridgeV2, essentially moving from ordered messaging system to an unordered one.
It focus more on outbound changes, inbound changes will be addressed in another PR.
The point is that we want to make V2 work side by side with V1, so add new routes/pallets specific for V2 and leave legacy codes untouched is important.
This PR is also based on XCM V5 with new instructions like
AliasOrigin
,InitiateTransfer
in place.Initial PR yrong#4 has been internally reviewed, companion changes required for other components of the bridge including:
Contract
Relayer
Workflow
on AH we add a custom exporter returns a lower fee(without the execution cost on Ethereum including), essentially predict the route by content of XCM, more details in Predicate route table by Xcm #6074 and thanks for the review from @bkontur
On BH also add a new exporter to handle V2 specific xcm, convert the xcm to a
Message
structure which will be executed on Ethereum.In
OutboundQueue
store the message into a merkle tree as V1 before, add the pending message intoPendingOrder
storage. Code here for detail.In
OutboundQueue
add a new extrinsic submit_delivery_proof in which we verify theMessage
has been delivered to Ethereum, only after that add the fee toRewardLeger
which can be redeemed by the relayer later, more details in Relayer rewards paid to specified location account #6578Review notes
Simulated test is the entry point how to build XCM for V2, also a good candidate to dig deep into the process.
cargo test -p bridge-hub-westend-integration-tests --lib tests::snowbridge_v2_outbound -- --nocapture