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

Integrate warp non compatible changes #42

Merged
merged 16 commits into from
Sep 26, 2023
Merged

Conversation

minghinmatthewlam
Copy link

@minghinmatthewlam minghinmatthewlam commented Sep 20, 2023

Why this should be merged

Warp has non compatible changes recently added in v0.5.6 that changes how Teleporter integrates with the precompile. We need to update relayer with any corresponding changes and update subnet-evm version. Fixes #24

How this works

Updates subnet-evm version dependency, uses predicateutils for predicate tx

How this was tested

Building local docker image, and running e2e test with corresponding teleporter changes ava-labs/teleporter#29

geoff-vball
geoff-vball previously approved these changes Sep 22, 2023
Copy link
Contributor

@geoff-vball geoff-vball left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@michaelkaplan13 michaelkaplan13 left a comment

Choose a reason for hiding this comment

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

All these changes LGTM, but do we need to encode the signed message as an array now that the warp predicate can contain multiple messages?

I would have also expected there to be a messageIndex parameter added somewhere since it's now a parameter to the getVerifiedWarpMessage precompile call. I'm not sure if we're planning on allowing that to be a parameter in receiveCrossChainMessage in Teleporter or not, though seems like it would likely make sense to.

@minghinmatthewlam
Copy link
Author

All these changes LGTM, but do we need to encode the signed message as an array now that the warp predicate can contain multiple messages?

I would have also expected there to be a messageIndex parameter added somewhere since it's now a parameter to the getVerifiedWarpMessage precompile call. I'm not sure if we're planning on allowing that to be a parameter in receiveCrossChainMessage in Teleporter or not, though seems like it would likely make sense to.

The slices are handled by the AccessList where each access tuple would correspond to a predicate's bytes, and predicateutils.NewPredicateTx will help add the message as the first index.

Agreed receiveCrossChainMessage can accept an index, I had hardcoded it to 0, but ill add that in case dapps or future relayer improvements leverages that. Putting back in draft until I address that.

@minghinmatthewlam minghinmatthewlam marked this pull request as draft September 22, 2023 21:19
@michaelkaplan13
Copy link
Collaborator

All these changes LGTM, but do we need to encode the signed message as an array now that the warp predicate can contain multiple messages?
I would have also expected there to be a messageIndex parameter added somewhere since it's now a parameter to the getVerifiedWarpMessage precompile call. I'm not sure if we're planning on allowing that to be a parameter in receiveCrossChainMessage in Teleporter or not, though seems like it would likely make sense to.

The slices are handled by the AccessList where each access tuple would correspond to a predicate's bytes, and predicateutils.NewPredicateTx will help add the message as the first index.

Agreed receiveCrossChainMessage can accept an index, I had hardcoded it to 0, but ill add that in case dapps or future relayer improvements leverages that. Putting back in draft until I address that.

Oh nice! I didn't realize that about how the predicates are encoded within the AccessList. I like that much better than an array.

And sounds good about the index. 🙏

Copy link
Contributor

@bernard-avalabs bernard-avalabs left a comment

Choose a reason for hiding this comment

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

LGTM.

messages/teleporter/message.go Show resolved Hide resolved
messages/teleporter/utils.go Outdated Show resolved Hide resolved
messages/teleporter/message.go Outdated Show resolved Hide resolved
cam-schultz
cam-schultz previously approved these changes Sep 26, 2023
Copy link
Collaborator

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

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

LGTM. Agree with Michael's comment to have Index as the first parameter to receiveCrossChainMessage

Copy link
Collaborator

@michaelkaplan13 michaelkaplan13 left a comment

Choose a reason for hiding this comment

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

LGTM

cam-schultz
cam-schultz previously approved these changes Sep 26, 2023
Copy link
Contributor

@geoff-vball geoff-vball left a comment

Choose a reason for hiding this comment

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

👍

@minghinmatthewlam minghinmatthewlam merged commit 9670b8d into main Sep 26, 2023
7 checks passed
@cam-schultz cam-schultz deleted the integrate-warp-changes branch September 26, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update relayer to support warp changes
5 participants