Skip to content

Adds proto - #2415

Merged
vyzaldysanchez merged 4 commits into
mainfrom
task/CRE-4017/offchain-cre-config
Oct 2, 2026
Merged

vyzaldysanchez merged 4 commits into
mainfrom
task/CRE-4017/offchain-cre-config

Conversation

@vyzaldysanchez

@vyzaldysanchez vyzaldysanchez commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

CRE-4017 — Offchain Capabilities Registry proto

Requires

None.

Supports- smartcontractkit/chainlink#23824 — node-side

ingestion and spec_config cutover.

Summary

Adds the proto container for the Offchain Capabilities Registry design.
Capability config that is today split across the on-chain CapabilitiesRegistry, job specs and nodeTOML moves into one versioned offchain payload. The Job Distributor delivers it to nodes as proto
JSON in a cresettings job spec (config_type = "capabilities_registry").

The schema matches the design doc. It wraps the existing CapabilityConfig, so offchain and on-chain capability config share one shape and can be compared field by field. Its DON structure mirrors the on-chain registry.

message OffchainCapabilitiesRegistry {
  string domain = 1;
  string env = 2;
  uint64 version = 3;           // monotonically increasing; 0 = unset
  map<string, DONConfig> dons = 4; // keyed by on-chain DON name
}

message DONConfig {
  map<string, CapabilityConfig> capabilities = 1; // capability ID -> config
}

Example payload (proto JSON):

{
  "domain": "cre",
  "env": "prod",
  "version": 201,
  "dons": {
    "workflow_1_zone-a": {
      "capabilities": {
        "cron@1.0.0": { "specConfig": { "fields": { "interval": { "stringValue": "30" } } } }
      }
    }
  }
}

Changes

  • pkg/capabilities/pb/registry.proto: new OffchainCapabilitiesRegistry and DONConfig messages in package loop.
  • pkg/capabilities/pb/registry.pb.go: regenerated (go run ./gen in pkg/capabilities/pb).

Compatibility

  • Additive only. CapabilityConfig and every existing message are unchanged; nothing in chainlink-common uses the new messages yet.
  • No loop.DONConfig name clash. I checked every proto in package loop.

Notes for reviewers

  • How nodes use these messages (enforced in the chainlink PR, not here):
    • version must be ≥ 1. In proto3, 0 and "not set" are the same, so 0 means "unset" and nodes reject it.
    • Nodes parse payloads strictly: unknown fields are rejected, not silently dropped.
    • dons keys are matched against on-chain DON names, so DONs must be named in the registry (v2).
  • Base commit: this branch starts from 1d3a14a, the chainlink-common commit chainlink currently pins, not from main.

Testing

  • go build ./pkg/capabilities/...
  • Consumed by the chainlink PR, which pins this PR's head commit (bfe140d). That PR tests parsing, validation and use of these messages end to end.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-common

✅ Compatible Changes (2)

pkg/capabilities/pb (2)
  • DONConfig — ➕ Added

  • OffchainCapabilitiesRegistry — ➕ Added


📄 View full apidiff report

@vyzaldysanchez
vyzaldysanchez marked this pull request as ready for review October 1, 2026 03:32
@vyzaldysanchez
vyzaldysanchez requested a review from a team as a code owner October 1, 2026 03:32
Copilot AI balanced review requested due to automatic review settings October 1, 2026 03:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The additive schema matches its documented consumer contract, and the generated bindings are consistent with it.

Review effort: Balanced
Findings: None

What changed in this PR

Adds the shared protobuf schema required for offchain capability registry ingestion.

Changes:

  • Defines versioned registry and per-DON configuration messages.
  • Regenerates Go protobuf bindings.
File Description
pkg/​capabilities/​pb/​registry.proto Adds the offchain registry schema.
pkg/​capabilities/​pb/​registry.pb.go Adds generated Go types and descriptors.
Files not reviewed (1)
  • pkg/capabilities/pb/registry.pb.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vyzaldysanchez
vyzaldysanchez added this pull request to the merge queue Oct 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 2, 2026
@vyzaldysanchez
vyzaldysanchez added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 40c5348 Oct 2, 2026
36 of 37 checks passed
@vyzaldysanchez
vyzaldysanchez deleted the task/CRE-4017/offchain-cre-config branch October 2, 2026 15:44
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.

4 participants