[PRODCRE-1746] Move keys from core to corekeys.#1837
Merged
pavel-raykov merged 11 commits intomainfrom Feb 17, 2026
Merged
Conversation
✅ API Diff Results - No breaking changes |
3a55fec to
3565625
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves key-related code from core to corekeys within the chainlink-common repository, reorganizing the keystore structure to support better modularity and reusability. The changes involve moving various key implementations (VRF, workflow, Tron, TON, Sui, Starknet, Solana, P2P, OCR, OCR2, Ethereum, DKG recipient, CSA, Cosmos, and Aptos) into the keystore/corekeys package structure with consistent export/import functionality.
Changes:
- Moved key implementations from core to
keystore/corekeyswith separate subdirectories per key type - Introduced a generic
internal/exportutils.gofor standardized key encryption/decryption - Inlined secp256k1 signature implementation into vrfkey to avoid circular dependencies
- Removed legacy OCR key bundle and CSA key generation code in favor of individual key type implementations
Reviewed changes
Copilot reviewed 125 out of 126 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| keystore/internal/exportutils.go | New generic utilities for key export/import with encryption |
| keystore/corekeys/workflowkey/* | Workflow key implementation with NaCl box encryption |
| keystore/corekeys/vrfkey/* | VRF key implementation with inlined secp256k1 signatures |
| keystore/corekeys/tronkey/* | Tron blockchain key implementation |
| keystore/corekeys/tonkey/* | TON blockchain key implementation with Highload V3 wallet |
| keystore/corekeys/suikey/* | Sui blockchain key implementation |
| keystore/corekeys/starkkey/* | StarkNet key implementation |
| keystore/corekeys/solkey/* | Solana key implementation |
| keystore/corekeys/p2pkey/* | P2P libp2p key implementation |
| keystore/corekeys/ocrkey/* | OCR (Offchain Reporting) key implementation |
| keystore/corekeys/ocr2key/* | OCR2 key bundle implementation for multiple chains |
| keystore/corekeys/ethkey/* | Ethereum key implementation with EIP55 address support |
| keystore/corekeys/dkgrecipientkey/* | DKG recipient key implementation |
| keystore/corekeys/csakey/* | CSA (Client-Side Authentication) key implementation |
| keystore/corekeys/cosmoskey/* | Cosmos blockchain key implementation |
| keystore/corekeys/aptoskey/* | Aptos blockchain key implementation |
| keystore/corekeys/models/* | Legacy key storage models |
| keystore/corekeys/sha256.go | SHA256 hash type for key IDs |
| keystore/corekeys/exporttestutils.go | Test utilities for key export/import testing |
| keystore/corekeys/ocrkeybundle.go | Deleted - legacy OCR bundle generation |
| keystore/corekeys/csa.go | Deleted - legacy CSA key generation |
| go.md | Updated dependency graph |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
af54414 to
2921fcb
Compare
jmank88
approved these changes
Feb 17, 2026
george-dorin
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moved the keys folder with the following caveats:
scryptN, scryptP intinstead ofscryptParams commonkeystore.ScryptParamsto avoid circular dependency. This is not ideal, but in line with the underlying geth's design https://pkg.go.dev/github.com/ethereum/go-ethereum/accounts/keystore#EncryptDataV3, so is OK.MustHashfrom chainlink-evm into vrfkey's secp256k1MustKeccakHash. Also inlineduint256ToBytes32EIP55Addresstype to ethkey.Supports
smartcontractkit/chainlink#21180
smartcontractkit/chainlink-evm#362