Skip to content

Billing: Set compute duration on execution result - #2464

Merged
DylanTinianov merged 2 commits into
mainfrom
CRE-6779-module-execute-result
Oct 14, 2026
Merged

DylanTinianov merged 2 commits into
mainfrom
CRE-6779-module-execute-result

Conversation

@DylanTinianov

@DylanTinianov DylanTinianov commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

The WASM host sets ExecutionResult.compute_duration_ms (chainlink-protos#472 / #473) to the guest run's wall-clock around runWasm. No interface change.

Why

Compute metering (CRE-6779, chainlink#23858) meters what the module that ran the workflow reports. The confidential enclave executes workflows with this same host, so a confidential run gets the field set inside the enclave and it travels back to the node inside SdkExecutionResult — one code path for both.

Notes

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

@DylanTinianov
DylanTinianov force-pushed the CRE-6779-module-execute-result branch from f995c27 to eff4aa5 Compare October 13, 2026 21:14
@DylanTinianov
DylanTinianov requested a review from a team as a code owner October 13, 2026 21:14
@DylanTinianov DylanTinianov changed the title workflows/host: return compute duration from Module.Execute workflows/host: report the compute duration on ExecutionResult Oct 13, 2026
@DylanTinianov
DylanTinianov force-pushed the CRE-6779-module-execute-result branch 3 times, most recently from 15cb0c3 to 2d29eb8 Compare October 14, 2026 14:35
@DylanTinianov
DylanTinianov requested a review from a team as a code owner October 14, 2026 14:35
@DylanTinianov DylanTinianov changed the title workflows/host: report the compute duration on ExecutionResult workflows/wasm/host: set compute_duration_ms on the execution result Oct 14, 2026
@DylanTinianov
DylanTinianov changed the base branch from CRE-6920-confidential-execution-duration to main October 14, 2026 14:39
…(CRE-6779)

The engine meters it as compute. Confidential runs get the same field set
inside the enclave, which executes workflows with this host.

Bump chainlink-protos/cre/go to 94b3b3de (#473).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@DylanTinianov
DylanTinianov force-pushed the CRE-6779-module-execute-result branch from 2d29eb8 to 02b03ce Compare October 14, 2026 14:44
Copilot AI balanced review requested due to automatic review settings October 14, 2026 14:44

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.

🟡 Changes recommended

Pre-hook duration is discarded, causing compute metering to under-report affected executions.

1 open finding
What changed in this PR

Adds WASM execution duration reporting for downstream compute metering.

Changes:

  • Measures runWasm wall-clock duration.
  • Sets ExecutionResult.compute_duration_ms.
  • Updates protobuf dependencies and verifies field presence.
File Description
pkg/​workflows/​wasm/​host/​module.go Records execution duration.
pkg/​workflows/​wasm/​host/​standard_test.go Verifies duration presence.
go.mod Updates CRE protobuf dependency.
go.sum Updates dependency checksums.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/workflows/wasm/host/module.go
@DylanTinianov DylanTinianov changed the title workflows/wasm/host: set compute_duration_ms on the execution result Billing: Set compute duration on execution result Oct 14, 2026
@DylanTinianov DylanTinianov self-assigned this Oct 14, 2026
@DylanTinianov
DylanTinianov requested review from a team as code owners October 14, 2026 15:07
…472

CI requires protos pins from capabilities-development; the main-based
#473 head also lacks capdev-only protos, which broke go generate.
Regenerated the affected descriptors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@DylanTinianov
DylanTinianov added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 53eae87 Oct 14, 2026
56 of 61 checks passed
@DylanTinianov
DylanTinianov deleted the CRE-6779-module-execute-result branch October 14, 2026 16:03
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.

5 participants