Skip to content

Fix resolve pool ref by mint - #2423

Open
agusaldasoro wants to merge 3 commits into
mainfrom
fix/solana-resolve-pool-ref-by-mint
Open

agusaldasoro wants to merge 3 commits into
mainfrom
fix/solana-resolve-pool-ref-by-mint

Conversation

@agusaldasoro

@agusaldasoro agusaldasoro commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

When the Solana 1.6 resolver looks up a token pool's ref, it now uses the mint as well as the program address. If the token has been migrated to 2.0, it picks that token's ref; otherwise it picks the latest 1.x ref for the program.

Why

A program shared by many pools has several refs at the same address (one per qualifier and version), so looking up by address alone fails with expected to find exactly 1 ref ... found 4. That error is blocking changes to tokens on the shared program, such as the CCIP-BnM finality update.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical unresolved issues can misassociate migrated pools and resolve them to an unregistered Solana adapter version, causing incorrect references or operation failure.

2 open issues
What changed in this PR

Updates Solana token-pool reference resolution to use both the owning program and decoded mint, allowing shared programs to select the appropriate pool reference across token versions.

Changes:

  • Decode and validate the mint from pool configuration accounts.
  • Select token-specific migrated refs or fall back to the latest 1.x ref.
  • Add resolver tests and document intentional test-only signer shuffling.
File Description
chains/​solana/​utils/​ccip/​ccip_transactions.go Documents that randomized signer selection is intentional and non-security-sensitive test behavior.
chains/​solana/​deployment/​v1_6_0/​sequences/​tokens.go Implements pool configuration mint decoding, PDA validation, and mint-aware shared-program pool reference selection.
chains/​solana/​deployment/​v1_6_0/​sequences/​resolve_pool_ref_test.go Adds tests covering token-specific, legacy, program-only, unknown-reference, and pool configuration mint-resolution behavior.

Review effort: Lite

@agusaldasoro
agusaldasoro marked this pull request as ready for review November 24, 2026 21:54
@agusaldasoro
agusaldasoro requested review from a team as code owners November 24, 2026 21:54
@github-actions

Copy link
Copy Markdown
Metric fix/solana-resolve-pool-ref-by-mint main
Coverage 69.3% 69.1%

This branch has not been deployed

No deployments
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