Skip to content

do not create receipts for invisible txs#2997

Open
codchen wants to merge 1 commit intomainfrom
tony/no-receipt-for-no-nonce-bump
Open

do not create receipts for invisible txs#2997
codchen wants to merge 1 commit intomainfrom
tony/no-receipt-for-no-nonce-bump

Conversation

@codchen
Copy link
Collaborator

@codchen codchen commented Mar 2, 2026

Describe your changes and provide context

Historically we've been creating artificial receipts for transactions that fail ante handler (i.e. before the tx even enters the EVM). This creates inconsistency in the case where a transaction fails in a way that doesn't bump nonce (which would make the transaction invisible from RPC responses). This PR addresses that inconsistency by not creating receipts for transactions that don't bump nonce.

Testing performed to validate your change

unit tests

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 2, 2026, 6:12 AM

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 2, 2026, 6:12 AM

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.41%. Comparing base (9ccd5ca) to head (e8ea49f).
⚠️ Report is 76 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2997       +/-   ##
===========================================
+ Coverage   57.16%   70.41%   +13.25%     
===========================================
  Files        2091        5     -2086     
  Lines      171145      463   -170682     
===========================================
- Hits        97827      326    -97501     
+ Misses      64609      107    -64502     
+ Partials     8709       30     -8679     
Flag Coverage Δ
sei-chain ?
sei-cosmos ?
sei-db 70.41% <ø> (+1.68%) ⬆️

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

for _, deferredInfo := range evmTxDeferredInfoList {
txHash := common.BytesToHash(deferredInfo.TxHash)
if deferredInfo.Error != "" && txHash.Cmp(ethtypes.EmptyTxsHash) != 0 {
if !k.GetNonceBumped(ctx, deferredInfo.TxIndex) {

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants