import chainlink-solana for codec, and rm codec in core#22124
import chainlink-solana for codec, and rm codec in core#22124huangzhen1997 wants to merge 6 commits intodevelopfrom
Conversation
|
👋 huangzhen1997, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
CORA - Pending Reviewers
Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown For more details, see the full review summary. |
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
There was a problem hiding this comment.
Pull request overview
Risk Rating: HIGH — moves Solana CCIP codec logic out of core and rewires multiple call sites to an external module (chainlink-solana), which is critical-path for message encoding/decoding.
This PR migrates Solana CCIP codec usage to github.com/smartcontractkit/chainlink-solana/pkg/solana/ccip/codec and removes the duplicated codec implementation from core/capabilities/ccip/ccipsolana.
Changes:
- Replace in-repo Solana address/extra-data codec usage with
chainlink-solanaconstructors (NewAddressCodec,NewExtraDataDecoder, etc.). - Remove the in-core Solana CCIP codec implementation and its tests (commit/execute codecs, message hasher, extra-data codec, address codec).
- Update affected tests and deployment helpers to use the new codec package.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/ccip/manualexechelpers/exec.go | Switch Solana extra-data decoder to chainlink-solana codec. |
| deployment/ccip/changeset/internal/deploy_home_chain.go | Switch Solana address codec to chainlink-solana codec for OCR3 config building. |
| core/capabilities/ccip/ocrimpls/contract_transmitter_test.go | Update test to use chainlink-solana extra-data decoder. |
| core/capabilities/ccip/ccipsolana/pluginconfig.go | Wire Solana plugin config to chainlink-solana codecs (commit/execute/hasher/address/extradata). |
| core/capabilities/ccip/ccipsolana/gas_helpers_test.go | Update tests to use chainlink-solana extra-data decoder; adds local extra-args serialization helper. |
| core/capabilities/ccip/ccipsolana/msghasher_test.go | Removed (codec/message hasher tests moved out of core). |
| core/capabilities/ccip/ccipsolana/msghasher.go | Removed (message hasher moved out of core). |
| core/capabilities/ccip/ccipsolana/extradatacodec_test.go | Removed (extra-data decoder tests moved out of core). |
| core/capabilities/ccip/ccipsolana/extradatacodec.go | Removed (extra-data decoder moved out of core). |
| core/capabilities/ccip/ccipsolana/executecodec_test.go | Removed (execute codec tests moved out of core). |
| core/capabilities/ccip/ccipsolana/executecodec.go | Removed (execute codec moved out of core). |
| core/capabilities/ccip/ccipsolana/commitcodec_test.go | Removed (commit codec tests moved out of core). |
| core/capabilities/ccip/ccipsolana/commitcodec.go | Removed (commit codec moved out of core). |
| core/capabilities/ccip/ccipsolana/addresscodec_test.go | Removed (address codec tests moved out of core). |
| core/capabilities/ccip/ccipsolana/addresscodec.go | Removed (address codec moved out of core). |
| core/capabilities/ccip/ccipevm/msghasher_test.go | Update test to use chainlink-solana extra-data decoder for Solana family. |
| func makeExtraArgsV2(computeUnits uint32, allowOOO bool) []byte { | ||
| extraArgs, err := SerializeExtraArgs(svmExtraArgsV1Tag, fee_quoter.SVMExtraArgsV1{ | ||
| extraArgs, err := serializeExtraArgs(svmExtraArgsV1Tag, fee_quoter.SVMExtraArgsV1{ | ||
| AllowOutOfOrderExecution: allowOOO, |
There was a problem hiding this comment.
svmExtraArgsV1Tag is referenced in makeExtraArgsV2, but the tag constant was removed when the in-core Solana codec was deleted (it used to live in extradatacodec.go). This test file will not compile until the tag is reintroduced (e.g., define it locally, or reference an exported tag constant from chainlink-solana/pkg/solana/ccip/codec if available).
| AddressCodec: codec.NewAddressCodec(), | ||
| ChainRW: ChainRWProvider{}, | ||
| ExtraDataCodec: ExtraDataDecoder{}, | ||
| ExtraDataCodec: codec.NewExtraDataDecoder(), |
There was a problem hiding this comment.
NewGasEstimateProvider/EstimateProvider in ccipsolana still depends on helpers (parseExtraDataMap, extractDestGasAmountFromMap) that were removed along with the in-core codec (e.g., msghasher.go/executecodec.go). As-is, the ccipsolana package will not compile. Please either re-home those helpers (e.g., into ccipsolana or the new chainlink-solana/.../codec package with exported APIs) and update EstimateProvider to use them, or refactor EstimateProvider to avoid relying on the removed parsing logic.
| ExtraDataCodec: codec.NewExtraDataDecoder(), | |
| ExtraDataCodec: extraDataCodec, |
|
|




Jira: https://smartcontract-it.atlassian.net/browse/NONEVM-4683
Remove duplicate Solana codec code in core, and import it from chainlink-solana instead.