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

Avalanche Warp Navigator #61

Merged
merged 15 commits into from
Sep 13, 2023
Merged

Avalanche Warp Navigator #61

merged 15 commits into from
Sep 13, 2023

Conversation

Nuttymoon
Copy link
Contributor

@Nuttymoon Nuttymoon commented Aug 30, 2023

Dependencies

Changes

Avalanche Warp Navigator:

  • Add autogenerated WarpMessenger contract bindings (from ABI)
  • Add structs to decode Avalanche Warp messages. A WarpMessage is composed of:
    • A WarpUnsignedMessage: see UnsignedMessage
    • A VerifiedWarpMessage: pre-verified Warp message as it will be parsed on the destination chain
    • A status: Sent or Signed(u16) with the number of signatures
    • A list of WarpMessageNodeSignature
  • The payload of a WarpUnsignedMessage put further be decoded to an AddressedPayload (see AddressedPayload), which is specific to sending Warp messages between Subnet-EVM chains
  • Add avalanche warp navigate command in the CLI

Additional comments

  • Only Subnet-EVM chains are supported atm since each VM type will have its mechanism to retrieve messages (event logs of the WarpMessenger precompile in this case)
  • Warp message decoding rarely fails and is done in a "best effort" way, further decoding parts of the message if possible
  • I did not implement all tests for this feature since it's pretty complicated to spin up a Warp-enabled chain with ANR at the moment
  • The mechanism for retrieving node signatures of messages is not optimal but I couldn't do better for the moment. See Cannot aggregate Warp message signatures with warp_getAggregateSignature ava-labs/subnet-evm#806
  • We could probably move some structs to avalanche-types-rs after a discussion with Ava Labs

@Nuttymoon Nuttymoon requested a review from leopaul36 August 30, 2023 19:43
@Nuttymoon Nuttymoon force-pushed the avalanche-warp-navigator branch from d7e61d1 to d5497e1 Compare September 7, 2023 17:44
@Nuttymoon
Copy link
Contributor Author

Rebased on main

@Nuttymoon Nuttymoon force-pushed the avalanche-warp-navigator branch from d5497e1 to 8cc955b Compare September 12, 2023 12:47
@Nuttymoon Nuttymoon changed the title Avalanche warp navigator Avalanche Warp Navigator Sep 12, 2023
@Nuttymoon Nuttymoon merged commit 3491ea5 into main Sep 13, 2023
@Nuttymoon Nuttymoon deleted the avalanche-warp-navigator branch September 13, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants