Skip to content

Tidy app gas accounting loop and tests#3464

Merged
masih merged 4 commits into
mainfrom
masih/tidy-app
May 22, 2026
Merged

Tidy app gas accounting loop and tests#3464
masih merged 4 commits into
mainfrom
masih/tidy-app

Conversation

@masih

@masih masih commented May 19, 2026

Copy link
Copy Markdown
Collaborator
  • Remove nonzeroTxsCnt: declared and incremented but never read.
  • Remove a stale "Skipping" inline comment that no longer describes
    the branch it sits next to.
  • Reduce allocations and optimise for fast path on decode failure.

- Remove `nonzeroTxsCnt`: declared and incremented but never read.
- Remove a stale "Skipping" inline comment that no longer describes
  the branch it sits next to.
- Reduce allocations and optimise for fast path on decode failure.
@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 22, 2026, 7:54 AM

@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.72093% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.09%. Comparing base (d4fc9c5) to head (c7c0ad3).

Files with missing lines Patch % Lines
app/app.go 83.72% 4 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3464      +/-   ##
==========================================
- Coverage   59.11%   59.09%   -0.03%     
==========================================
  Files        2187     2187              
  Lines      182237   182039     -198     
==========================================
- Hits       107730   107570     -160     
+ Misses      64851    64821      -30     
+ Partials     9656     9648       -8     
Flag Coverage Δ
sei-chain-pr 50.46% <83.72%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
app/app.go 68.80% <83.72%> (-0.60%) ⬇️

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

@masih masih marked this pull request as ready for review May 19, 2026 14:24
@masih masih requested review from arajasek and sei-will May 19, 2026 14:24
@cursor

cursor Bot commented May 19, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Touches consensus-critical proposal processing and block gas limit checks; behavior changes (fail-fast on decode errors/nil txs and stricter error propagation) could cause unexpected proposal rejections if edge cases differ from prior handling.

Overview
Tightens proposal-time transaction decoding and block gas validation. ProcessProposalHandler now decodes tx bytes via a context-aware DecodeTxBytesConcurrently that uses errgroup with a worker limit, fails fast on decode errors/panics, and rejects the proposal immediately when decoding fails.

Refactors checkTotalBlockGas semantics and safety. The gas accounting loop is simplified (removes unused counters, adds explicit overflow guards, consolidates max-gas checks) and now treats any nil decoded tx as an immediate rejection instead of skipping it; logic around gasless heuristics and EVM gas-estimate vs gas-wanted selection is clarified.

Updates and expands tests. The checkTotalBlockGas tests are refactored with shared helpers, updated to assert the new nil-tx rejection behavior, and add coverage for preferring valid EVM gas estimates over gasWanted.

Reviewed by Cursor Bugbot for commit c7c0ad3. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fdfb33e. Configure here.

Comment thread app/app.go
@masih masih added this pull request to the merge queue May 22, 2026
Merged via the queue into main with commit cb72147 May 22, 2026
49 checks passed
@masih masih deleted the masih/tidy-app branch May 22, 2026 12:37
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.

3 participants