Repository navigation
[CRE] (feat): validate OCR key bundles against expected signers in ProposeJobSpec - #24164
justinkaseman wants to merge 4 commits into
Conversation
|
👋 justinkaseman, 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! |
|
✅ No conflicts with other open PRs targeting |
0688875 to
b030f90
Compare
There was a problem hiding this comment.
🟡 Changes recommended
EVM proposals bypass keyring validation and can retain stale bundle IDs, while missing OCR metadata can cause precondition checks to panic instead of returning validation errors.
2 open issues
What changed in this PR
Adds optional OCR key-bundle validation to job proposal preconditions, helping prevent stale Job Distributor configuration from supplying incorrect bundle IDs.
Changes:
- Adds expected signers keyed by node CSA key and an emergency bypass flag.
- Checks EVM signer matches and non-EVM bundle presence and uniqueness for supported templates.
- Adds unit and integration coverage for validation, node selection, and bypass behavior.
| File | Description |
|---|---|
deployment/cre/jobs/propose_job_spec.go |
Adds validation inputs and invokes the keyring check. |
deployment/cre/jobs/propose_job_spec_keyring_e2e_test.go |
Exercises precondition checks through the test harness. |
deployment/cre/jobs/propose_job_spec_keyring_check.go |
Implements node selection, signer matching, and bundle validation. |
deployment/cre/jobs/propose_job_spec_keyring_check_test.go |
Tests validation helpers, selectors, filters, and bypasses. |
Review effort: Balanced
| job_types.OCR3, job_types.Consensus, job_types.Ring, | ||
| job_types.Aptos, job_types.Solana, job_types.Stellar, |
| for i, n := range jdNodes { | ||
| ids[i] = n.Id | ||
| } | ||
| infos, err := deployment.NodeInfo(ids, e.Offchain) |
russell-stern
left a comment
There was a problem hiding this comment.
It looks like there's a flaky e2e test
|
|
||
| // targetNodeFilter reproduces the JD node selection of the operation that proposes the template, so | ||
| // the check validates the same nodes the proposal targets. | ||
| func targetNodeFilter(config ProposeJobSpecInput) *nodev1.ListNodesRequest_Filter { |
There was a problem hiding this comment.
If this desyncs from the JD node selection will it fail silently? Can we extract the function into a shared lib so they both use the same logic or have a follow up to do it?
CORA - Pending Reviewers
Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown For more details, see the full review summary. |
There was a problem hiding this comment.
🟡 Changes recommended
A critical issue remains: missing OCR2 or P2P metadata causes NewNodeFromJD to panic instead of returning a precondition error, requiring explicit error handling and a VerifyPreconditions regression test.
3 open issues
Review effort: Balanced


What
ProposeJobSpec.VerifyPreconditions now checks that each target node’s OCR2 key bundle in JD matches an expected onchain signer, before a spec is proposed.
How
Why
A stale JD chain config, for example after a key rotation, would otherwise bake the wrong bundle ID into the spec.
Follow-up
A chainlink-deployments PR will be needed to make the resolver fill expectedSigners from nodes.json.