Commit d9c3e5e
authored
svm: build ntt the proper way on other svms (#730)
* solana: use updated crates
We no longer need to depend on backported forks of
`wormhole-anchor-sdk`, `wormhole-verify-vaa-shim-interface`, and
`wormhole-post-message-shim-interface` as these have been updated to
support all anchor versions.
Furthermore, the new versions of these crates encode the program
IDs (such as Wormhole) as a static value again, meaning they will be in
the rodata section of the binary just like before, so the binary
patching method works on them for replacing the address.
* cli: properly build svm binaries by passing core address
Newer versions of NTT support a `bridge-address-from-env` flag, which
allows specifying the address of the Wormhole program from an
environment variable rather than relying on a pre-defined set of
addresses. We use that flag when available, and fall back to patching
the binary when it's not.
This way of detecting the cargo flag allows us to:
- build the binary properly for new versions going forward
- support building older NTT releases without modification for other
SVMs (e.g. fogo) by patching the binary
- if the `bridge-address-from-env` feature is backported to older
NTTs (should be straightforward), then the CLI will just pick up that
compilation path automatically1 parent bf14e28 commit d9c3e5e
File tree
12 files changed
+360
-151
lines changed- .github/workflows
- cli/src
- solana
- programs
- example-native-token-transfers
- ntt-quoter
- ntt-transceiver
- tests
- wormhole-governance
- tests/cargo
12 files changed
+360
-151
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments