Skip to content

[Access] Include computation used passed from execution nodes#8460

Merged
peterargue merged 1 commit intomasterfrom
peter/add-computation-used-execapi
Feb 25, 2026
Merged

[Access] Include computation used passed from execution nodes#8460
peterargue merged 1 commit intomasterfrom
peter/add-computation-used-execapi

Conversation

@peterargue
Copy link
Contributor

@peterargue peterargue commented Feb 24, 2026

#8451 added support for returning computation used.
#8458 updates ENs to include it in their response.

This PR hooks populates computation used when getting transaction results from execution nodes

Summary by CodeRabbit

  • New Features

    • Transaction results now include a new field that exposes computation resource usage metrics from execution node responses, allowing clients to see computation consumption for each transaction.
  • Tests

    • Updated test expectations to verify computation usage is properly propagated in transaction result responses across various scenarios.

@peterargue peterargue requested a review from a team as a code owner February 24, 2026 13:45
@github-actions
Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 193c709 and 00c8f7c.

📒 Files selected for processing (2)
  • engine/access/rpc/backend/transactions/provider/execution_node.go
  • engine/access/rpc/backend/transactions/transactions_functional_test.go

📝 Walkthrough

Walkthrough

This pull request extends transaction result responses from execution nodes by adding a new ComputationUsed field. The field is populated from execution node computation usage data across multiple transaction result constructors, and corresponding test expectations are updated to align with this addition.

Changes

Cohort / File(s) Summary
Execution Node Provider Implementation
engine/access/rpc/backend/transactions/provider/execution_node.go
Added ComputationUsed field population in transaction result constructors (TransactionResult, TransactionResultByIndex, userTransactionResults, systemTransactionResults) by extracting computation usage values from execution node responses.
Functional Tests
engine/access/rpc/backend/transactions/transactions_functional_test.go
Removed hard-coded zeroing of ComputationUsed in test expectations; tests now rely on actual computation usage values from EN gRPC response mappings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • fxamacker
  • zhangchiqing

Poem

🐰 A rabbit hops through execution nodes so keen,
Counting computation with values pristine,
ComputationUsed now flows through each result,
Transactions now know what resources they've culled! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding computation used data from execution nodes to transaction results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch peter/add-computation-used-execapi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...pc/backend/transactions/provider/execution_node.go 0.00% 36 Missing ⚠️

📢 Thoughts on this report? Let us know!

@peterargue peterargue added this pull request to the merge queue Feb 25, 2026
Merged via the queue into master with commit bff368f Feb 25, 2026
61 checks passed
@peterargue peterargue deleted the peter/add-computation-used-execapi branch February 25, 2026 00:51
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.

4 participants