Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for solana on home chain #15826

Draft
wants to merge 7 commits into
base: yn-solana
Choose a base branch
from
Draft

add support for solana on home chain #15826

wants to merge 7 commits into from

Conversation

tt-cll
Copy link

@tt-cll tt-cll commented Jan 2, 2025

Copy link
Contributor

github-actions bot commented Jan 2, 2025

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , GolangCI Lint (deployment) , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , test-scripts , lint , SonarQube Scan

1. Race condition detected in tests: [Core Tests (go_core_race_tests)]

Source of Error:
Run tests	2025-01-03T19:03:21.0365254Z + echo 'Race(s) detected'
Run tests	2025-01-03T19:03:21.0365824Z Race(s) detected
Run tests	2025-01-03T19:03:21.0366340Z + exit 1
Run tests	2025-01-03T19:03:21.0383500Z ##[error]Process completed with exit code 1.
**Why**: The Go tests detected race conditions, which occur when multiple threads access shared data concurrently and at least one thread modifies the data.

Suggested fix: Use synchronization mechanisms like mutexes or channels to ensure that shared data is accessed in a thread-safe manner.

2. Not enough arguments in call to deployment.NewEnvironment: [GolangCI Lint (deployment)]

Source of Error:
Golang Lint (deployment)	2025-01-03T19:01:04.7209941Z ##[error]environment/crib/types.go:37:59: not enough arguments in call to deployment.NewEnvironment
Golang Lint (deployment)	2025-01-03T19:01:04.7212378Z 	have (string, "github.com/smartcontractkit/chainlink-common/pkg/logger".Logger, "github.com/smartcontractkit/chainlink/deployment".AddressBook, map[uint64]"github.com/smartcontractkit/chainlink/deployment".Chain, []string, nil, func() "context".Context, "github.com/smartcontractkit/chainlink/deployment".OCRSecrets)
Golang Lint (deployment)	2025-01-03T19:01:04.7216816Z 	want (string, "github.com/smartcontractkit/chainlink-common/pkg/logger".Logger, "github.com/smartcontractkit/chainlink/deployment".AddressBook, map[uint64]"github.com/smartcontractkit/chainlink/deployment".Chain, map[uint64]"github.com/smartcontractkit/chainlink/deployment".SolChain, []string, "github.com/smartcontractkit/chainlink/deployment".OffchainClient, func() "context".Context, "github.com/smartcontractkit/chainlink/deployment".OCRSecrets) (typecheck)
**Why**: The function `deployment.NewEnvironment` is called with fewer arguments than required. The function signature has changed, and the call sites need to be updated accordingly.

Suggested fix: Update the call to deployment.NewEnvironment to include all required arguments as per the new function signature.

3. Unable to bind faucet to address: [Core Tests (go_core_ccip_deployment_tests)]

Source of Error:
Run tests	2025-01-03T19:02:18.4064466Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
Run tests	2025-01-03T19:02:18.4114386Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
Run tests	2025-01-03T19:02:18.4164911Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
Run tests	2025-01-03T19:02:18.4212383Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
Run tests	2025-01-03T19:02:18.4281318Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
Run tests	2025-01-03T19:02:18.4368248Z chain.go:126: solana-test-validator
Run tests	2025-01-03T19:02:18.4369118Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
Run tests	2025-01-03T19:02:18.8416917Z stdout: Error: failed to start faucet: Unable to bind faucet to 0.0.0.0:8877, check the address is not already in use: Address already in use (os error 98)
**Why**: The faucet service is trying to bind to a port that is already in use, causing the tests to fail.

Suggested fix: Ensure that the port 8877 is free before running the tests. Alternatively, configure the faucet to use a different port that is not in use.

4. Updates to go.mod needed: [Clean Go Tidy & Generate]

Source of Error:
make generate	2025-01-03T19:06:38.0554469Z 	go: updates to go.mod needed; to update it:
make generate	2025-01-03T19:06:38.0554723Z 		go mod tidy
make generate	2025-01-03T19:06:38.0554918Z 	error: exit status 1
make generate	2025-01-03T19:06:38.0790316Z 	go: updates to go.mod needed; to update it:
make generate	2025-01-03T19:06:38.0790397Z 		go mod tidy
make generate	2025-01-03T19:06:38.0790490Z 	error: exit status 1
**Why**: The `go.mod` file is not up-to-date, and the `go mod tidy` command needs to be run to update it.

Suggested fix: Run go mod tidy to update the go.mod file and ensure all dependencies are correctly listed.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit


// ValidateState validates the state of the CCIP deployment
func (s CCIPOnChainState) ValidateState(chainSelector uint64) error {
if deployment.IsSolanaChainFamily(chainSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe just inline this and use switch/case? We'll be adding more conditionals here as chains are added

Copy link
Author

Choose a reason for hiding this comment

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

yeah good idea

@tt-cll tt-cll changed the base branch from develop to yn-solana January 3, 2025 17:30
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

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

See analysis details on SonarQube

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