Skip to content

[PRODCRE-1747] Enable importing keystorelib keys#20996

Open
cedric-cordenier wants to merge 2 commits intodevelopfrom
import-keystore-keys
Open

[PRODCRE-1747] Enable importing keystorelib keys#20996
cedric-cordenier wants to merge 2 commits intodevelopfrom
import-keystore-keys

Conversation

@cedric-cordenier
Copy link
Contributor

Requires

Supports

@cedric-cordenier cedric-cordenier requested review from a team as code owners February 2, 2026 14:26
Copilot AI review requested due to automatic review settings February 2, 2026 14:26
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

👋 cedric-cordenier, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements backward compatibility support for importing CSA and OCR2 keys from the chainlink-common keystore library format into the core Chainlink keystore.

Changes:

  • Added support for importing CSA and OCR2 keys from the chainlink-common keystore format
  • Refactored key import logic to use a generic helper function
  • Extended configuration types to support CSA and OCR2 key import

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
core/services/keystore/ocr2_test.go Added test verifying OCR2 key import compatibility with chainlink-common keystore
core/services/keystore/keys/ocr2key/export.go Enhanced OCR2 key import to support both chainlink-common and legacy formats
core/services/keystore/keys/csakey/export.go Enhanced CSA key import to support both chainlink-common and legacy formats
core/services/keystore/csa_test.go Added test verifying CSA key import compatibility with chainlink-common keystore
core/services/chainlink/types.go Extended interface with methods for importing CSA and OCR2 keys
core/services/chainlink/mocks/general_config.go Generated mock implementations for new import methods
core/services/chainlink/config_imported_ocr2_key.go Added configuration wrapper for OCR2 key import
core/services/chainlink/config_imported_csa_key.go Added configuration wrapper for CSA key import
core/services/chainlink/config_general.go Implemented methods to access CSA and OCR2 key import configurations
core/config/toml/types.go Added TOML configuration types for CSA and OCR2 key import
core/cmd/shell_local.go Refactored to use generic import helper and added CSA/OCR2 key import during node startup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const keyTypeIdentifier = "CSA"

func FromEncryptedJSON(keyJSON []byte, password string) (KeyV2, error) {
data, err := corekeys.FromEcryptedCSAKey(keyJSON, password)
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

Corrected spelling of 'FromEcryptedCSAKey' to 'FromEncryptedCSAKey'.

Suggested change
data, err := corekeys.FromEcryptedCSAKey(keyJSON, password)
data, err := corekeys.FromEncryptedCSAKey(keyJSON, password)

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

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.

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.

trunk-io[bot]

This comment was marked as outdated.

@cedric-cordenier cedric-cordenier changed the title WIP Enable importing keystorelib keys Feb 2, 2026
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.

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.

@trunk-io
Copy link

trunk-io bot commented Feb 2, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cedric-cordenier cedric-cordenier force-pushed the import-keystore-keys branch 2 times, most recently from 0c55692 to 0696bdd Compare February 3, 2026 13:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

CORA - Analysis Skipped

Reason: The number of code owners (3) is less than the minimum required (5) and/or the number of CODEOWNERS entries with changed files (8) is less than the minimum required (2).

@cedric-cordenier cedric-cordenier force-pushed the import-keystore-keys branch 3 times, most recently from f585531 to 0ff3ed1 Compare February 4, 2026 14:33
@cedric-cordenier cedric-cordenier changed the title Enable importing keystorelib keys [PRODCRE-1747] Enable importing keystorelib keys Feb 4, 2026
@cedric-cordenier cedric-cordenier force-pushed the import-keystore-keys branch 2 times, most recently from c3608c2 to da2addc Compare February 4, 2026 14:48
trunk-io[bot]

This comment was marked as outdated.

jmank88
jmank88 previously approved these changes Feb 4, 2026
MStreet3
MStreet3 previously approved these changes Feb 4, 2026
@cedric-cordenier cedric-cordenier added this pull request to the merge queue Feb 4, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Feb 4, 2026
@cl-sonarqube-production
Copy link

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