Skip to content

Always set gas meter for every transaction#2583

Merged
codchen merged 1 commit intomainfrom
tony/set-gas-meter-at-begin
Dec 11, 2025
Merged

Always set gas meter for every transaction#2583
codchen merged 1 commit intomainfrom
tony/set-gas-meter-at-begin

Conversation

@codchen
Copy link
Copy Markdown
Collaborator

@codchen codchen commented Dec 8, 2025

Describe your changes and provide context

Setting gas meter should be the very first thing when handling a transaction. If that's not the case and the handler exits for whatever reason, the upstream logic will use the common gas meter set at the beginning of FinalizeBlock as the transaction's gas meter, which can cause unexpected results.

Testing performed to validate your change

local cluster

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 8, 2025

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 11, 2025, 2:06 PM

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.25%. Comparing base (cf02339) to head (b1f2d06).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/ante/cosmos_checktx.go 0.00% 10 Missing ⚠️
app/ante/cosmos_delivertx.go 0.00% 5 Missing ⚠️

❌ Your project status has failed because the head coverage (38.27%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2583      +/-   ##
==========================================
- Coverage   43.25%   43.25%   -0.01%     
==========================================
  Files        1850     1850              
  Lines      152293   152294       +1     
==========================================
- Hits        65881    65869      -12     
- Misses      80549    80558       +9     
- Partials     5863     5867       +4     
Flag Coverage Δ
sei-chain 42.07% <0.00%> (-0.04%) ⬇️
sei-cosmos 38.03% <ø> (+<0.01%) ⬆️
sei-db 69.06% <ø> (ø)
sei-ibc-go 55.96% <ø> (ø)
sei-tendermint 47.52% <ø> (+<0.01%) ⬆️
sei-wasmd 42.10% <ø> (ø)
sei-wasmvm 39.88% <ø> (ø)

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

Files with missing lines Coverage Δ
app/ante/cosmos_delivertx.go 0.00% <0.00%> (ø)
app/ante/cosmos_checktx.go 0.00% <0.00%> (ø)

... and 13 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.

@sei-will sei-will self-requested a review December 8, 2025 08:33
@codchen codchen force-pushed the tony/set-gas-meter-at-begin branch from 8f417e8 to ce57e18 Compare December 9, 2025 15:24
@codchen codchen force-pushed the tony/set-gas-meter-at-begin branch from ce57e18 to b1f2d06 Compare December 11, 2025 14:06
@codchen codchen merged commit 8ec3c40 into main Dec 11, 2025
32 of 41 checks passed
@codchen codchen deleted the tony/set-gas-meter-at-begin branch December 11, 2025 14:09
arajasek added a commit that referenced this pull request Jan 29, 2026
arajasek added a commit that referenced this pull request Jan 30, 2026
arajasek added a commit that referenced this pull request Jan 30, 2026
arajasek added a commit that referenced this pull request Feb 2, 2026
arajasek added a commit that referenced this pull request Feb 4, 2026
arajasek added a commit that referenced this pull request Feb 5, 2026
arajasek added a commit that referenced this pull request Feb 6, 2026
arajasek added a commit that referenced this pull request Feb 10, 2026
arajasek added a commit that referenced this pull request Feb 18, 2026
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