Skip to content

feat(cresettings): add GatewayConfidentialRelayUserRate ingress limit#2268

Open
nadahalli wants to merge 1 commit into
mainfrom
tejaswi/priv-436-relay-user-rate
Open

feat(cresettings): add GatewayConfidentialRelayUserRate ingress limit#2268
nadahalli wants to merge 1 commit into
mainfrom
tejaswi/priv-436-relay-user-rate

Conversation

@nadahalli

Copy link
Copy Markdown
Contributor

Adds a GatewayConfidentialRelayUserRate setting (default 100rps, burst 10) so the
confidential relay gateway handler in chainlink core can throttle inbound user
requests before fan-out to DON nodes. The existing relay limiters
(GatewayConfidentialRelayGlobalRate, PerNodeRate) only bound node responses,
leaving the ingress path unthrottled.

Consumed by the chainlink core change for CL112-03 / PRIV-436 (Sigma Prime audit
finding: unauthenticated relay ingress amplifies one request into per-node
attestation work). The core handler reads it via MakeRateLimiter, same as the two
existing relay limiters.

Adds a GatewayConfidentialRelayUserRate setting (default 100rps, burst 10) so the
confidential relay gateway handler in chainlink core can throttle inbound user
requests before fan-out to DON nodes. The existing relay limiters only bound node
responses, leaving the ingress path unthrottled.

Consumed by chainlink core for CL112-03 / PRIV-436 (Sigma Prime audit).
Copilot AI review requested due to automatic review settings July 21, 2026 10:09
@github-actions

Copy link
Copy Markdown
Contributor

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

✅ Compatible Changes (1)

pkg/settings/cresettings.Schema (1)
  • GatewayConfidentialRelayUserRate — ➕ Added

📄 View full apidiff report

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.

Pull request overview

Adds a new CRE setting to rate-limit confidential relay ingress (user → gateway) requests to prevent unauthenticated amplification before fan-out to DON nodes.

Changes:

  • Introduces GatewayConfidentialRelayUserRate to the CRE settings schema with a default of 100rps:10.
  • Updates golden defaults (defaults.json, defaults.toml) and unmarshalling test coverage for the new setting.
  • Extends the CRE settings limits diagram to include the new rate limiter (but currently places it under a node→gateway subgraph; see PR comment).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/settings/cresettings/settings.go Adds the new GatewayConfidentialRelayUserRate setting and default.
pkg/settings/cresettings/settings_test.go Extends TestSchema_Unmarshal to include/assert the new rate setting.
pkg/settings/cresettings/README.md Adds the setting to the Mermaid limits diagram (placement likely needs adjustment).
pkg/settings/cresettings/defaults.toml Adds default value for GatewayConfidentialRelayUserRate.
pkg/settings/cresettings/defaults.json Adds default value for GatewayConfidentialRelayUserRate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 61 to 68
subgraph HandleNodeMessage[gatewayHandler.HandleNodeMessage]
%% DON nodes → gateway (separate from the inbound trigger flow)
GatewayHTTPGlobalRate[\GatewayHTTPGlobalRate/]:::rate
GatewayHTTPPerNodeRate[\GatewayHTTPPerNodeRate/]:::rate
GatewayConfidentialRelayGlobalRate[\GatewayConfidentialRelayGlobalRate/]:::rate
GatewayConfidentialRelayPerNodeRate[\GatewayConfidentialRelayPerNodeRate/]:::rate
GatewayConfidentialRelayUserRate[\GatewayConfidentialRelayUserRate/]:::rate
GatewayHTTPActionMtlsRequestRate[\GatewayHTTPActionMtlsRequestRate/]:::rate
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