Skip to content

use common instead of chainlink-solana#18377

Draft
jmank88 wants to merge 1 commit intodevelopfrom
pkg/types/solana
Draft

use common instead of chainlink-solana#18377
jmank88 wants to merge 1 commit intodevelopfrom
pkg/types/solana

Conversation

@jmank88
Copy link
Contributor

@jmank88 jmank88 commented Jun 28, 2025

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
16.6% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset 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.

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
20.4% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube

@github-actions
Copy link
Contributor

This PR is stale because it has been open days with no activity.
Remove the stale label, comment, or update this PR to prevent this PR from being closed in days.

@github-actions github-actions bot added the Stale label Oct 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

This PR has been automatically closed because it had been stale for > days.
If you wish to continue working on this PR, please reopen it to make any necessary changes.

@github-actions github-actions bot closed this Nov 2, 2025
@github-actions github-actions bot deleted the pkg/types/solana branch November 2, 2025 00:20
@jmank88 jmank88 restored the pkg/types/solana branch November 2, 2025 00:31
@jmank88 jmank88 reopened this Nov 2, 2025
@jmank88 jmank88 removed the Stale label Nov 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2025

CORA - Pending Reviewers

Codeowners Entry Overall Num Files Owners
* 1 @smartcontractkit/foundations, @smartcontractkit/core
/core/capabilities/ccip 2 @smartcontractkit/ccip-offchain
/core/capabilities/ccip/ccipsolana 1 @smartcontractkit/bix-build
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.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Solana Test Helper Update

Affected failures:

  1. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_Solana2EVM
  2. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_Solana2EVM_LOOPP
  3. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_token_transfer_test.go:*_LOOPP
  4. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_token_transfer_test.go:*
  5. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_EVM2Solana

What Broke

The updated chainlink-solana and chainlink-common dependencies, along with refactored Solana configuration types, have introduced incompatibilities and outdated type usage in the Solana test helpers (deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go). This prevents Solana log filters from being successfully registered or detected, leading to test timeouts and failures in event filter registration mechanisms.

Proposed Fixes

Update Solana test helpers to align with refactored chainlink-solana and chainlink-common dependencies. Map generic event names to chain-specific Solana names, use correct program IDs for event filter registration, replace outdated commitment types, and remove obsolete global variable assignments.

In test_helpers_solana_v0_1_0.go:219

 		return fmt.Errorf("failed to find event with name %s in onramp or offramp ABIs", eventName)
 	case chainsel.FamilySolana:
+ 		// Map the generic event name to the chain-specific name for Solana
+ 		switch eventName {
+ 		case consts.EventNameCCIPMessageSent:
+ 			eventID = "CcipCctpMessageSentEvent"
+ 		case consts.EventNameCommitReportAccepted:
+ 			eventID = "CommitReportAccepted"
+ 		case consts.EventNameExecutionStateChanged:
+ 			eventID = consts.EventNameExecutionStateChanged
+ 		default:
+ 			eventID = eventName
+ 		}
- 		eventID = eventName
 	case chainsel.FamilyTon:
 		eventID = eventName

In test_helpers_solana_v0_1_0.go:255

- 	onRampAddr, err := onchainState.GetOnRampAddressBytes(sourceChainSel)
+ 	onRampProgramID := solutils.GetProgramID(solutils.ProgCCIPRouter)
 	require.NoError(t, err)
 	// Ensure CCIPMessageSent event filter is registered
 	// Sending message too early could result in LogPoller missing the send event
- 	err = WaitForEventFilterRegistration(t, onchainClient, sourceChainSel, consts.EventNameCCIPMessageSent, onRampAddr)
+ 	err = WaitForEventFilterRegistration(t, onchainClient, sourceChainSel, consts.EventNameCCIPMessageSent, onRampProgramID.Bytes())
 	require.NoError(t, err)
 	// Ensure CommitReportAccepted and ExecutionStateChanged event filters are registered for the offramp
 	// The LogPoller could pick up the message sent event but miss the commit or execute event
- 	offRampAddr, err := onchainState.GetOffRampAddressBytes(destChainSel)
+ 	offRampProgramID := solutils.GetProgramID(solutils.ProgCCIPOfframp)
 	require.NoError(t, err)
- 	err = WaitForEventFilterRegistration(t, onchainClient, destChainSel, consts.EventNameCommitReportAccepted, offRampAddr)
+ 	err = WaitForEventFilterRegistration(t, onchainClient, destChainSel, consts.EventNameCommitReportAccepted, offRampProgramID.Bytes())
 	require.NoError(t, err)
- 	err = WaitForEventFilterRegistration(t, onchainClient, destChainSel, consts.EventNameExecutionStateChanged, offRampAddr)
+ 	err = WaitForEventFilterRegistration(t, onchainClient, destChainSel, consts.EventNameExecutionStateChanged, offRampProgramID.Bytes())
 	require.NoError(t, err)

In test_helpers_solana_v0_1_0.go:81

- 	solconfig "github.com/smartcontractkit/chainlink-ccip/chains/solana/contracts/tests/config"

In test_helpers_solana_v0_1_0.go:322

- 		return env.BlockChains.SolanaChains()[chainSelector].Client.GetSlot(ctx, solconfig.DefaultCommitment)
+ 		return env.BlockChains.SolanaChains()[chainSelector].Client.GetSlot(ctx, rpc.Confirmed)

In test_helpers_solana_v0_1_0.go:723

- 	// set config.FeeQuoterProgram and CcipRouterProgram since they point to wrong addresses
- 	solconfig.FeeQuoterProgram = s.FeeQuoter
- 	solconfig.CcipRouterProgram = s.Router

In test_helpers_solana_v0_1_0.go:758

- 	err = solcommon.GetAccountDataBorshInto(ctx, client, tokenPool.AdminRegistryPDA, solconfig.DefaultCommitment, &tokenAdminRegistry)
+ 	err = solcommon.GetAccountDataBorshInto(ctx, client, tokenPool.AdminRegistryPDA, rpc.Confirmed, &tokenAdminRegistry)

In test_helpers_solana_v0_1_0.go:811

- 	result, err := solcommon.SendAndConfirmWithLookupTables(ctx, client, ixs, *sender, solconfig.DefaultCommitment, addressTables, solcommon.AddComputeUnitLimit(400_000))
+ 	result, err := solcommon.SendAndConfirmWithLookupTables(ctx, client, ixs, *sender, rpc.Confirmed, addressTables, solcommon.AddComputeUnitLimit(400_000))

In test_helpers_solana_v0_1_0.go:2276

- 		_, balance, berr := soltokens.TokenBalance(ctx, chain.Client, receiver, solconfig.DefaultCommitment)
+ 		_, balance, berr := soltokens.TokenBalance(ctx, chain.Client, receiver, rpc.Confirmed)
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix gwPToqLf to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from gwPToqLf to get started.

Tip

Get Better Results: This CI job is not uploading test reports. Adding structured test reports enables more precise, test-level analysis with better root cause identification and more targeted fix recommendations.
👉🏻 Learn how to upload test results.

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
37.2% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Unrelated Failure

Affected failures:

  1. Workflow Run: Integration Tests

What Broke

The root cause is an incompatibility arising from the refactoring of Solana-related types and the update of the chainlink-solana dependency. This change in underlying types likely led to runtime errors during integration tests, resulting in a generic exit code 1.

Autofix Options

You can use our MCP server to get AI assistance with debugging and fixing these failures.

  • Use MCP in your IDE to debug the issue. Try Help me fix CI failures from iwidYn7h to get started.

Tip

Get Better Results: This CI job is not uploading test reports. Adding structured test reports enables more precise, test-level analysis with better root cause identification and more targeted fix recommendations.
👉🏻 Learn how to upload test results.

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Solana Contract Reader Misconfiguration

Affected failures:

  1. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_EVM2Solana_LOOPP

What Broke

The refactoring of Solana type imports in the contract reader configurations prevented the correct registration of event filters by the offchain client.

Proposed Fixes

Revert a typo in a commented-out line in core/capabilities/ccip/configs/solana/contract_reader.go related to OCR3 configuration, and run go mod tidy in the core directory to ensure correct dependency resolution.

go mod tidy

In contract_reader.go:130

- 						// 	&codec.ByteToBooleanModifierConfig{Fields: []string{"Ocrtypes.ConfigInfo.IsSignatureVerificationEnabled"}},
+ 						// 	&codec.ByteToBooleanModifierConfig{Fields: []string{"OcrConfig.ConfigInfo.IsSignatureVerificationEnabled"}},
Autofix Options

You can use our MCP server to get AI assistance with debugging and fixing these failures.

  • Use MCP in your IDE to debug the issue. Try Help me fix CI failures from dAQvMYfM to get started.

View all test uploads

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.

1 participant