-
Notifications
You must be signed in to change notification settings - Fork 809
svm/wormhole-core-shims: allow anchor interfaces to be used from any anchor version #4559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svm/wormhole-core-shims: allow anchor interfaces to be used from any anchor version #4559
Conversation
+ wider compiler support for chain id parsing
ee9bcb2 to
3b687e8
Compare
+ wider compiler support for chain id parsing
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. |
a5a1d9e to
783ae2d
Compare
not sure I can explicitly enumerate these, but I think we will know if something breaks because it will fail to compile |
There was a problem hiding this 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
We relax the anchor version bounds of the
*-interfacecrates 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-envcase, 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.