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

V2 #1371

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

V2 #1371

wants to merge 4 commits into from

Conversation

vgeddes
Copy link
Collaborator

@vgeddes vgeddes commented Feb 2, 2025

No description provided.

vgeddes and others added 2 commits January 30, 2025 14:45
* v2 initial commit

* latest changes

* Flesh out dispatch logic for inbound messages

* Add reward address

* make code compile

* Split initializer impl into a library to reduce contract size

* Major refactor

* Update tests

* add scripts back

* Update scripts

* Finish outbound messaging

* Implement token registration for V2

* Make functions payable

* improve docs

* comments

* review feedback

* cleanups

* Add initial tests for V2

* Make `rewardAddress` an indexed event parameter

* Clean up interfaces

* Make WETH address configurable

* Autowrap ether

* auto-unwrap ether

* Add view keyword

* off-chain part

* off-chain changes

* improve

* improve

* allow unlocking native ether

* improve token registration flows

* improve docs

* improve

* improve

* nit

* Update contracts/src/v1/Calls.sol

Co-authored-by: Clara van Staden <[email protected]>

* Apply suggestions from code review

Co-authored-by: Alistair Singh <[email protected]>

* Fix unlock WETH

* Suppress Error (6243): The "tload" instruction

* Merge recent changes

* add foundry setting

* relayer progress

* fixes

* adds xcm

* register token v2

* clean up register token smoketest

* fmt

* merge damage

* fix tests

* send token and relayer fixes

* relayer cleanup and transact

* send token to penpal smoke test

* syntax error

* adds penpal test to ci

* merge damage fixes

---------

Co-authored-by: Vincent Geddes <[email protected]>
Co-authored-by: ron <[email protected]>
Co-authored-by: Alistair Singh <[email protected]>
@yrong
Copy link
Contributor

yrong commented Feb 3, 2025

Cool!
@claravanstaden @vgeddes May I merge #1321, I've tested the smoke tests against paritytech/polkadot-sdk#7402 including legacy V1 and some V2 tests, all work as expected

// ENA
cargo test --test register_token
cargo test --test send_token
cargo test --test v2 transfer_ena::transfer_ena

// PNA
cargo test --test register_polkadot_token
cargo test --test v2 transfer_pna::transfer_pna
cargo test --test send_polkadot_token

@claravanstaden
Copy link
Contributor

@yrong yes please! :D

* v2 initial commit

* latest changes

* Flesh out dispatch logic for inbound messages

* Add reward address

* make code compile

* Split initializer impl into a library to reduce contract size

* Major refactor

* Update tests

* add scripts back

* Update scripts

* Finish outbound messaging

* Implement token registration for V2

* Make functions payable

* improve docs

* Parachain relayer V2

* Rename to PendingOrder

* Decode compact int

* comments

* Improve doc

* review feedback

* cleanups

* Add initial tests for V2

* Make `rewardAddress` an indexed event parameter

* Remove unused

* Submit delivery proof

* Rename to InboundMessageV2

* Mark as view function

* Filter with reward address

* Clean up interfaces

* Make WETH address configurable

* Autowrap ether

* V2 smoke tests (#1327)

* Update contracts for smoke tests

* Remove unused

* Decode test

* Update subxt

* Register PNA with OutbountQueueV2

* Fix storage key

* Comment out config

* Revert contract changes

* Fix function

* Regenerate binds & update package path

* Format

* Format

* Add todo

* Update bindings

* Update script

* auto-unwrap ether

* Update smoke tests

* Add view keyword

* More refactoring

* Verify V2 digest for commitment

* Call Contract with value

* improve

* improve

* allow unlocking native ether

* improve token registration flows

* improve docs

* improve

* improve

* nit

* Fix smoke test for V2

* Fix test

* Fix unlock WETH

* Sync with contract

* Fix smoke test

* Update contracts/src/v1/Calls.sol

Co-authored-by: Clara van Staden <[email protected]>

* Apply suggestions from code review

Co-authored-by: Alistair Singh <[email protected]>

* Fix unlock WETH

* Suppress Error (6243): The "tload" instruction

* Merge recent changes

* Fix breaking tests

* Fix tests

* Filter order by rewardAddress to handle own delivery proof

* Fix test

* Add ofac check

---------

Co-authored-by: Vincent Geddes <[email protected]>
Co-authored-by: Clara van Staden <[email protected]>
Co-authored-by: Alistair Singh <[email protected]>
privateKey string
privateKeyFile string
privateKeyID string
parachainPrivateKey string
Copy link
Contributor

Choose a reason for hiding this comment

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

@yrong do we still need the substrate private key for the parachain relayer? Maybe for the delivery proofs? I don't see it in your Parachain Relayer V2 PR anymore, but perhaps it was in the v2 branch already.

Reason why I am asking is I want to add the key to the start-relayer scripts but just want to make sure it is still necessary.

Copy link
Contributor

@yrong yrong Feb 3, 2025

Choose a reason for hiding this comment

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

Yeah, we need that for submitting delivery proofs to BH.

I wrap a script specific for the V2 message relayer in https://github.com/Snowfork/snowbridge/blob/v2/web/packages/test/scripts/start-relayer-v2.sh and test by running a legacy V1 relayer side by side with the V2 message relayer.

In that way, I can test the V1 smoke tests still work as expected for the V2 setup, which means it's fully compatible.

Anyway, feel free to add that to start-relayer scripts.

* Fix smoke tests

* Add smoke tests

* Prefund transfer ENA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants