Repository navigation
Billing: meter confidential compute duration - #23961
Closed
DylanTinianov wants to merge 1 commit into
Closed
DylanTinianov wants to merge 1 commit into
DylanTinianov wants to merge 1 commit into
Conversation
Contributor
|
✅ No conflicts with other open PRs targeting |
Contributor
|
I see you updated files related to
|
DylanTinianov
force-pushed
the
CRE-6920-confidential-compute-usage
branch
from
October 9, 2026 19:14
4e22826 to
147f757
Compare
…ration (CRE-6920) ConfidentialModule records the enclave's execution_duration_ms for each execution it handles. The engine's compute usage emission now bills that value for confidential executions instead of skipping them: the engine's own computeDuration is the enclave round trip, not the customer's compute. When an older enclave reports no duration the record is skipped with a warning. ConfidentialExecutionTracker.TookExecution returns the ConfidentialExecution (Measured, Duration) alongside the took flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
DylanTinianov
force-pushed
the
CRE-6920-confidential-compute-usage
branch
from
October 9, 2026 19:19
147f757 to
6dee883
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



CRE-6920 (parent CRE-6778). Stacked on #23858 (compute usage records). Depends on chainlink-common #2457 and the enclave side CRE-6919 (chainlink-confidential-compute).
What
#23858 skipped the compute record for executions delegated to the confidential module, because the engine's
computeDurationfor those is the enclave round trip. This PR bills them from the enclave's own measurement:ConfidentialModule.ExecutestoresConfidentialWorkflowResponse.execution_duration_ms(when present) for the execution.ConfidentialExecutionTracker.TookExecutionnow returns aConfidentialExecution{Measured, Duration}with the took flag.baseEngine.emitComputeUsageuses that duration for confidential executions. If the enclave did not report one (older enclave), it logs a warning and emits nothing rather than billing the round trip.Same record shape as ordinary compute:
cre:workflow:compute, value in ms,EventId= execution id, log lineEmitted capability usage meter record.Tests
compute_usage_test.go: enclave-measured duration is billed (value1234), unmeasured confidential execution emits nothing and warns.🤖 Generated with Claude Code