Skip to content
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

solana: Multi Transceiver Support #528

Merged
merged 17 commits into from
Dec 3, 2024
Merged

Conversation

nvsriram
Copy link
Collaborator

@nvsriram nvsriram commented Oct 4, 2024

  • Refactor src/transceivers/* and src/messages.rs from Manager into ntt-transceiver program
  • Add zero-copy deserialization helpers for ValidatedTransceiverMessage in Manager
  • Update transceiver's release_outbound ix to CPI into Manager's mark_outbox_item_as_released ix.
  • Update Makefile to remove generics (if exists) from all programs
  • Bump IDL to version 3.0.0

@nvsriram
Copy link
Collaborator Author

nvsriram commented Oct 4, 2024

SDK currently doesn't support multi-transceiver (it takes in a transceiver address at initialization and doesn't use it after that). Current TS changes are the minimum necessary to be able to test a custom transceiver.
However a proper refactor considering backwards compatibility and multi-transceiver support would be necessary.

One potential solution is to add a map/list for transceivers in the SolanaNtt class instead of the whTransceiverAddress. As a consequence, the getTransceiver function, SolanaNttWormholeTransceiver class, etc. would all need to be updated.

@kcsongor
Copy link
Contributor

kcsongor commented Oct 7, 2024

One potential solution is to add a map/list for transceivers in the SolanaNtt class instead of the whTransceiverAddress. As a consequence, the getTransceiver function, SolanaNttWormholeTransceiver class, etc. would all need to be updated.

this would be the most comprehensive solution, but might make sense to tackle it in a separate PR

@nvsriram
Copy link
Collaborator Author

nvsriram commented Oct 7, 2024

One potential solution is to add a map/list for transceivers in the SolanaNtt class instead of the whTransceiverAddress. As a consequence, the getTransceiver function, SolanaNttWormholeTransceiver class, etc. would all need to be updated.

this would be the most comprehensive solution, but might make sense to tackle it in a separate PR

That makes sense, I'll make a new PR that is based on this to implement the TS SDK refactor. At the end, we can merge both PRs together.

@nvsriram nvsriram marked this pull request as ready for review October 31, 2024 15:47
@nvsriram nvsriram requested a review from johnsaigle October 31, 2024 15:48
@nvsriram
Copy link
Collaborator Author

One potential solution is to add a map/list for transceivers in the SolanaNtt class instead of the whTransceiverAddress. As a consequence, the getTransceiver function, SolanaNttWormholeTransceiver class, etc. would all need to be updated.

this would be the most comprehensive solution, but might make sense to tackle it in a separate PR

That makes sense, I'll make a new PR that is based on this to implement the TS SDK refactor. At the end, we can merge both PRs together.

The TS SDK refactor is complete (with all CI jobs accounted for) and the PR is ready for review: #535 🎉

I think it makes chronological sense to review this PR first and then the TS SDK refactor PR as those changes are based off this.

@nvsriram nvsriram force-pushed the solana/multi-transceiver-support branch 2 times, most recently from b563f3a to a3517b1 Compare November 13, 2024 22:53
Copy link
Contributor

@kcsongor kcsongor left a comment

Choose a reason for hiding this comment

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

great stuff!

@nvsriram nvsriram force-pushed the solana/multi-transceiver-support branch 3 times, most recently from 3472e55 to e942102 Compare December 2, 2024 16:20
nvsriram and others added 6 commits December 2, 2024 18:55
* Update Ntt and NttTransceiver interfaces to be more generic
* Update SolanaNtt to store a list of Program<NttBindings.Transceiver<IdlVersion>>. This mimics EvmNtt which stores list of EvmNttWormholeTranceiver.
* Reserve transceiver at index 0 for Wormhole transceiver in Solana and EVM
* Refactor transceiver specific functions into SolanaNttWormholeTransceiver
* Add Wormhole-specific wrapper methods and anchor-idl 3.0.0 bindings for backwards compatibility
@nvsriram nvsriram force-pushed the solana/multi-transceiver-support branch from e942102 to 4940a05 Compare December 2, 2024 23:55
@nvsriram nvsriram merged commit 738c67b into main Dec 3, 2024
9 checks passed
@nvsriram nvsriram deleted the solana/multi-transceiver-support branch December 3, 2024 18:03
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