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

Initial helpers for RMN in crib #16258

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from
Draft

Initial helpers for RMN in crib #16258

wants to merge 15 commits into from

Conversation

carte7000
Copy link
Contributor

This PR is done in the scope of chaos and load test for CCIP 1.6.

It adds utilities to create RMN nodes keystores and group all necessary changeset to make active on a CCIP environment

How to use

  1. You need to create your CCIP environment as usual.
  2. You need to create identities for each RMN node you are planning

Example assuming 3 nodes

rmnNodes, err := GenerateRMNNodeIdentities(3)

rmnNodes will contain the rawKeystore file for both rageproxy and afn2proxy that you can reuse when spinning up the containers in crib

  1. Once you have your node identities you can configure the onchain state by using SetupRMNNodeOnAllChains

Note: Later on in crib you will also need a shared.toml for the afn2proxy, this file can be generated automatically by using this command or at least replicate the logic in there

Copy link
Contributor

github-actions bot commented Feb 6, 2025

AER Report: CI Core

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

1. Linting issues found in code: Golang Lint (deployment)

Source of Error:
Golang Lint (deployment)	2025-03-12T08:41:10.4525849Z ##[error]deployment/environment/devenv/rmn.go:163:120: confusing-results: unnamed results of the same type may be confusing, consider using named results (revive)
Golang Lint (deployment)	2025-03-12T08:41:10.4527729Z func GeneratePeerID(lggr zerolog.Logger, image string, version string, imagePlatform string) (p2ptypes.PeerID, string, string, error) {
Golang Lint (deployment)	2025-03-12T08:41:10.4531284Z ^
Golang Lint (deployment)	2025-03-12T08:41:10.4533164Z ##[error]deployment/environment/crib/ccip_deployer.go:653:10: var-naming: range var subChainId should be subChainID (revive)
Golang Lint (deployment)	2025-03-12T08:41:10.4534318Z 		for _, subChainId := range allChains {
Golang Lint (deployment)	2025-03-12T08:41:10.4534885Z 		 ^
Golang Lint (deployment)	2025-03-12T08:41:10.4535124Z 
Golang Lint (deployment)	2025-03-12T08:41:10.4548670Z ##[error]issues found

Why: The errors are due to code style issues detected by the revive linter. The first error is about unnamed results of the same type, which can be confusing. The second error is about improper variable naming conventions.

Suggested fix: Refactor the code to use named results for clarity and follow proper variable naming conventions (e.g., use subChainID instead of subChainId).

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit


allChains := e.AllChainSelectors()
rmnRemoteConfig := make(map[uint64]changeset.RMNRemoteConfig)
for _, chain := range allChains {
Copy link
Contributor

Choose a reason for hiding this comment

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

rather than creating a single changeset to apply all chains, we should create a changeset per chain

This should improve the deployment speed when running load tests on 30+chains

// Copy the file from container
reader, err := container.CopyFileFromContainer(context.Background(), "/app/"+RMNKeyStore)
if err != nil {
log.Fatalf("Failed to copy file: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

other than this CI error and the comment above, lgtm

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.

3 participants