Skip to content

[CRE-6798] add ShardIndex to confidential relay request params - #2470

Merged
bolekk merged 2 commits into
mainfrom
cre-6798-confidential-relay-shard-index
Oct 15, 2026
Merged

bolekk merged 2 commits into
mainfrom
cre-6798-confidential-relay-shard-index

Conversation

@bolekk

@bolekk bolekk commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a ShardIndex int field to SecretsRequestParams and CapabilityRequestParams so the enclave can tell the gateway which DON shard a confidential.secrets.get/confidential.capability.execute request must be routed to.
  • A request that omits it defaults to shard 0.
  • Pure routing metadata: excluded from the response hash and not checked by Validate (the relay DON and enclave never read it).

Companion to chainlink#23988, which consumes this field once released.

Deployment Validation

No runtime behavior change until a consumer reads the field; existing relay request/response flows are unaffected.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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

✅ Compatible Changes (2)

pkg/capabilities/v2/actions/confidentialrelay.CapabilityRequestParams (1)
  • ShardIndex — ➕ Added
pkg/capabilities/v2/actions/confidentialrelay.SecretsRequestParams (1)
  • ShardIndex — ➕ Added

📄 View full apidiff report

bolekk added a commit to smartcontractkit/chainlink that referenced this pull request Oct 14, 2026
Fan-out previously raced every configured shard and forwarded whichever
reached quorum first, which is wrong here: secrets.get/capability.exec
requests are not interchangeable across shards. The enclave now selects
the shard via an explicit shard_index in request params (bumped to
chainlink-common's new *int ShardIndex field, PR
smartcontractkit/chainlink-common#2470); a missing value is rejected
rather than defaulted to shard 0, since 0 is itself a valid shard.

fanOutToNodes, evaluateShard (renamed from evaluateShards), and
forwardAfterGrace now operate on the single resolved shard instead of
looping over all of them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@github-actions github-actions Bot 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.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 3f9e970 Previous: 0e9847f Ratio
BenchmarkKeystore_Sign/nop/out-of-process 92362 ns/op 27142 ns/op 3.40
BenchmarkKeystore_Sign/hex/out-of-process 92277 ns/op 25753 ns/op 3.58
BenchmarkKeystore_Sign/ed25519/out-of-process 138719 ns/op 45532 ns/op 3.05

This comment was automatically generated by workflow using github-action-benchmark.

@bolekk
bolekk force-pushed the cre-6798-confidential-relay-shard-index branch from 0cf17e1 to 23cb6a2 Compare October 15, 2026 02:36
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

cre-6798: default ShardIndex to 0 when omitted

Simplify from *int to plain int: an omitted shard_index now defaults
to shard 0 instead of being rejected by the gateway.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bolekk
bolekk force-pushed the cre-6798-confidential-relay-shard-index branch from 23cb6a2 to d10feea Compare October 15, 2026 02:37
@bolekk bolekk changed the title cre-6798: add ShardIndex to confidential relay request params [CRE-6798] add ShardIndex to confidential relay request params Oct 15, 2026
@bolekk
bolekk requested review from cfal and vreff October 15, 2026 02:38
@bolekk
bolekk marked this pull request as ready for review October 15, 2026 02:38
@bolekk
bolekk requested a review from a team as a code owner October 15, 2026 02:38
@bolekk
bolekk requested a review from mchain0 October 15, 2026 02:39
@bolekk
bolekk added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit e7116f3 Oct 15, 2026
35 of 36 checks passed
@bolekk
bolekk deleted the cre-6798-confidential-relay-shard-index branch October 15, 2026 17:05
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