From 56d04437b7efaff179e908ca0e87323df1d46e97 Mon Sep 17 00:00:00 2001 From: cawthorne Date: Tue, 13 Jan 2026 15:44:42 +0000 Subject: [PATCH 1/2] feat: Add Streams LLO NoDAG Trigger capability - Add cre/capabilities/streams/v1/trigger.proto - Define Config message (stream_ids, max_frequency_ms) - Define Report message matching OCRTriggerEvent - Define OCRSignature message for attributed signatures - Add Streams service with Trigger RPC - Capability ID: streams-trigger@2.0.0 - Support for Data Feeds migration to CRE NoDAG architecture --- .changeset/add-streams-llo-trigger.md | 11 +++++ cre/capabilities/streams/v1/trigger.proto | 57 +++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .changeset/add-streams-llo-trigger.md create mode 100644 cre/capabilities/streams/v1/trigger.proto diff --git a/.changeset/add-streams-llo-trigger.md b/.changeset/add-streams-llo-trigger.md new file mode 100644 index 00000000..a1fe1f0e --- /dev/null +++ b/.changeset/add-streams-llo-trigger.md @@ -0,0 +1,11 @@ +--- +"@smartcontractkit/chainlink-protos": minor +--- + +Add Streams LLO NoDAG Trigger capability proto + +- Add streams/v1/trigger.proto with NoDAG API +- Config message (stream_ids, max_frequency_ms) +- Report message matching OCRTriggerEvent structure +- Streams service with Trigger RPC (streams-trigger@2.0.0) +- Supports Data Feeds migration to CRE NoDAG architecture diff --git a/cre/capabilities/streams/v1/trigger.proto b/cre/capabilities/streams/v1/trigger.proto new file mode 100644 index 00000000..89aed600 --- /dev/null +++ b/cre/capabilities/streams/v1/trigger.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package capabilities.streams.v1; + +option go_package = "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/triggers/streams"; + +import "cre/tools/generator/v1alpha/cre_metadata.proto"; + +// Configuration for the Streams LLO Trigger +// This matches the existing LLOTriggerConfig structure +message Config { + // The IDs of the LLO data streams to subscribe to. + // Stream IDs are uint32 values that identify specific feeds. + repeated uint32 stream_ids = 1; + + // The minimum interval in milliseconds between trigger events. + // Trigger will only emit events at most once per this interval. + uint64 max_frequency_ms = 2; +} + +// An attributed onchain signature +message OCRSignature { + // The signer index + uint32 signer = 1; + + // The signature bytes + bytes signature = 2; +} + +// OCR Trigger Event payload +// This matches the existing OCRTriggerEvent structure that the transmitter emits +message Report { + // Configuration digest for the OCR round + bytes config_digest = 1; + + // Sequence number of the report + uint64 seq_nr = 2; + + // The report bytes (raw OCR report) + bytes report = 3; + + // Attributed onchain signatures + repeated OCRSignature sigs = 4; +} + +// Streams LLO Trigger service definition +// This is the NoDAG API for the existing LLO CRE Transmitter +service Streams { + option (tools.generator.v1alpha.capability) = { + mode: MODE_DON + capability_id: "streams-trigger@2.0.0" + }; + + // Trigger method that emits OCR reports from the LLO plugin + // This replaces the legacy RegisterTrigger/UnregisterTrigger API + rpc Trigger(Config) returns (stream Report); +} From 53b7b56aedc2095c27fdeac4e80a1349642d0160 Mon Sep 17 00:00:00 2001 From: "app-token-issuer-engops[bot]" <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:47:31 +0000 Subject: [PATCH 2/2] Auto-fix: buf format, gofmt, go generate, go mod tidy --- cre/capabilities/streams/v1/trigger.proto | 14 ++--- cre/go/installer/pkg/embedded_gen.go | 63 +++++++++++++++++++++++ 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/cre/capabilities/streams/v1/trigger.proto b/cre/capabilities/streams/v1/trigger.proto index 89aed600..df55cf74 100644 --- a/cre/capabilities/streams/v1/trigger.proto +++ b/cre/capabilities/streams/v1/trigger.proto @@ -2,17 +2,17 @@ syntax = "proto3"; package capabilities.streams.v1; -option go_package = "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/triggers/streams"; - import "cre/tools/generator/v1alpha/cre_metadata.proto"; +option go_package = "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/triggers/streams"; + // Configuration for the Streams LLO Trigger // This matches the existing LLOTriggerConfig structure message Config { // The IDs of the LLO data streams to subscribe to. // Stream IDs are uint32 values that identify specific feeds. repeated uint32 stream_ids = 1; - + // The minimum interval in milliseconds between trigger events. // Trigger will only emit events at most once per this interval. uint64 max_frequency_ms = 2; @@ -22,7 +22,7 @@ message Config { message OCRSignature { // The signer index uint32 signer = 1; - + // The signature bytes bytes signature = 2; } @@ -32,13 +32,13 @@ message OCRSignature { message Report { // Configuration digest for the OCR round bytes config_digest = 1; - + // Sequence number of the report uint64 seq_nr = 2; - + // The report bytes (raw OCR report) bytes report = 3; - + // Attributed onchain signatures repeated OCRSignature sigs = 4; } diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 09c71b1e..733f4e1b 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -1056,6 +1056,65 @@ service Cron { } ` +const streamsV1TriggerEmbedded = `syntax = "proto3"; + +package capabilities.streams.v1; + +import "cre/tools/generator/v1alpha/cre_metadata.proto"; + +option go_package = "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/triggers/streams"; + +// Configuration for the Streams LLO Trigger +// This matches the existing LLOTriggerConfig structure +message Config { + // The IDs of the LLO data streams to subscribe to. + // Stream IDs are uint32 values that identify specific feeds. + repeated uint32 stream_ids = 1; + + // The minimum interval in milliseconds between trigger events. + // Trigger will only emit events at most once per this interval. + uint64 max_frequency_ms = 2; +} + +// An attributed onchain signature +message OCRSignature { + // The signer index + uint32 signer = 1; + + // The signature bytes + bytes signature = 2; +} + +// OCR Trigger Event payload +// This matches the existing OCRTriggerEvent structure that the transmitter emits +message Report { + // Configuration digest for the OCR round + bytes config_digest = 1; + + // Sequence number of the report + uint64 seq_nr = 2; + + // The report bytes (raw OCR report) + bytes report = 3; + + // Attributed onchain signatures + repeated OCRSignature sigs = 4; +} + +// Streams LLO Trigger service definition +// This is the NoDAG API for the existing LLO CRE Transmitter +service Streams { + option (tools.generator.v1alpha.capability) = { + mode: MODE_DON + capability_id: "streams-trigger@2.0.0" + }; + + // Trigger method that emits OCR reports from the LLO plugin + // This replaces the legacy RegisterTrigger/UnregisterTrigger API + rpc Trigger(Config) returns (stream Report); +} +` + const v1alphaSdkEmbedded = `syntax = "proto3"; package sdk.v1alpha; @@ -1589,6 +1648,10 @@ var allFiles = []*embeddedFile{ name: "capabilities/scheduler/cron/v1/trigger.proto", content: schedulerCronV1TriggerEmbedded, }, + { + name: "capabilities/streams/v1/trigger.proto", + content: streamsV1TriggerEmbedded, + }, { name: "sdk/v1alpha/sdk.proto", content: v1alphaSdkEmbedded,