fix: don't report block-level gas for failed tx decodes (CON-244)#3205
Merged
wen-coding merged 3 commits intomainfrom Apr 9, 2026
Merged
fix: don't report block-level gas for failed tx decodes (CON-244)#3205wen-coding merged 3 commits intomainfrom
wen-coding merged 3 commits intomainfrom
Conversation
When ante handling never runs (e.g. decode failure), the deferred epilogue in DeliverTx was reading the block-level gas meter instead of a per-tx meter. Guard against this by checking whether a tx-scoped meter was installed before reporting GasUsed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Keep simulation and CheckTx consistent with the DeliverTx fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3205 +/- ##
=======================================
Coverage 58.65% 58.65%
=======================================
Files 2055 2055
Lines 168498 168507 +9
=======================================
+ Hits 98835 98843 +8
- Misses 60878 60880 +2
+ Partials 8785 8784 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
sei-will
approved these changes
Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
codchen
approved these changes
Apr 9, 2026
yzang2019
added a commit
that referenced
this pull request
Apr 9, 2026
* main: fix: don't report block-level gas for failed tx decodes (CON-244) (#3205)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GasUsedfrom the block-level gas meter instead of a per-tx meter, since the ante handler never ran to install one.app/legacyabci/deliver_tx.go(production DeliverTx)app/legacyabci/check_tx.go(production CheckTx)sei-cosmos/baseapp/baseapp.go(simulation/CheckTx via runTx)Supersedes #3202.
Test plan
TestDecodeFailureTxReportsZeroGas(app) — successful bank send reports nonzero gas, decode failure reports zero, insufficient-funds tx (ante handler ran) reports nonzero gasTestRunTxDecodeError(baseapp) — nil tx with prior block-level gas reports zero GasUsed🤖 Generated with Claude Code