Skip to content

Conversation

@guibescos
Copy link
Contributor

@guibescos guibescos commented May 24, 2023

The goal of this PR is :

  • Make remote-executor use the new version of wormhole-sdk
  • Move the wormhole-solana (that wormhole doesn't have) to its own repo and update it to use wormhole-sdk

Wormhole team needs to :

  • Fix the crate patch issue with serde_wormhole
  • Decide what happens to wormhole-solana

@vercel
Copy link

vercel bot commented May 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) May 25, 2023 11:52pm
xc-admin-frontend ⬜️ Ignored (Inspect) May 25, 2023 11:52pm

@guibescos guibescos changed the title Point to another wormhole sdk [remote-executor] Point to another wormhole sdk May 24, 2023
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.66.1"
Copy link
Contributor Author

@guibescos guibescos May 25, 2023

Choose a reason for hiding this comment

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

Drive-by pin toolchain

std::env::current_dir()
.unwrap()
.join(Path::new("../../target/deploy/remote_executor.so")),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Newer versions of solana can't find the binary with the previous logic

Copy link
Contributor

@Reisen Reisen May 26, 2023

Choose a reason for hiding this comment

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

Can you explain why? Inherently suspicious of needing relative paths.

Copy link
Contributor Author

@guibescos guibescos May 26, 2023

Choose a reason for hiding this comment

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

In previous versions (1.13.x) when you ran cargo test-bpf, it would set an environment variable BPF_OUT_DIR and that's how the code would find the binary.
New versions (1.14.x) don't seems to set it, so find_file fails.

Maybe it has to do with them trying to migrate to test-sbf and deprecating test-bpf.

Copy link
Contributor

@Reisen Reisen May 26, 2023

Choose a reason for hiding this comment

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

Yeah I recall the BPF_OUT_DIR issues as well. Can you mention what might be the reason it's not doing it before we merge this? Don't worry if it takes too much time you can merge over this comment, it would just be nice to know what changed here for other solana related work.

- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
sh -c "$(curl -sSfL https://release.solana.com/v1.14.18/install)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to bump this

overflow-checks = true

[patch.crates-io]
serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This patch.crate-io wormhole thing is getting out of control, wormhole needs to fix

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, reasonable fix for now though. Let's ask for publishing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Attester cargo lock updated since attester governance cli uses remote-executor

@guibescos guibescos changed the title [remote-executor] Point to another wormhole sdk [remote-executor] Isolate wormhole-solana crate May 25, 2023
@guibescos guibescos marked this pull request as ready for review May 26, 2023 00:39
std::env::current_dir()
.unwrap()
.join(Path::new("../../target/deploy/remote_executor.so")),
);
Copy link
Contributor

@Reisen Reisen May 26, 2023

Choose a reason for hiding this comment

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

Can you explain why? Inherently suspicious of needing relative paths.

anchor-lang = {version = "0.25.0", features = ["init-if-needed"]}
wormhole-solana = { git = "https://github.com/guibescos/wormhole", branch = "reisen/sdk-solana"}
wormhole-core = { git = "https://github.com/guibescos/wormhole", branch = "reisen/sdk-solana"}
wormhole-solana = { git = "https://github.com/guibescos/wormhole-solana", rev="f14b3b54c1e37e1aaf8c2ac2a5e236832ffdb3c2"}
Copy link
Contributor

@Reisen Reisen May 26, 2023

Choose a reason for hiding this comment

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

We should really get away from this, maybe we can chat about what needs to be upstreamed. We're running into this in pythnet too. I believe this was based on my original PR that had plans to revive, we should push for it if possible.

Copy link
Contributor Author

@guibescos guibescos May 26, 2023

Choose a reason for hiding this comment

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

This is a temporary home.
Two options from here :

  • Its own repo (maybe switch from my personal github to wormhole or pyth org)
  • Make it part of sdk/rust/ in the wormhole monorepo


let vaa = VAA::from_bytes(vaa_bytes.clone())?;
let vaa: Vaa<&RawMessage> = serde_wormhole::from_slice(&vaa_bytes)?;
let (header, body): (Header, Body<&RawMessage>) = vaa.into();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice nice nice.

overflow-checks = true

[patch.crates-io]
serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, reasonable fix for now though. Let's ask for publishing.

@guibescos guibescos merged commit 73c2af2 into main May 26, 2023
@guibescos guibescos deleted the fix-wormhole-sdk branch May 26, 2023 19:02
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.

3 participants