Skip to content

[DO NOT MERGE] Disable Solana non-LOOP mode #22139

Open
huangzhen1997 wants to merge 22 commits intodevelopfrom
jh/disable-solana-non-loop-mode
Open

[DO NOT MERGE] Disable Solana non-LOOP mode #22139
huangzhen1997 wants to merge 22 commits intodevelopfrom
jh/disable-solana-non-loop-mode

Conversation

@huangzhen1997
Copy link
Copy Markdown
Contributor

@huangzhen1997 huangzhen1997 commented Apr 22, 2026

Jira: https://smartcontract-it.atlassian.net/browse/NONEVM-4683

Prerequisite: Chainlink-solana raw config smartcontractkit/chainlink-solana#1541

Similar to Cosmos/Starnet transformation, Solana now will run exclusively as a LOOP plugin, matching every other non-EVM chain in the codebase.

  • NewSolana drops the non-LOOP mode fallback. It now resolves the plugin command like every other LOOP relayer
    (cmp.Or(env.SolanaPlugin.Cmd.Get(), env.SolanaPlugin.CmdDefault)) and fails fast if empty. There's a next step to refactor the solana config so we can invoke NewLOOPRelayer directly, and remove Solana codec by importing from chainlink-solana
  • Test refactors:
    • Solana-specific tests (CLI, HTTP controllers, replay) moved behind //go:build integration, as they need the relayer binary. Placed alongside other LOOP-only nonEVM family.
    • Deleted testdata/scripts/health/multi-chain.txtar, it was the embedded variant of multi-chain-loopp.txtar, which already covers the LOOP case.
    • TestCoreRelayerChainInteroperators skips Solana the same way it already skipped Aptos/Tron/TON/Sui, since LOOP-only chains aren't exercised at this level.

Copilot AI review requested due to automatic review settings April 22, 2026 21:06
@huangzhen1997 huangzhen1997 requested review from a team as code owners April 22, 2026 21:06
@github-actions
Copy link
Copy Markdown
Contributor

👋 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!

@huangzhen1997 huangzhen1997 changed the title step 1, remove option for non-LOOP mode Remove option for non-LOOP mode Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

✅ No conflicts with other open PRs targeting develop

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

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

Risk Rating: HIGH — changes the Solana relayer instantiation path in a core factory and removes the embedded (non-LOOP) fallback, which can materially affect runtime behavior and deploy configuration expectations.

This PR removes the ability to run Solana in embedded (non-LOOP) mode and updates the relayer factory to always create Solana relayers via a LOOP plugin.

Changes:

  • Removes the embedded Solana chain fallback and always constructs a LOOP relayer for each enabled Solana chain.
  • Hardcodes the Solana plugin command to chainlink-solana and keeps env-file parsing for plugin env vars.

Human review focus:

  • Configuration/feature-gating implications of ignoring CL_SOLANA_CMD (and consistency with other Solana plugin “supported” checks).
  • Runtime behavior when the chainlink-solana binary is not present or when env-file settings differ across deployments.

Comment thread core/services/chainlink/relayer_factory.go Outdated
Comment thread core/services/chainlink/relayer_factory.go Outdated
Comment thread core/services/chainlink/relayer_factory.go Outdated
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 22, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestConfigPoller The test failed due to an 'underpriced replacement transaction' error during contract deployment, and it was marked as a known flaky test that ran... Logs ↗︎

View Full Report ↗︎Docs

@huangzhen1997 huangzhen1997 changed the title Remove option for non-LOOP mode Disable Solana non-LOOP mode Apr 22, 2026
@huangzhen1997 huangzhen1997 marked this pull request as draft April 22, 2026 21:28
@huangzhen1997 huangzhen1997 requested a review from archseer April 23, 2026 01:39
-- -v -run "Test_CCIPMessaging_EVM2EVM" -timeout 18m -count=1 -parallel=4 ./smoke/ccip
test_go_project_path: integration-tests

- id: smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_EVM2Solana
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.

Remove the NON-LOOP in-process Solana e2e testcase. The LOOP supported is kept below.

assertTableRenders(t, r)
}

func TestShell_IndexSolanaChains(t *testing.T) {
Copy link
Copy Markdown
Contributor Author

@huangzhen1997 huangzhen1997 Apr 24, 2026

Choose a reason for hiding this comment

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

Moved to a different file core/cmd/chains_commands_integration_test.go where we run it with //go:build integration to enable LOOP

assert.Contains(t, renderLines[14], n2.State)
}

func solanaStartNewApplication(t *testing.T, cfgs ...*solcfg.TOMLConfig) *cltest.TestApplication {
Copy link
Copy Markdown
Contributor Author

@huangzhen1997 huangzhen1997 Apr 24, 2026

Choose a reason for hiding this comment

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

Same as here. Moved to core/cmd/node_commands_integration_test.go.

}
}

func Test_SolanaChainsController_Show(t *testing.T) {
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.

Same idea, moved to different file to run with LOOP

@huangzhen1997 huangzhen1997 changed the title Disable Solana non-LOOP mode Disable Solana non-LOOP mode Apr 24, 2026
@@ -0,0 +1,33 @@
//go:build integration

package cmd_test
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.

Moved from core/cmd/blocks_commands_test.go

assertTableRenders(t, r)
}

func TestShell_IndexSolanaChains(t *testing.T) {
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.

Moved from core/cmd/shell_remote_test.go

@huangzhen1997
Copy link
Copy Markdown
Contributor Author

Is the config the only remaining source of solana imports? Rather than Ton, consider using starknet or cosmos for inspiration, since they went through the same transformation, while Ton was never embedded.

Besides solana config, I have another branch in progress that removes the codec in core and import it from chain specific repo, like TON does.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

CORA - Pending Reviewers

Codeowners Entry Overall Num Files Owners
* 💬 33 @smartcontractkit/foundations, @smartcontractkit/core
/core/capabilities/ccip/ccipsolana/ 💬 1 @smartcontractkit/bix-build
/core/web/resolver/ 💬 3 @smartcontractkit/foundations, @smartcontractkit/core
/deployment/ 💬 1 @smartcontractkit/ccip-tooling, @smartcontractkit/ccip-offchain, @smartcontractkit/keystone, @smartcontractkit/operations-platform, @smartcontractkit/core
/.github/** 💬 1 @smartcontractkit/devex-cicd, @smartcontractkit/devex-tooling, @smartcontractkit/core
go.mod 💬 6 @smartcontractkit/core, @smartcontractkit/foundations
go.sum 💬 6 @smartcontractkit/core, @smartcontractkit/foundations
integration-tests/go.mod 💬 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations
integration-tests/go.sum 💬 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations

Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown

For more details, see the full review summary.

@huangzhen1997 huangzhen1997 requested a review from a team as a code owner April 26, 2026 16:09
@huangzhen1997 huangzhen1997 changed the title Disable Solana non-LOOP mode [DO NOT MERGE] Disable Solana non-LOOP mode Apr 26, 2026
@cl-sonarqube-production
Copy link
Copy Markdown

test_go_project_path: integration-tests
install_plugins_public: true
test_env_vars:
CL_SOLANA_CMD: chainlink-solana
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.

NewLOOPRelayer() now uses plugin default value

ChainRW: ChainRWProvider{},
ExtraDataCodec: ExtraDataDecoder{},
PriceOnlyCommitFn: consts.MethodCommitPriceOnly,
CCIPProviderSupported: env.SolanaPlugin.Cmd.Get() != "",
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.

LOOP mode only, so CCIP provide always supported

--format=github-actions \
-- -v -run "^TestRMNCurse$" -timeout 20m -count=1 -parallel=4 smoke/ccip/ccip_cs_rmn_curse_uncurse_test.go
test_go_project_path: integration-tests
install_plugins_public: true
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.

Is this really necessary? It's testing against EVM?

--format=github-actions \
-- -v -run "^TestRMNCurseIdempotent$" -timeout 20m -count=1 -parallel=4 smoke/ccip/ccip_cs_rmn_curse_uncurse_test.go
test_go_project_path: integration-tests
install_plugins_public: true
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.

Same for all these other tests

Comment thread core/cmd/shell_test.go
lggr := logger.TestLogger(t)
reg := plugins.NewTestLoopRegistry(lggr)
ks := &keystore.StarknetLooppSigner{StarkNet: mocks.NewStarkNet(t)}
ks := &keystore.SolanaLooppSigner{Solana: mocks.NewSolana(t)}
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.

Nice catch :)

@@ -619,78 +619,78 @@ HTTPURL = 'http://broadcast.mirror'
SendOnly = true

[[Solana]]
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.

Hmm why are all these configs changed?

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.

4 participants