Skip to content

fix(mempool): inflight notes are considered unauthenticated once pruned#2097

Open
Mirko-von-Leipzig wants to merge 2 commits into
nextfrom
mirko/fix-mempool
Open

fix(mempool): inflight notes are considered unauthenticated once pruned#2097
Mirko-von-Leipzig wants to merge 2 commits into
nextfrom
mirko/fix-mempool

Conversation

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig commented May 19, 2026

This PR fixes a panic in the mempool which can occur when under extreme load.

The root cause is some missing book keeping around block pruning. What happens is that

  1. transaction A creates note A'
  2. transaction B consumed note A', this succeeds because the mempool knows the note is inflight.
  3. transaction A is committed in block C
  4. block C is eventually pruned, removing note A' from all graphs
  5. transaction B is then selected for inclusion in a batch
  6. batch DAG panic! because B's unauthenticated note A' is now unknown

The fix is to mark all notes from pruned blocks as authenticated (since we know they definitely exist and are committed). The fix was tested and confirmed using TDD.

This only occurred under extreme load because it required enough transactions to delay selection of B to after A was both committed and pruned.

Fixes #2079

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.

Block-producer panics on select_batch with unauthenticated input notes are unknown

1 participant