Skip to content

Complete mempool cleanup jobs and discard stale results - #2517

Open
a-shannon wants to merge 2 commits into
ergoplatform:masterfrom
a-shannon:fix/mempool-cleanup-lifecycle
Open

Complete mempool cleanup jobs and discard stale results#2517
a-shannon wants to merge 2 commits into
ergoplatform:masterfrom
a-shannon:fix/mempool-cleanup-lifecycle

Conversation

@a-shannon

@a-shannon a-shannon commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.

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.

1 participant