svm: adds a way to specify governance program id from env#740
Open
scnale wants to merge 4 commits into
Open
Conversation
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.
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 automatically
kcsongor
previously approved these changes
Nov 7, 2025
ec18f98 to
190b4ee
Compare
b2bf64c to
3e1b5ef
Compare
3e1b5ef to
823b724
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.