Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/chip-ingress-send-timeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"chainlink": patch
---

#changed Chip-ingress batch emitter defaults tuned from staging/prod capacity analysis:
`ChipIngressBufferSize` 1000 → 10000, `ChipIngressMaxBatchSize` 500 → 1000,
`ChipIngressSendInterval` 100ms → 500ms, `ChipIngressSendTimeout` 3s → 10s,
`ChipIngressDrainTimeout` 10s → 30s.
7 changes: 7 additions & 0 deletions core/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ func newBeholderClient(
ChipIngressEmitterGRPCEndpoint: cfgTelemetry.ChipIngressEndpoint(),
ChipIngressInsecureConnection: cfgTelemetry.ChipIngressInsecureConnection(),
ChipIngressBatchEmitterEnabled: cfgTelemetry.ChipIngressBatchEmitterEnabled(),
ChipIngressBufferSize: cfgTelemetry.ChipIngressBufferSize(),
ChipIngressMaxBatchSize: cfgTelemetry.ChipIngressMaxBatchSize(),
ChipIngressMaxConcurrentSends: cfgTelemetry.ChipIngressMaxConcurrentSends(),
ChipIngressSendInterval: cfgTelemetry.ChipIngressSendInterval(),
ChipIngressSendTimeout: cfgTelemetry.ChipIngressSendTimeout(),
ChipIngressDrainTimeout: cfgTelemetry.ChipIngressDrainTimeout(),
ChipIngressMaxGRPCRequestSize: cfgTelemetry.ChipIngressMaxGRPCRequestSize(),
ChipIngressLogger: lggr,
LogStreamingEnabled: cfgTelemetry.LogStreamingEnabled(),
LogLevel: cfgTelemetry.LogLevel(),
Expand Down
14 changes: 14 additions & 0 deletions core/config/docs/core.toml
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,20 @@ ChipIngressInsecureConnection = false # Default
# ChipIngressBatchEmitterEnabled enables batching for chip-ingress events.
# When false, events are sent individually (legacy behavior).
ChipIngressBatchEmitterEnabled = true # Default
# ChipIngressBufferSize is the in-memory queue size for chip-ingress events.
ChipIngressBufferSize = 10000 # Default
# ChipIngressMaxBatchSize is the max events per PublishBatch RPC.
ChipIngressMaxBatchSize = 1000 # Default
# ChipIngressMaxConcurrentSends limits parallel PublishBatch calls.
ChipIngressMaxConcurrentSends = 10 # Default
# ChipIngressSendInterval is the max wait before flushing an incomplete batch.
ChipIngressSendInterval = '500ms' # Default
# ChipIngressSendTimeout is the per-RPC timeout for PublishBatch.
ChipIngressSendTimeout = '10s' # Default
# ChipIngressDrainTimeout is the max shutdown wait to flush queued events.
ChipIngressDrainTimeout = '30s' # Default
# ChipIngressMaxGRPCRequestSize is the max serialized PublishBatch request size in bytes. Batches exceeding this are split before send (min 1 MiB enforced by batch client).
ChipIngressMaxGRPCRequestSize = 10485760 # Default
# DurableEmitterEnabled enables persisting outbound CHIP events to Postgres for at-least-once delivery.
DurableEmitterEnabled = true # Default
# DurableEmitterRetransmitBatchSize is the number of pending events the durable emitter replays per retransmit tick.
Expand Down
7 changes: 7 additions & 0 deletions core/config/telemetry_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ type Telemetry interface {
ChipIngressEndpoint() string
ChipIngressInsecureConnection() bool
ChipIngressBatchEmitterEnabled() bool
ChipIngressBufferSize() uint
ChipIngressMaxBatchSize() uint
ChipIngressMaxConcurrentSends() int
ChipIngressSendInterval() time.Duration
ChipIngressSendTimeout() time.Duration
ChipIngressDrainTimeout() time.Duration
ChipIngressMaxGRPCRequestSize() int
DurableEmitterEnabled() bool
DurableEmitterRetransmitBatchSize() int
DurableEmitterEventTTL() time.Duration
Expand Down
49 changes: 49 additions & 0 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2983,6 +2983,13 @@
ChipIngressEndpoint *string
ChipIngressInsecureConnection *bool
ChipIngressBatchEmitterEnabled *bool
ChipIngressBufferSize *uint
ChipIngressMaxBatchSize *uint
ChipIngressMaxConcurrentSends *int
ChipIngressSendInterval *commonconfig.Duration
ChipIngressSendTimeout *commonconfig.Duration
ChipIngressDrainTimeout *commonconfig.Duration
ChipIngressMaxGRPCRequestSize *int
DurableEmitterEnabled *bool
DurableEmitterRetransmitBatchSize *int
DurableEmitterEventTTL *commonconfig.Duration
Expand All @@ -3001,7 +3008,7 @@
PrometheusBridge PrometheusBridge `toml:",omitempty"`
}

func (b *Telemetry) setFrom(f *Telemetry) {

Check warning on line 3011 in core/config/toml/types.go

View check run for this annotation

CL-sonarqube-production / SonarQube Code Analysis

Refactor this method to reduce its Cognitive Complexity from 32 to the 30 allowed.

[S3776] Cognitive Complexity of functions should not be too high See more on https://sonarqube.main.prod.cldev.sh/project/issues?id=smartcontractkit_chainlink&pullRequest=22987&issues=e87b82ff-3021-4eb3-851d-d3cf516abd4f&open=e87b82ff-3021-4eb3-851d-d3cf516abd4f
if v := f.Enabled; v != nil {
b.Enabled = v
}
Expand Down Expand Up @@ -3038,6 +3045,27 @@
if v := f.ChipIngressBatchEmitterEnabled; v != nil {
b.ChipIngressBatchEmitterEnabled = v
}
if v := f.ChipIngressBufferSize; v != nil {
b.ChipIngressBufferSize = v
}
if v := f.ChipIngressMaxBatchSize; v != nil {
b.ChipIngressMaxBatchSize = v
}
if v := f.ChipIngressMaxConcurrentSends; v != nil {
b.ChipIngressMaxConcurrentSends = v
}
if v := f.ChipIngressSendInterval; v != nil {
b.ChipIngressSendInterval = v
}
if v := f.ChipIngressSendTimeout; v != nil {
b.ChipIngressSendTimeout = v
}
if v := f.ChipIngressDrainTimeout; v != nil {
b.ChipIngressDrainTimeout = v
}
if v := f.ChipIngressMaxGRPCRequestSize; v != nil {
b.ChipIngressMaxGRPCRequestSize = v
}
if v := f.DurableEmitterEnabled; v != nil {
b.DurableEmitterEnabled = v
}
Expand Down Expand Up @@ -3096,6 +3124,27 @@
if ratio := b.TraceSampleRatio; ratio != nil && (*ratio < 0 || *ratio > 1) {
err = errors.Join(err, configutils.ErrInvalid{Name: "TraceSampleRatio", Value: *ratio, Msg: "must be between 0 and 1"})
}
if v := b.ChipIngressBufferSize; v != nil && *v == 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressBufferSize", Value: *v, Msg: "must be greater than 0"})

Check warning on line 3128 in core/config/toml/types.go

View check run for this annotation

CL-sonarqube-production / SonarQube Code Analysis

Define a constant instead of duplicating this literal "must be greater than 0" 7 times.

[S1192] String literals should not be duplicated See more on https://sonarqube.main.prod.cldev.sh/project/issues?id=smartcontractkit_chainlink&pullRequest=22987&issues=bf7f4bba-39cb-426d-9e6d-8582345ddfae&open=bf7f4bba-39cb-426d-9e6d-8582345ddfae
}
if v := b.ChipIngressMaxBatchSize; v != nil && *v == 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressMaxBatchSize", Value: *v, Msg: "must be greater than 0"})
}
if v := b.ChipIngressMaxConcurrentSends; v != nil && *v <= 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressMaxConcurrentSends", Value: *v, Msg: "must be greater than 0"})
}
if v := b.ChipIngressSendInterval; v != nil && v.Duration() <= 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressSendInterval", Value: v.Duration(), Msg: "must be greater than 0"})
}
if v := b.ChipIngressSendTimeout; v != nil && v.Duration() <= 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressSendTimeout", Value: v.Duration(), Msg: "must be greater than 0"})
}
if v := b.ChipIngressDrainTimeout; v != nil && v.Duration() <= 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressDrainTimeout", Value: v.Duration(), Msg: "must be greater than 0"})
}
if v := b.ChipIngressMaxGRPCRequestSize; v != nil && *v <= 0 {
err = errors.Join(err, configutils.ErrInvalid{Name: "ChipIngressMaxGRPCRequestSize", Value: *v, Msg: "must be greater than 0"})
}
return err
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.26.4

require (
github.com/ethereum/go-ethereum v1.17.1
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260625162847-bdf9e82b2f75
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260722120418-c1a1e0e75034
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251222115927-36a18321243c
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260622152157-c8e129347b8b
github.com/smartcontractkit/cre-sdk-go v1.5.0
Expand Down Expand Up @@ -74,7 +74,7 @@ require (
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260528204832-58c7145c53f8 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260716165322-7f2edff6e954 // indirect
github.com/smartcontractkit/libocr v0.0.0-20260403184524-b6409238958d // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/supranational/blst v0.3.16 // indirect
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.106
github.com/smartcontractkit/chainlink-automation v0.8.1
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260624154507-ea7ff77a0ddb
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260721154648-3e1c1fb5d8dc
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260722120418-c1a1e0e75034
github.com/smartcontractkit/chainlink-common/keystore v1.2.1-0.20260623104656-f39eba3e2bc6
github.com/smartcontractkit/chainlink-data-streams v1.0.0
github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54
Expand Down Expand Up @@ -166,7 +166,7 @@ require (
github.com/buger/goterm v1.0.4 // indirect
github.com/buger/jsonparser v1.2.0 // indirect
github.com/buraksezer/consistent v0.10.0 // indirect
github.com/bytecodealliance/wasmtime-go/v28 v28.0.0 // indirect
github.com/bytecodealliance/wasmtime-go/v47 v47.0.0 // indirect
github.com/bytedance/sonic v1.15.0 // indirect
github.com/bytedance/sonic/loader v0.5.0 // indirect
github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.70.2 // indirect
Expand Down Expand Up @@ -488,7 +488,7 @@ require (
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260708114855-e953eeb028a7 // indirect
github.com/smartcontractkit/chainlink-aptos/codec v0.0.0-20260716230027-bd85997bc03c // indirect
github.com/smartcontractkit/chainlink-aptos/codec v0.0.0-20260714122420-7b2200a59a79 // indirect
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260715130435-1e32cea69af1 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb // indirect
Expand Down Expand Up @@ -518,14 +518,14 @@ require (
github.com/smartcontractkit/chainlink-solana/contracts v0.0.0-20260513123719-d347eaf314e1 // indirect
github.com/smartcontractkit/chainlink-stellar v0.0.3-0.20260714222251-887c274c6b64 // indirect
github.com/smartcontractkit/chainlink-stellar/bindings v0.0.0-20260714222251-887c274c6b64 // indirect
github.com/smartcontractkit/chainlink-sui v0.0.0-20260714190119-005bb9a612c3 // indirect
github.com/smartcontractkit/chainlink-sui/codec v0.0.0-20260720132736-e99278bfdc96 // indirect
github.com/smartcontractkit/chainlink-sui v0.0.0-20260713221039-69796c8a78ae // indirect
github.com/smartcontractkit/chainlink-sui/codec v0.0.0-20260714120433-7667cad5ff5c // indirect
github.com/smartcontractkit/chainlink-testing-framework/framework/components/chiprouter v1.0.4 // indirect
github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake v0.15.0 // indirect
github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.9 // indirect
github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 // indirect
github.com/smartcontractkit/chainlink-ton v1.0.5-0.20260629213843-c52e07523035 // indirect
github.com/smartcontractkit/chainlink-ton/cciplib v0.1.1-0.20260716214810-db5ecc877490 // indirect
github.com/smartcontractkit/chainlink-ton/cciplib v0.1.1-0.20260715200135-39296e69ee4e // indirect
github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20260408092456-3c6369888d4a // indirect
github.com/smartcontractkit/cld-changesets v0.5.0 // indirect
github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad // indirect
Expand Down Expand Up @@ -666,7 +666,3 @@ replace github.com/fbsobreira/gotron-sdk => github.com/smartcontractkit/chainlin
replace github.com/moby/go-archive v0.2.0 => github.com/moby/go-archive v0.1.0

replace github.com/olekukonko/tablewriter => github.com/olekukonko/tablewriter v0.0.5

// Exclude Juno's placeholder dependency. It is only intended to be resolved via
// Juno's local replace directive and is not used directly by chainlink
exclude github.com/starknet-io/starknet-p2pspecs v0.0.0-00010101000000-000000000000
Comment on lines -670 to -672

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.

Is this resolved?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

reverted

Loading
Loading