wallet: Controller::generate_blocks now retries on "recoverable mempool errors" - #2057
Merged
ImplOfAnImpl merged 1 commit intoMay 18, 2026
Conversation
ImplOfAnImpl
marked this pull request as ready for review
May 13, 2026 10:42
ImplOfAnImpl
force-pushed
the
appease_clippy_1.95
branch
from
May 15, 2026 14:23
a4647cc to
7635e1a
Compare
ImplOfAnImpl
force-pushed
the
wallet_generate_blocks_fix_mempool_recoverable_error
branch
from
May 15, 2026 14:23
d00cfa8 to
f039b9a
Compare
OBorce
approved these changes
May 18, 2026
ImplOfAnImpl
deleted the
wallet_generate_blocks_fix_mempool_recoverable_error
branch
May 18, 2026 08:52
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Got this failure on CI - https://github.com/mintlayer/mintlayer-core/actions/runs/25721713754/job/75524264465:
In that commit,
basic.rs:87corresponds toassert_eq!(test.exec("node-generate-blocks 20"), "Success");and "Recoverable mempool error" means that while blockprod was collecting txs from the mempool, mempool's current tip changed and the whole block production attempt was aborted.To address the problem,
Controller::generate_blocksnow checks for the "recoverable mempool error" case and retries after a delay.There was also an inconsistency in mempool's
collect_txs, which would returnOk(None)on the tip mismatch in one case (which indicates a "recoverable" error), andBlockConstructionError::TipMovedin another case. I removed theTipMovederror and nowOk(None)is returned in both cases.P.S. I had another attempts to fix the problem in #2056, where
generate_blockswould wait forNewTipevent from the mempool instead. Neither solution is particularly elegant, but I ended up liking this one more.