wormhole icon indicating copy to clipboard operation
wormhole copied to clipboard

sdk: Add vaa_payload crate

Open jynnantonix opened this issue 3 years ago β€’ 7 comments

The vaa_payload crate implements a serde data format for VAA payloads. This will let us replace all the hand-rolled serialization code with auto-generated code, which is less error-prone and easier to review.


This change is Reviewable

jynnantonix avatar Mar 15 '22 09:03 jynnantonix

Why is this only for terra? Can't we use it in solana too?

kcsongor avatar Apr 12 '22 07:04 kcsongor

Why is this only for terra? Can't we use it in solana too?

No particular reason. I just hadn't looked at the solana code at all and so didn't think about making this more general purpose. I'll move it into the sdk directory.

jynnantonix avatar Apr 13 '22 06:04 jynnantonix

I think I'm just going to close this. The goal was to avoid having to manually write parsing code for the various VAA messages we already have and I'm not sure about the benefit of moving it into the sdk. People building on top of wormhole should use a proper schema for their payloads rather than the hand rolled one we're using for VAAs.

jynnantonix avatar May 27 '22 06:05 jynnantonix

Deploy Preview for tubular-dango-1656b2 ready!

Name Link
Latest commit a76a6d0bd37d5b29e2f2d2966112a7a5da214b11
Latest deploy log https://app.netlify.com/sites/tubular-dango-1656b2/deploys/62b975a53eac3f00099523d7
Deploy Preview https://deploy-preview-1001--tubular-dango-1656b2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jun 27 '22 09:06 netlify[bot]

I've moved the crate into the sdk/rust directory and also added support for strings and maps.

jynnantonix avatar Jun 27 '22 09:06 jynnantonix

could we get the byte_utils.rs from terra/contracts/wormhole/src added into here as well? I use state.rs and byte_utils.rs in every single rust contract I build...

jumpsiegel avatar Jun 27 '22 11:06 jumpsiegel

could we get the byte_utils.rs from terra/contracts/wormhole/src added into here as well? I use state.rs and byte_utils.rs in every single rust contract I build...

The purpose of this crate is to be a replacement for byte_utils.rs so I don't think moving it here helps us with that goal.

jynnantonix avatar Jun 28 '22 04:06 jynnantonix

Current dependencies on/for this PR:

  • dev.v2
    • PR #1001 Graphite πŸ‘ˆ
      • PR #1789 Graphite
        • PR #1793 Graphite

This comment was auto-generated by Graphite.

jynnantonix avatar Oct 25 '22 09:10 jynnantonix

Superseeded by #1919

jynnantonix avatar Nov 28 '22 23:11 jynnantonix