Skip to content

Commit a005109

Browse files
authored
Merge branch 'main' into INFOPLAT-3099-chip-ingress-batching
2 parents 24a80d6 + 223976d commit a005109

29 files changed

Lines changed: 745 additions & 116 deletions

File tree

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ require (
4646
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9
4747
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b
4848
github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0
49-
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251020004840-4638e4262066
49+
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260106052706-6dd937cb5ec6
5050
github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e
5151
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7
5252
github.com/smartcontractkit/libocr v0.0.0-20250912173940-f3ab0246e23d
@@ -136,14 +136,14 @@ require (
136136
github.com/prometheus/client_model v0.6.2 // indirect
137137
github.com/prometheus/common v0.65.0 // indirect
138138
github.com/prometheus/procfs v0.16.1 // indirect
139-
github.com/rogpeppe/go-internal v1.13.1 // indirect
139+
github.com/rogpeppe/go-internal v1.14.1 // indirect
140140
github.com/ryanuber/go-glob v1.0.0 // indirect
141141
github.com/sanity-io/litter v1.5.5 // indirect
142142
github.com/stretchr/objx v0.5.2 // indirect
143143
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
144144
github.com/x448/float16 v0.8.4 // indirect
145145
github.com/zeebo/xxh3 v1.0.2 // indirect
146-
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
146+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
147147
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
148148
go.opentelemetry.io/proto/otlp v1.6.0 // indirect
149149
go.uber.org/multierr v1.11.0 // indirect
@@ -154,6 +154,6 @@ require (
154154
golang.org/x/term v0.37.0 // indirect
155155
golang.org/x/text v0.31.0 // indirect
156156
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
157-
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
157+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
158158
gopkg.in/yaml.v2 v2.4.0 // indirect
159159
)

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzM
308308
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
309309
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
310310
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
311-
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
312-
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
311+
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
312+
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
313313
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
314314
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
315315
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
@@ -340,8 +340,8 @@ github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-202510021
340340
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b/go.mod h1:qSTSwX3cBP3FKQwQacdjArqv0g6QnukjV4XuzO6UyoY=
341341
github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 h1:B7itmjy+CMJ26elVw/cAJqqhBQ3Xa/mBYWK0/rQ5MuI=
342342
github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0/go.mod h1:h6kqaGajbNRrezm56zhx03p0mVmmA2xxj7E/M4ytLUA=
343-
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251020004840-4638e4262066 h1:Lrc0+uegqasIFgsGXHy4tzdENT+zH2AbkTV4F7e3otU=
344-
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251020004840-4638e4262066/go.mod h1:HIpGvF6nKCdtZ30xhdkKWGM9+4Z4CVqJH8ZBL1FTEiY=
343+
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260106052706-6dd937cb5ec6 h1:BXMylId1EoFxuAy++JRifxUF+P/I7v5BEBh0wECtrEM=
344+
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260106052706-6dd937cb5ec6/go.mod h1:GTpDgyK0OObf7jpch6p8N281KxN92wbB8serZhU9yRc=
345345
github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e h1:Hv9Mww35LrufCdM9wtS9yVi/rEWGI1UnjHbcKKU0nVY=
346346
github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU=
347347
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs=
@@ -382,8 +382,8 @@ github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN
382382
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
383383
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
384384
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
385-
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
386-
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
385+
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
386+
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
387387
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
388388
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
389389
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
@@ -590,8 +590,8 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
590590
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
591591
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
592592
google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
593-
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU=
594-
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA=
593+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY=
594+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE=
595595
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE=
596596
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
597597
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=

pkg/billing/workflow_client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
"google.golang.org/grpc/metadata"
1212
"google.golang.org/protobuf/types/known/emptypb"
1313

14+
"github.com/smartcontractkit/chainlink-common/pkg/logger"
15+
nodeauthgrpc "github.com/smartcontractkit/chainlink-common/pkg/nodeauth/grpc"
1416
auth "github.com/smartcontractkit/chainlink-common/pkg/nodeauth/jwt"
1517
pb "github.com/smartcontractkit/chainlink-protos/billing/go"
16-
17-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
1818
)
1919

2020
// WorkflowClient is a specialized interface for the Workflow node use-case.
@@ -139,7 +139,7 @@ func (wc *workflowClient) addJWTAuth(ctx context.Context, req any) (context.Cont
139139
}
140140

141141
// Add JWT to Authorization header
142-
return metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer "+jwtToken), nil
142+
return metadata.AppendToOutgoingContext(ctx, nodeauthgrpc.AuthorizationHeader, nodeauthgrpc.BearerPrefix+jwtToken), nil
143143
}
144144

145145
func (wc *workflowClient) GetOrganizationCreditsByWorkflow(ctx context.Context, req *pb.GetOrganizationCreditsByWorkflowRequest) (*pb.GetOrganizationCreditsByWorkflowResponse, error) {

pkg/capabilities/utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"google.golang.org/protobuf/proto"
99
"google.golang.org/protobuf/types/known/anypb"
1010

11+
caperrors "github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors"
1112
"github.com/smartcontractkit/chainlink-protos/cre/go/values"
1213
)
1314

@@ -124,7 +125,7 @@ func RegisterTrigger[I, O proto.Message](
124125
triggerType string,
125126
request TriggerRegistrationRequest,
126127
message I,
127-
fn func(context.Context, string, RequestMetadata, I) (<-chan TriggerAndId[O], error),
128+
fn func(context.Context, string, RequestMetadata, I) (<-chan TriggerAndId[O], caperrors.Error),
128129
) (<-chan TriggerResponse, error) {
129130
migrated, err := FromValueOrAny(request.Config, request.Payload, message)
130131
if err != nil {

pkg/capabilities/utils_test.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"google.golang.org/protobuf/types/known/emptypb"
1313

1414
"github.com/smartcontractkit/chainlink-common/pkg/capabilities"
15+
caperrors "github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors"
1516
"github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb"
1617
"github.com/smartcontractkit/chainlink-protos/cre/go/values"
1718
)
@@ -260,7 +261,7 @@ func TestRegisterTrigger(t *testing.T) {
260261
"type",
261262
req,
262263
&pb.TriggerEvent{},
263-
func(_ context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], error) {
264+
func(_ context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], caperrors.Error) {
264265
assert.Equal(t, "workflow-id", m.WorkflowID)
265266
assert.Equal(t, "reg", r.Id)
266267
return eventCh, nil
@@ -322,7 +323,7 @@ func TestRegisterTrigger(t *testing.T) {
322323
"type",
323324
req,
324325
&pb.TriggerEvent{},
325-
func(_ context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], error) {
326+
func(_ context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], caperrors.Error) {
326327
assert.Equal(t, "workflow-id", m.WorkflowID)
327328
assert.Equal(t, "reg", r.Id)
328329
return eventCh, nil
@@ -367,8 +368,8 @@ func TestRegisterTrigger(t *testing.T) {
367368
"type",
368369
req,
369370
&pb.TriggerEvent{},
370-
func(ctx context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], error) {
371-
return nil, ctx.Err()
371+
func(ctx context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], caperrors.Error) {
372+
return nil, caperrors.NewPublicSystemError(ctx.Err(), caperrors.Internal)
372373
},
373374
)
374375
require.Error(t, err)
@@ -412,10 +413,14 @@ func TestRegisterTrigger(t *testing.T) {
412413
"type",
413414
req,
414415
&pb.TriggerEvent{},
415-
func(ctx context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], error) {
416+
func(ctx context.Context, triggerID string, m capabilities.RequestMetadata, r *pb.TriggerEvent) (<-chan capabilities.TriggerAndId[*pb.TriggerEvent], caperrors.Error) {
416417
assert.Equal(t, "workflow-id", m.WorkflowID)
417418
assert.Equal(t, "reg", r.Id)
418-
return eventCh, ctx.Err()
419+
if ctx.Err() != nil {
420+
return nil, caperrors.NewPublicSystemError(ctx.Err(), caperrors.Internal)
421+
} else {
422+
return eventCh, nil
423+
}
419424
},
420425
)
421426
require.NoError(t, err)

pkg/capabilities/v2/chain-capabilities/evm/server/client_server_gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/chain-capabilities/solana/server/client_server_gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/protoc/pkg/templates/server.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ type {{.GoName}}Capability interface {
3636
{{- range .Methods}}
3737
{{- if isTrigger . }}
3838
{{ $hasTriggers = true }}
39-
Register{{.GoName}}(ctx context.Context, triggerID string, metadata capabilities.RequestMetadata, input *{{ImportAlias .Input.GoIdent.GoImportPath}}.{{.Input.GoIdent.GoName}}) (<- chan capabilities.TriggerAndId[*{{ImportAlias .Output.GoIdent.GoImportPath}}.{{.Output.GoIdent.GoName}}], error)
40-
Unregister{{.GoName}}(ctx context.Context, triggerID string, metadata capabilities.RequestMetadata, input *{{ImportAlias .Input.GoIdent.GoImportPath}}.{{.Input.GoIdent.GoName}}) error
39+
Register{{.GoName}}(ctx context.Context, triggerID string, metadata capabilities.RequestMetadata, input *{{ImportAlias .Input.GoIdent.GoImportPath}}.{{.Input.GoIdent.GoName}}) (<- chan capabilities.TriggerAndId[*{{ImportAlias .Output.GoIdent.GoImportPath}}.{{.Output.GoIdent.GoName}}], caperrors.Error)
40+
Unregister{{.GoName}}(ctx context.Context, triggerID string, metadata capabilities.RequestMetadata, input *{{ImportAlias .Input.GoIdent.GoImportPath}}.{{.Input.GoIdent.GoName}}) caperrors.Error
4141
{{- else }}
4242
{{ $hasActions = true }}
4343
{{.GoName}}(ctx context.Context, metadata capabilities.RequestMetadata, input *{{ImportAlias .Input.GoIdent.GoImportPath}}.{{.Input.GoIdent.GoName}} {{if ne "emptypb.Empty" (ConfigType $service)}}, {{(ConfigType $service)}}{{ end }}) (*capabilities.ResponseAndMetadata[*{{ImportAlias .Output.GoIdent.GoImportPath}}.{{.Output.GoIdent.GoName}}], caperrors.Error)

pkg/capabilities/v2/protoc/pkg/test_capabilities/actionandtrigger/server/action_and_trigger_server_gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/protoc/pkg/test_capabilities/basictrigger/server/basic_trigger_server_gen.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)