Skip to content

svm: adds a way to specify governance program id from env#740

Open
scnale wants to merge 4 commits into
mainfrom
svm/allow-changing-governance-program-id
Open

svm: adds a way to specify governance program id from env#740
scnale wants to merge 4 commits into
mainfrom
svm/allow-changing-governance-program-id

Conversation

@scnale

@scnale scnale commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

No description provided.

kcsongor and others added 3 commits November 7, 2025 16:51
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
@scnale scnale requested a review from kcsongor November 7, 2025 17:52
kcsongor
kcsongor previously approved these changes Nov 7, 2025
@kcsongor kcsongor force-pushed the solana/bridge-addr-from-env branch from ec18f98 to 190b4ee Compare November 7, 2025 19:03
@kcsongor kcsongor force-pushed the solana/bridge-addr-from-env branch 5 times, most recently from b2bf64c to 3e1b5ef Compare December 9, 2025 16:55
@evan-gray evan-gray force-pushed the solana/bridge-addr-from-env branch from 3e1b5ef to 823b724 Compare December 11, 2025 02:50
Base automatically changed from solana/bridge-addr-from-env to main December 11, 2025 11:43
@evan-gray evan-gray dismissed kcsongor’s stale review December 11, 2025 11:43

The base branch was changed.

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