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

Dual transmission key protection #15969

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

george-dorin
Copy link
Contributor

@george-dorin george-dorin commented Jan 17, 2025

This PR enhances the ETH keystore by adding tags to prevent address sharing between TXMv1 and TXMv2, avoiding nonce sync issues. This is a temporary fix until the full switch to TXMv2.

  • Added tagging functionality to the keystore.
  • Ensured unique addresses for TXMv1 and TXMv2.

-Check primary/secondary addresses
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.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

Copy link
Contributor

AER Report: CI Core

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

1. Key not found error: go_core_tests_integration

Source of Error:
Run tests	2025-01-17T15:09:10.6154004Z logger.go:146: 2025-01-17T15:08:20.180Z	ERROR	oracle_mercury0.JobSpawner	job/spawner.go:258	Error creating job	{"version": "unset@unset", "type": "offchainreporting2", "err": "CreateJobFailed: Key not found", "errVerbose": "Key not found\ngithub.com/smartcontractkit/chainlink/v2/core/services/keystore.init\n\t<autogenerated>:1\nruntime.doInit1\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7290\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7257\nruntime.main\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:254\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700\nCreateJobFailed\ngithub.com/smartcontractkit/chainlink/v2/core/services/job.(*orm).CreateJob\n\t/home/runner/work/chainlink/chainlink/core/services/job/orm.go:531\ngithub.com/smartcontractkit/chainlink/v2/core/services/job.(*spawner).CreateJob\n\t/home/runner/work/chainlink/chainlink/core/services/job/spawner.go:256\ngithub.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*ChainlinkApplication).AddJobV2\n\t/home/runner/work/chainlink/chainlink/core/services/chainlink/application.go:972\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.(*Node).AddJob\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:144\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.addV1MercuryJob\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:257\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.integration_MercuryV1\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:278\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.TestIntegration_MercuryV1\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:143\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700"}
Run tests	2025-01-17T15:09:10.6166160Z 	 	Key not found
Run tests	2025-01-17T15:09:10.6166843Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/keystore.init
Run tests	2025-01-17T15:09:10.6167123Z 	 		<autogenerated>:1
Run tests	2025-01-17T15:09:10.6167395Z 	 	runtime.doInit1
Run tests	2025-01-17T15:09:10.6168055Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7290
Run tests	2025-01-17T15:09:10.6168302Z 	 	runtime.doInit
Run tests	2025-01-17T15:09:10.6168951Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7257
Run tests	2025-01-17T15:09:10.6169193Z 	 	runtime.main
Run tests	2025-01-17T15:09:10.6169829Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:254
Run tests	2025-01-17T15:09:10.6170091Z 	 	runtime.goexit
Run tests	2025-01-17T15:09:10.6170722Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700
Run tests	2025-01-17T15:09:10.6170982Z 	 	CreateJobFailed
Run tests	2025-01-17T15:09:10.6171702Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/job.(*orm).CreateJob
Run tests	2025-01-17T15:09:10.6172433Z 	 		/home/runner/work/chainlink/chainlink/core/services/job/orm.go:531
Run tests	2025-01-17T15:09:10.6173191Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/job.(*spawner).CreateJob
Run tests	2025-01-17T15:09:10.6173933Z 	 		/home/runner/work/chainlink/chainlink/core/services/job/spawner.go:256
Run tests	2025-01-17T15:09:10.6174844Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*ChainlinkApplication).AddJobV2
Run tests	2025-01-17T15:09:10.6175680Z 	 		/home/runner/work/chainlink/chainlink/core/services/chainlink/application.go:972
Run tests	2025-01-17T15:09:10.6176594Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.(*Node).AddJob
Run tests	2025-01-17T15:09:10.6177543Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:144
Run tests	2025-01-17T15:09:10.6178444Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.addV1MercuryJob
Run tests	2025-01-17T15:09:10.6179393Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:257
Run tests	2025-01-17T15:09:10.6180364Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.integration_MercuryV1
Run tests	2025-01-17T15:09:10.6181349Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:278
Run tests	2025-01-17T15:09:10.6182357Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.TestIntegration_MercuryV1
Run tests	2025-01-17T15:09:10.6183512Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:143
Run tests	2025-01-17T15:09:10.6183779Z 	 	testing.tRunner
Run tests	2025-01-17T15:09:10.6184452Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690
Run tests	2025-01-17T15:09:10.6184716Z 	 	runtime.goexit
Run tests	2025-01-17T15:09:10.6185346Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700
Run tests	2025-01-17T15:09:10.6185588Z 	Test: 	TestIntegration_MercuryV1

Why: The error indicates that a required key was not found in the keystore during the job creation process. This could be due to missing or improperly configured keys in the keystore.

Suggested fix: Ensure that all necessary keys are correctly added to the keystore before running the tests. Verify the keystore configuration and ensure that the keys are accessible.

2. Key not found error: go_core_tests

Source of Error:
Run tests	2025-01-17T15:13:08.2446131Z logger.go:146: 2025-01-17T15:10:19.724Z	ERROR	oracle_mercury0.JobSpawner	job/spawner.go:258	Error creating job	{"version": "unset@unset", "type": "offchainreporting2", "err": "CreateJobFailed: Key not found", "errVerbose": "Key not found\ngithub.com/smartcontractkit/chainlink/v2/core/services/keystore.init\n\t<autogenerated>:1\nruntime.doInit1\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7290\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7257\nruntime.main\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:254\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700\nCreateJobFailed\ngithub.com/smartcontractkit/chainlink/v2/core/services/job.(*orm).CreateJob\n\t/home/runner/work/chainlink/chainlink/core/services/job/orm.go:531\ngithub.com/smartcontractkit/chainlink/v2/core/services/job.(*spawner).CreateJob\n\t/home/runner/work/chainlink/chainlink/core/services/job/spawner.go:256\ngithub.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*ChainlinkApplication).AddJobV2\n\t/home/runner/work/chainlink/chainlink/core/services/chainlink/application.go:972\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.(*Node).AddJob\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:144\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.addV2MercuryJob\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:338\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.integration_MercuryV2\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:633\ngithub.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.TestIntegration_MercuryV2\n\t/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:491\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700"}
Run tests	2025-01-17T15:13:08.2457766Z 	 	Key not found
Run tests	2025-01-17T15:13:08.2458398Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/keystore.init
Run tests	2025-01-17T15:13:08.2458820Z 	 		<autogenerated>:1
Run tests	2025-01-17T15:13:08.2459073Z 	 	runtime.doInit1
Run tests	2025-01-17T15:13:08.2459696Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7290
Run tests	2025-01-17T15:13:08.2459932Z 	 	runtime.doInit
Run tests	2025-01-17T15:13:08.2460550Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:7257
Run tests	2025-01-17T15:13:08.2460785Z 	 	runtime.main
Run tests	2025-01-17T15:13:08.2461386Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/proc.go:254
Run tests	2025-01-17T15:13:08.2461623Z 	 	runtime.goexit
Run tests	2025-01-17T15:13:08.2462222Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700
Run tests	2025-01-17T15:13:08.2462469Z 	 	CreateJobFailed
Run tests	2025-01-17T15:13:08.2463153Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/job.(*orm).CreateJob
Run tests	2025-01-17T15:13:08.2463866Z 	 		/home/runner/work/chainlink/chainlink/core/services/job/orm.go:531
Run tests	2025-01-17T15:13:08.2464585Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/job.(*spawner).CreateJob
Run tests	2025-01-17T15:13:08.2465294Z 	 		/home/runner/work/chainlink/chainlink/core/services/job/spawner.go:256
Run tests	2025-01-17T15:13:08.2466162Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*ChainlinkApplication).AddJobV2
Run tests	2025-01-17T15:13:08.2466956Z 	 		/home/runner/work/chainlink/chainlink/core/services/chainlink/application.go:972
Run tests	2025-01-17T15:13:08.2467814Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.(*Node).AddJob
Run tests	2025-01-17T15:13:08.2468711Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:144
Run tests	2025-01-17T15:13:08.2469568Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.addV2MercuryJob
Run tests	2025-01-17T15:13:08.2470471Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/helpers_test.go:338
Run tests	2025-01-17T15:13:08.2471394Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.integration_MercuryV2
Run tests	2025-01-17T15:13:08.2472341Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:633
Run tests	2025-01-17T15:13:08.2473453Z 	 	github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury_test.TestIntegration_MercuryV2
Run tests	2025-01-17T15:13:08.2474405Z 	 		/home/runner/work/chainlink/chainlink/core/services/ocr2/plugins/mercury/integration_test.go:491
Run tests	2025-01-17T15:13:08.2474655Z 	 	testing.tRunner
Run tests	2025-01-17T15:13:08.2475299Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690
Run tests	2025-01-17T15:13:08.2475551Z 	 	runtime.goexit
Run tests	2025-01-17T15:13:08.2476151Z 	 		/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/asm_amd64.s:1700
Run tests	2025-01-17T15:13:08.2476381Z 	Test: 	TestIntegration_MercuryV2

Why: Similar to the previous error, this indicates that a required key was not found in the keystore during the job creation process. This could be due to missing or improperly configured keys in the keystore.

Suggested fix: Ensure that all necessary keys are correctly added to the keystore before running the tests. Verify the keystore configuration and

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