Skip to content

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

Open
arajasek wants to merge 1 commit intomainfrom
asr/fix-nonce-validation
Open

fix(giga): bail on wrong nonce as v2 does#2963
arajasek wants to merge 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✅ passedFeb 27, 2026, 3:08 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.12%. Comparing base (7cfe94a) to head (06a7fc6).

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.12%   58.12%   -0.01%     
==========================================
  Files        2111     2111              
  Lines      173544   173555      +11     
==========================================
  Hits       100879   100879              
- Misses      63706    63717      +11     
  Partials     8959     8959              
Flag Coverage Δ
sei-chain-pr 49.51% <0.00%> (?)
sei-db 69.50% <ø> (ø)

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

Files with missing lines Coverage Δ
app/app.go 70.86% <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

@arajasek arajasek force-pushed the asr/fix-nonce-validation branch from 0a75710 to 07d9cce Compare February 27, 2026 14:29
@arajasek arajasek force-pushed the asr/fix-nonce-validation branch from 07d9cce to 06a7fc6 Compare February 27, 2026 15:07
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