Skip to content

Solana devenv support #1023

Merged
huangzhen1997 merged 14 commits intomainfrom
jh/implement-serializeExtraArgsSVMV1-for-evm-devenv
Apr 21, 2026
Merged

Solana devenv support #1023
huangzhen1997 merged 14 commits intomainfrom
jh/implement-serializeExtraArgsSVMV1-for-evm-devenv

Conversation

@huangzhen1997
Copy link
Copy Markdown
Contributor

@huangzhen1997 huangzhen1997 commented Apr 15, 2026

Related PR.

Summary

  • Filter verifier/executor jobs during chain config loading
  • Add svm extra args serializer for evm devenv
  • Tmp fix for IsEVM() in EVM chain accessor (proper fix chain-selectors#186)
  • Add TokenReceiverAllowed field to ChainLaneProfile, required for SVM destinations where SVMExtraArgsV1 always includes tokenReceiver
  • Wire TokenReceiverAllowed into partial chain config builder

Test plan

  • EVM-only devenv continues to work (no regression from family filtering)
  • Mixed EVM+Solana devenv starts without accessor errors
  • EVM→Solana e2e test passes with correct SVMExtraArgsV1 encoding

@huangzhen1997 huangzhen1997 changed the title Jh/implement serialize extra args svmv1 for evm devenv Implement serialize extra args svmv1 for evm devenv Apr 15, 2026
@huangzhen1997 huangzhen1997 marked this pull request as ready for review April 15, 2026 21:01
@huangzhen1997 huangzhen1997 requested review from a team and skudasov as code owners April 15, 2026 21:01
Copilot AI review requested due to automatic review settings April 15, 2026 21:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support plumbing for SVM v1 extraArgs and a new lane-profile knob to allow non-empty tokenReceiver for destinations that require it.

Changes:

  • Propagate TokenReceiverAllowed from ChainLaneProfile into PartialRemoteChainConfig when building lane configs.
  • Add TokenReceiverAllowed *bool to ChainLaneProfile (with behavior documentation).
  • Introduce an ABI-based serializeExtraArgsSVMV1 helper for SVM v1 extraArgs encoding.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
build/devenv/implcommon.go Wires TokenReceiverAllowed into the per-remote lane config builder.
build/devenv/evm/impl.go Adds serializeExtraArgsSVMV1 helper for SVM v1 extraArgs packing.
build/devenv/cciptestinterfaces/interface.go Extends ChainLaneProfile with TokenReceiverAllowed and documents expected behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build/devenv/evm/impl.go
Comment thread build/devenv/evm/impl.go
@huangzhen1997 huangzhen1997 marked this pull request as draft April 15, 2026 23:21
@huangzhen1997 huangzhen1997 marked this pull request as ready for review April 15, 2026 23:47
@huangzhen1997 huangzhen1997 changed the title Implement serialize extra args svmv1 for evm devenv Solana devenv support Apr 16, 2026
@huangzhen1997 huangzhen1997 changed the title Solana devenv support [DO NOT MERGE] Solana devenv support Apr 16, 2026
@huangzhen1997 huangzhen1997 changed the title [DO NOT MERGE] Solana devenv support Solana devenv support Apr 16, 2026
Comment thread build/devenv/evm/impl.go
}

// SerializeSVMExtraArgs is the Solana family's ExtraArgsSerializer, handling versions 1.
func SerializeSVMExtraArgs(opts cciptestinterfaces.MessageOptions) []byte {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is 1.6 though, right? From 2.0 onwards the extra args are encoded by the destination chain format

Copy link
Copy Markdown
Contributor Author

@huangzhen1997 huangzhen1997 Apr 16, 2026

Choose a reason for hiding this comment

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

Ideally yes, but devenv uses these chain-family serializer registries, it needs to be abi encoded otherwise fq cannot decode it. I spoke to Terry, the Devenv is still evolving, and this is just for unblocking us. CC @tt-cll

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.

I think ideally the registration we're doing above happens in the integrating repo, Solana in this instance.

cciptestinterfaces.RegisterExtraArgsSerializer(chainsel.FamilySolana, SerializeSVMExtraArgs)

That repo impl would return something to the EVM (or whoever calls it) like a byte array and anything else required for serialization to occur. fyi @winder @makramkd

Comment thread build/devenv/evm/impl.go
@huangzhen1997 huangzhen1997 force-pushed the jh/implement-serializeExtraArgsSVMV1-for-evm-devenv branch from 444bfbf to dc8bdd1 Compare April 16, 2026 15:57
Comment thread build/devenv/cciptestinterfaces/interface.go Outdated
@huangzhen1997 huangzhen1997 force-pushed the jh/implement-serializeExtraArgsSVMV1-for-evm-devenv branch 2 times, most recently from c7c32e8 to dc8bdd1 Compare April 16, 2026 18:55
@huangzhen1997 huangzhen1997 requested a review from tt-cll April 16, 2026 20:01
Comment thread build/devenv/evm/impl.go
{Name: "accounts", Type: "bytes32[]"},
})
if err != nil {
panic(fmt.Sprintf("failed to create SVMExtraArgsV1 tuple type: %v", err))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we not panic here? I don't see a clear path to adding test, asserting valid/intended errors from upstream caller

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is supposed to be running in devenv test via a call with SendMessage. And that's the pattern with all other serialize functions

Comment thread build/devenv/environment.go Outdated
Comment on lines +2302 to +2311
// filterOutputsByFamily returns only the blockchain outputs matching the given chain family.
func filterOutputsByFamily(outputs []*blockchain.Output, family string) []*blockchain.Output {
var filtered []*blockchain.Output
for _, out := range outputs {
if out.Family == family {
filtered = append(filtered, out)
}
}
return filtered
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be necessary, you can filter in the implementation and the GenericConfig object has a helper for that:

@github-actions
Copy link
Copy Markdown

Code coverage report:

Package main jh/implement-serializeExtraArgsSVMV1-for-evm-devenv diff
github.com/smartcontractkit/chainlink-ccv/aggregator 48.45% 48.46% +0.01%
github.com/smartcontractkit/chainlink-ccv/bootstrap 42.60% 42.60% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 50.74% 50.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.74% 45.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 37.55% 37.51% -0.04%
github.com/smartcontractkit/chainlink-ccv/integration 47.78% 47.78% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 65.19% 65.19% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 32.56% 32.55% -0.01%

Copy link
Copy Markdown
Collaborator

@winder winder left a comment

Choose a reason for hiding this comment

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

lgtm

@huangzhen1997 huangzhen1997 added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit 7e27596 Apr 21, 2026
29 of 30 checks passed
@huangzhen1997 huangzhen1997 deleted the jh/implement-serializeExtraArgsSVMV1-for-evm-devenv branch April 21, 2026 16:29
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.

7 participants