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

integrate ctf to spin up inmemory chain #15817

Open
wants to merge 1 commit into
base: yn-solana
Choose a base branch
from

Conversation

jlaveracll
Copy link
Contributor

Requires

Supports

@jlaveracll jlaveracll requested review from a team as code owners December 30, 2024 19:43
@jlaveracll jlaveracll requested review from reductionista and removed request for a team December 30, 2024 19:43
Copy link
Contributor

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Flakeguard Root Project / Get Tests To Run , GolangCI Lint (deployment) , Core Tests (go_core_tests) , test-scripts , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , Flakeguard Deployment Project / Get Tests To Run , Flakeguard Deployment Project / Run Tests , Flakeguard Deployment Project / Report , Flakeguard Root Project / Run Tests , Flakeguard Root Project / Report , lint , SonarQube Scan , Flakey Test Detection

1. Not enough arguments in call to deployment.NewEnvironment:[Golang Lint (deployment)]

Source of Error:
environment/crib/types.go:37:59: not enough arguments in call to deployment.NewEnvironment
	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)
	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 being called with fewer arguments than required. The function signature has changed, and the caller has not been updated to match the new signature.

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

2. Invalid memory address or nil pointer dereference:[Core Tests (go_core_ccip_deployment_tests)]

Source of Error:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x5e4a50a]

github.com/smartcontractkit/chainlink/deployment/environment/memory.solChain(0xc023929040)
	/home/runner/work/chainlink/chainlink/deployment/environment/memory/chain.go:108 +0xea
github.com/smartcontractkit/chainlink/deployment/environment/memory.NewMemoryChainsSol(0xc023929040)
	/home/runner/work/chainlink/chainlink/deployment/environment/memory/environment.go:198 +0x71
github.com/smartcontractkit/chainlink/deployment/environment/memory.NewMemoryEnvironment(_, {_, _}, _, {0x2, 0x0, 0x4, 0x1, {0x0, {0x0, ...}, ...}})
	/home/runner/work/chainlink/chainlink/deployment/environment/memory/environment.go:169 +0xcc
**Why**: The code is attempting to dereference a nil pointer, which indicates that an object was not properly initialized before being used.

Suggested fix: Ensure that all objects are properly initialized before use. Add checks to verify that pointers are not nil before dereferencing them.

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

Source of Error:
go: updates to go.mod needed; to update it:
	go mod tidy
error: exit status 1
**Why**: The `go.mod` file is out of date and needs to be updated to reflect the current dependencies.

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

"--ledger", t.TempDir(),
bcInput := &blockchain.Input{
Type: "solana",
Image: "f4hrenh9it/solana",
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@archseer
Copy link
Contributor

archseer commented Jan 2, 2025

Can we also get rid of this leftover:

func GetSolanaDeployerKey() solana.PrivateKey {
keypairPath := "/Users/yashvardhan/.config/solana/id.json" //wallet
adminPrivateKey, _ := solana.PrivateKeyFromSolanaKeygenFile(keypairPath)
return adminPrivateKey
}

For more examples, the chainlink-solana repo used a hardcoded config + test key and mounted them into the container: https://github.com/smartcontractkit/chainlink-solana/blob/61c33fc0ce3034c08c99d438833228052ed83044/integration-tests/docker/testenv/sol.go#L147-L201

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