Skip to content

Conversation

@beer-1
Copy link
Contributor

@beer-1 beer-1 commented Nov 11, 2025

Description

Closes: #25543

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.23%. Comparing base (1cc55e6) to head (e7d3c85).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #25550   +/-   ##
=======================================
  Coverage   68.23%   68.23%           
=======================================
  Files         894      894           
  Lines       58149    58159   +10     
=======================================
+ Hits        39676    39685    +9     
- Misses      18473    18474    +1     
Files with missing lines Coverage Δ
baseapp/baseapp.go 84.85% <100.00%> (+0.49%) ⬆️

... and 1 file with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aljo242
Copy link
Contributor

aljo242 commented Nov 13, 2025

@beer-1 lint failing

@beer-1
Copy link
Contributor Author

beer-1 commented Nov 13, 2025

@aljo242 fixed!

@aljo242
Copy link
Contributor

aljo242 commented Nov 14, 2025

@beer-1 do you see any potential for performance overhead due to this?

@beer-1
Copy link
Contributor Author

beer-1 commented Nov 14, 2025

@beer-1 do you see any potential for performance overhead due to this?

I don't think this introduce any performance degradation because it is just changing order of execution

@beer-1
Copy link
Contributor Author

beer-1 commented Dec 24, 2025

comment to prevent stale closing

}

if mode == execModeCheck {
mempoolCtx = ctx.WithMultiStore(msCache)
Copy link
Contributor

Choose a reason for hiding this comment

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

confirming my understanding here, we need to set the multistore for mempoolCtx back to to msCache since we are now not writing msCache before calling mempool.Insert when in modeCheck. So if we do not use msCache as our multistore, mmempool.Insert may operate on a stale multistore. Once we do call commitAnteCache though, we are safe to use ctx again since its ms has now been updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

I modified the mempool.Insert call locally to use ctx instead of mempoolCtx and all of our unit tests still passed. Could you think of a unit test that would demonstrate this ms requirement? imo its not super clear from this logic that that is required (would probably be easiest with a mock mempool and ante handler just checking values in the ms).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: prevent invalid sequence rejections caused by early ante state writes

3 participants