-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: mempool locking mechanism in v1 and cat (#1582)
This is residual of #1553 The problem is now even more subtle. Because the mempool mutexes weren't over both CheckTx and the actual adding of the transaction to the mempool we occasionally hit a situation as follows: - CheckTx a tx with nonce 2 - Before saving it to the store, collect all transactions and recheck tx. This excludes the last tx with nonce 2, thus the nonce in the state machine is still 1 - Save the tx to the pool - New tx comes in with nonce 3. The application is at 1 so rejects it expecting the next to be 2. This PR fixes this pattern, however this won't be watertight for the CAT pool until we can order both on gas fee (priority) and nonce. --------- Co-authored-by: Rootul Patel <[email protected]>
- Loading branch information
Showing
4 changed files
with
210 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.