Skip to content

aggregate confidential-relay responses by logical hash#22304

Closed
nadahalli wants to merge 1 commit intotejaswi/relay-response-signaturesfrom
tejaswi/relay-response-aggregator
Closed

aggregate confidential-relay responses by logical hash#22304
nadahalli wants to merge 1 commit intotejaswi/relay-response-signaturesfrom
tejaswi/relay-response-aggregator

Conversation

@nadahalli
Copy link
Copy Markdown
Contributor

What changed

  • Confidential-relay gateway aggregator now buckets per-node signed responses by their canonical logical hash (via Hash(params) helpers in chainlink-common) and merges signatures into a single envelope once F+1 unique signers vouch for the same hash.
  • Aggregator dispatches on req.Method to handle both confidential.secrets.get and confidential.capability.execute.
  • Transport-level JSON-RPC error responses are dropped from quorum counting per the design doc; only signed logical responses count.
  • Defense-in-depth comment in aggregator.go describes the future signature-verification hook for when the gateway has access to the relay-DON signer set; the trust anchor remains the enclave.

Why

PR #22302 made each relay-DON node sign its response (Step 2 of the E9 plan, PRIV-432). The previous aggregator bucketed by full-envelope digest, which broke once each honest node's envelope started carrying a different signature for identical logical content. Step 3 makes the gateway aggregate-and-pass-through correctly, so the enclave can verify F+1 unique relay signatures over a shared logical payload at E9.

Stacked on

Stacked on #22302 (tejaswi/relay-response-signatures). Once that lands, this rebases onto develop.

Validation

  • go test ./core/services/gateway/handlers/confidentialrelay

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

✅ No conflicts with other open PRs targeting tejaswi/relay-response-signatures

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@cl-sonarqube-production
Copy link
Copy Markdown

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 5, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@nadahalli
Copy link
Copy Markdown
Contributor Author

Folded into #22302 — the aggregator commit is now on tejaswi/relay-response-signatures (0b21fe0). Signing and aggregation belong in one PR per review feedback (the two halves are not separately deployable).

@nadahalli nadahalli closed this May 7, 2026
nadahalli added a commit that referenced this pull request May 7, 2026
…e paths

chainlink-common#2032 made SecretsResponseResult.Hash and
CapabilityResponseResult.Hash run params.Validate first and return
([32]byte, error), so a relay node can no longer accidentally sign
over a payload missing fields the canonical hash binds to.

Production callsites:

- core/capabilities/confidentialrelay/handler.go: sign{Secrets,Capability}Response
  now wrap any Hash error and return it; the handler's existing error path
  surfaces it back to the gateway as a JSON-RPC error so a request with
  malformed identity fields (Owner format, ExecutionID length, etc.) is
  rejected at signing time rather than silently producing an unbinding
  signature.

- core/services/gateway/handlers/confidentialrelay/aggregator.go:
  decodeSignedResponse propagates the Hash error so a single node's
  response that fails canonical hashing is dropped from quorum counting
  in the existing skip-this-response path, without aborting the whole
  aggregation.

Also widens the changeset to mention the aggregator change folded in
from PR #22304.
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.

1 participant