Skip to content

Conversation

@kcsongor
Copy link
Contributor

@kcsongor kcsongor commented Oct 30, 2025

We relax the anchor version bounds of the *-interface crates so they can be used from any anchor program. This works, because the interface crates rely on a very small subset of anchor features that are hopefully stable enough to not need to be tied to version bounds. Knock on wood.

Additionally, the definitions crate now has fine-grained control over which addresses to expose. This is only interesting in the from-env case, which rely on environment variables to be set. For example, if a user of this crate wants only the core bridge address (and its PDAs), it should not need to define the verify-vaa-shim program id.
This is in preparation for using this crate as the ultimate source of truth for all program ids and constants. As such, we also use hand-rolled u16 const parser, as the previously used version doesn't work on older compiler versions required by some anchor versions out there (looking at you, 0.29).

This is also a breaking change of the definitions crate, so bumped the major version to 1.0.0. Breaking, because the default flags now only provide core bridge ids, as opposed to all the ids.

@kcsongor kcsongor force-pushed the shim-anchor-jailbreak branch from ee9bcb2 to 3b687e8 Compare October 30, 2025 15:10
@johnsaigle
Copy link
Contributor

johnsaigle commented Oct 30, 2025

the interface crates rely on a very small subset of anchor features that are hopefully stable enough to not need to be tied to version bounds.

Any chance you could document the required features in the README? The idea here would be to make it easier for us to check this crate against Anchor's changelogs going forward to figure out if we're gonna get into trouble.

@kcsongor
Copy link
Contributor Author

the interface crates rely on a very small subset of anchor features that are hopefully stable enough to not need to be tied to version bounds.

Any chance you could document the required features in the README? The idea here would be to make it easier for us to check this crate against Anchor's changelogs going forward to figure out if we're gonna get into trouble.

not sure I can explicitly enumerate these, but I think we will know if something breaks because it will fail to compile

@evan-gray evan-gray requested a review from connorstake November 3, 2025 13:54
Copy link
Collaborator

@djb15 djb15 left a comment

Choose a reason for hiding this comment

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

Relaxing the version bounds on the interfaces seems acceptable to me. The currently deployed shim program will still enforce the intended account constraints if the Anchor account semantics happen to change for example

@johnsaigle johnsaigle merged commit a994a16 into wormhole-foundation:main Nov 5, 2025
33 checks passed
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