Skip to content

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Jan 18, 2026

Describe your changes and provide context

This PR adds documentation (docs/TRACE_GAS_CHECK_DISCREPANCY.md) to explain trace gas check failures for historical failed transactions. The discrepancy (trace gas > receipt gas) is caused by a "double refund" bug in the go-ethereum fork (fixed in PR #2692) that incorrectly applied gas refunds to failed transactions in older blocks. The document clarifies the root cause, impact, and provides recommendations for validation tools.

Testing performed to validate your change

The change is purely documentation. The content was validated through an investigation that confirmed the "double refund" bug as the root cause for the observed gas discrepancies in historical blocks.


Slack Thread

Open in Cursor Open in Web

…ed transactions

This documents the root cause of trace gas check failures for failed transactions
in historical blocks. The issue is caused by the 'double refund' bug in the
go-ethereum fork that was fixed in PR #2692 (v1.15.7-sei-14).

Key findings:
- Trace gas > receipt gas for failed transactions in historical blocks
- Caused by incorrect refund application for failed transactions before the fix
- Receipts stored incorrect (lower) gas values
- Trace replay with current code correctly calculates gas (higher)

Includes recommended resolution options for validation tools.

Co-authored-by: kartik <kartik@seinetwork.io>
@cursor
Copy link

cursor bot commented Jan 18, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 18, 2026, 6:59 PM

@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.75%. Comparing base (d996f50) to head (32d4492).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2714      +/-   ##
==========================================
- Coverage   43.76%   43.75%   -0.01%     
==========================================
  Files        1914     1914              
  Lines      159512   159512              
==========================================
- Hits        69803    69798       -5     
- Misses      83287    83291       +4     
- Partials     6422     6423       +1     
Flag Coverage Δ
sei-chain 45.75% <ø> (+<0.01%) ⬆️
sei-cosmos 38.21% <ø> (-0.01%) ⬇️
sei-db 68.72% <ø> (ø)
sei-tendermint 47.27% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 18 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.

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