Skip to content

fix: returning empty tracer object on transactions without executed opcodes (#4965)#4989

Open
BartoszSolkaBD wants to merge 2 commits intohiero-ledger:mainfrom
BartoszSolkaBD:4965-Allow-empty-tracer-for-transactions-without-executed-opcodes
Open

fix: returning empty tracer object on transactions without executed opcodes (#4965)#4989
BartoszSolkaBD wants to merge 2 commits intohiero-ledger:mainfrom
BartoszSolkaBD:4965-Allow-empty-tracer-for-transactions-without-executed-opcodes

Conversation

@BartoszSolkaBD
Copy link
Contributor

@BartoszSolkaBD BartoszSolkaBD commented Feb 25, 2026

Description

This PR fixes an issue where debug_traceTransaction could fail with RESOURCE_NOT_FOUND for transactions that reached consensus, produced a contract result, but did not execute any EVM opcodes or actions. It updates the OpcodeLogger, CallTracer, and PrestateTracer flows to return empty traces for such “non-executed but non-synthetic” transactions, independent of HEDERA_SPECIFIC_REVERT_STATUSES, while preserving the existing synthetic-transaction behavior.

Related issue(s)

Fixes #4965

Testing Guide

  1. Execute debug_traceTransaction on Hedera Mainnet for transaction hash mentioned in the issue ("0x61f9f18591c513ec3f5e93a49457781c603eaaf1a583703f505e0fd76ba41ada")
  2. Validate that empty tracer is returned instead of resource not found error

Changes from original design (optional)

N/A

Additional work needed (optional)

N/A

Checklist

  • I've assigned an assignee to this PR and related issue(s) (if applicable)
  • I've assigned a label to this PR and related issue(s) (if applicable)
  • I've assigned a milestone to this PR and related issue(s) (if applicable)
  • I've updated documentation (code comments, README, etc. if applicable)
  • I've done sufficient testing (unit, integration, etc.)

…pcodes (hiero-ledger#4965)

Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
@BartoszSolkaBD BartoszSolkaBD requested review from a team as code owners February 25, 2026 07:47
@BartoszSolkaBD BartoszSolkaBD self-assigned this Feb 25, 2026
@BartoszSolkaBD BartoszSolkaBD added the bug Something isn't working label Feb 25, 2026
@BartoszSolkaBD BartoszSolkaBD added this to the 0.76.0 milestone Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

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

Files with missing lines Patch % Lines
packages/relay/src/lib/debug.ts 0.00% 6 Missing ⚠️

❌ Your project check has failed because the head coverage (76.67%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (eb0e545) and HEAD (925e2f9). Click for more details.

HEAD has 22 uploads less than BASE
Flag BASE (eb0e545) HEAD (925e2f9)
21 3
ws-server 1 0
config-service 1 0
relay 1 0
server 1 0
@@             Coverage Diff             @@
##             main    #4989       +/-   ##
===========================================
- Coverage   96.02%   76.67%   -19.35%     
===========================================
  Files         143      143               
  Lines       24064    24064               
  Branches     1912      926      -986     
===========================================
- Hits        23108    18452     -4656     
- Misses        932     5591     +4659     
+ Partials       24       21        -3     
Flag Coverage Δ
config-service ?
relay ?
server ?
ws-server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/relay/src/lib/debug.ts 35.67% <0.00%> (-62.20%) ⬇️

... and 83 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jasuwienas
jasuwienas previously approved these changes Feb 25, 2026
Copy link
Contributor

@jasuwienas jasuwienas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
It looks like we’re wrapping getContractsResultsOpcodes and getContractResultWithRetry in try/catch blocks, and when we get a 404, we return null - so this should work as expected (unless we get sometjing else than 404 from mirrornode)

…iero-ledger#4965)

Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow empty tracer for transactions without executed opcodes

2 participants