Complete mempool cleanup jobs and discard stale results - #2517
Open
a-shannon wants to merge 2 commits into
Open
Conversation
a-shannon
marked this pull request as ready for review
September 7, 2026 00:02
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.
Mempool cleanup now reports completion after both successful validation and exceptional failure, allowing the auditor to continue with its latest queued request. Completion is matched to the active worker and job.
The holder applies cleanup results only while their state revision, original transaction entries and relevant spending/data-input dependencies remain current. State revisions change before mutation attempts and after installation. Removed or replaced entries cannot be restored by old results, while unrelated pool admissions still allow cleanup to progress. Refreshes and invalidations are consumed together.
Validation: JDK 8, Scala 2.12.20; all 17 tests in MempoolCleanupSpec and MempoolAuditorSpec pass. Coverage includes failure recovery, queued work, stale completion and wrong sender, removed/replaced entries, prerequisite changes in both directions, failed state updates, and snapshot outcomes. The original lifecycle and reinsertion assertions fail before the fix. Removing either pre-mutation revision change also fails its corresponding owner test. Independent source and test review completed.
This overlaps the cleanup refactor in #2457 and will need coordination when integrating its worker API.
A separate test-only follow-up, shared with #2511, polls selected-header agreement and records bounded rollback observations. Nine observation contracts pass and independent review is complete. All eight CI checks pass at
a6a3225e3bf236a7eb1052c8ab44b397c55029c8, including the real integration scenarios.