Skip to content

feat: add chip-ingress batch config keys#2207

Draft
pkcll wants to merge 1 commit into
mainfrom
chip-ingress-batch-config
Draft

feat: add chip-ingress batch config keys#2207
pkcll wants to merge 1 commit into
mainfrom
chip-ingress-batch-config

Conversation

@pkcll

@pkcll pkcll commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Add 7 chip-ingress batch configuration keys to enable tunable batch emitter behavior:

Key Type Default Description
ChipIngressBufferSize uint 1000 In-memory queue size for chip-ingress events
ChipIngressMaxBatchSize uint 500 Max events per PublishBatch RPC
ChipIngressMaxConcurrentSends int 10 Limits parallel PublishBatch calls
ChipIngressSendInterval Duration 100ms Max wait before flushing incomplete batch
ChipIngressSendTimeout Duration 3s Per-RPC timeout for PublishBatch
ChipIngressDrainTimeout Duration 10s Max shutdown wait to flush queued events
ChipIngressMaxGRPCRequestSize uint 10 MiB Max serialized request size before batch splitting

Changes

  • pkg/beholder/config.go: Added ChipIngressMaxGRPCRequestSize field + default in DefaultConfig()
  • pkg/beholder/batch_emitter_service.go: Wired batch.WithMaxGRPCRequestSize() with zero-to-default fallback
  • pkg/loop/config.go: 7 env constants, EnvConfig fields, AsCmdEnv() serialization, parse() parsing, getUint() helper
  • pkg/loop/server.go: 7 fields wired into beholder.Config

Testing

  • Updated batch_emitter_service_test.go and config_test.go
  • Golden file testdata/config-example.json updated
  • go test ./pkg/loop/... ./pkg/beholder/... — all pass

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

✅ Compatible Changes (9)

pkg/beholder.Config (1)
  • ChipIngressMaxGRPCRequestSize — ➕ Added
pkg/beholder.writerClientConfig (1)
  • ChipIngressMaxGRPCRequestSize — ➕ Added
pkg/loop.EnvConfig (7)
  • ChipIngressBufferSize — ➕ Added

  • ChipIngressDrainTimeout — ➕ Added

  • ChipIngressMaxBatchSize — ➕ Added

  • ChipIngressMaxConcurrentSends — ➕ Added

  • ChipIngressMaxGRPCRequestSize — ➕ Added

  • ChipIngressSendInterval — ➕ Added

  • ChipIngressSendTimeout — ➕ Added


📄 View full apidiff report

Comment thread pkg/loop/config.go
if err != nil {
return 0, err
}
return uint(u), nil
Add 7 chip-ingress batch configuration keys to enable tunable batch
emitter behavior:

- BufferSize (default 1000): in-memory queue size for chip-ingress events
- MaxBatchSize (default 500): max events per PublishBatch RPC
- MaxConcurrentSends (default 10): limits parallel PublishBatch calls
- SendInterval (default 100ms): max wait before flushing incomplete batch
- SendTimeout (default 3s): per-RPC timeout for PublishBatch
- DrainTimeout (default 10s): max shutdown wait to flush queued events
- MaxGRPCRequestSize (default 10 MiB): max serialized request size before
  batch splitting (min 1 MiB enforced by batch client)

Wired through beholder.Config, batch_emitter_service.go, and loop
EnvConfig (env vars, serialization, parsing) for LOOP plugin support.
@pkcll pkcll force-pushed the chip-ingress-batch-config branch from 78f5646 to 1f54ac6 Compare June 29, 2026 22:11
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.

3 participants