Skip to content

fix(giga): bail on wrong nonce as v2 does#2963

Merged
arajasek merged 1 commit intomainfrom
asr/fix-nonce-validation
Mar 2, 2026
Merged

fix(giga): bail on wrong nonce as v2 does#2963
arajasek merged 1 commit intomainfrom
asr/fix-nonce-validation

Conversation

@arajasek
Copy link
Contributor

Describe your changes and provide context

Reopening #2877 against main

fixes mismatch of this block. there are 2 txs (don't show up on seiscan) that have invalid nonces:

V2's log: "nonce too high: address 0x6a9dE37D180C56b7E9362d7688ACa8B7acEb425C, tx: 23213 state: 23211"

V2's log: "nonce too high: address 0x4A7d9e41340d1dba4d157fdE37Ed1697E42CBC7b, tx: 7423188 state: 7423187"

In this case we just bail WITHOUT bumping the nonce.

Testing performed to validate your change

tests pass, get us past the block in question.

@github-actions
Copy link

github-actions bot commented Feb 23, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 2, 2026, 5:50 PM

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.30%. Comparing base (c06d478) to head (870f86b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/app.go 0.00% 11 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2963      +/-   ##
==========================================
- Coverage   58.31%   58.30%   -0.01%     
==========================================
  Files        2108     2108              
  Lines      173661   173672      +11     
==========================================
  Hits       101264   101264              
- Misses      63383    63394      +11     
  Partials     9014     9014              
Flag Coverage Δ
sei-chain-pr 48.89% <0.00%> (?)
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 70.44% <0.00%> (-0.59%) ⬇️
🚀 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.

app/app.go Outdated
expectedNonce := app.GigaEvmKeeper.GetNonce(ctx, sender)
txNonce := ethTx.Nonce()
if txNonce != expectedNonce {
// Calculate intrinsic gas for reporting (V2 reports this as gasUsed)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you link where this happens for v2? from what I see the v2 ante handler would just exit with 0 gas used.

not blocking though since gas used no longer affects consensus

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, you're right. I confused myself with this case below when it does report a value: https://github.com/sei-protocol/sei-chain/pull/2963/changes#diff-0f1d2976054440336a576d47a44a37b80cdf6701dd9113012bce0e3c425819b7R1861

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Fixed.)

@arajasek arajasek force-pushed the asr/fix-nonce-validation branch 2 times, most recently from 07d9cce to 06a7fc6 Compare February 27, 2026 15:07
@arajasek arajasek enabled auto-merge (squash) March 2, 2026 16:35
@arajasek arajasek force-pushed the asr/fix-nonce-validation branch from 06a7fc6 to 9c6baa7 Compare March 2, 2026 16:35
@arajasek arajasek force-pushed the asr/fix-nonce-validation branch from 9c6baa7 to 870f86b Compare March 2, 2026 17:49
@arajasek arajasek merged commit 555d520 into main Mar 2, 2026
39 checks passed
@arajasek arajasek deleted the asr/fix-nonce-validation branch March 2, 2026 18:03
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