Skip to content

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

@TomasArrachea

Description

@TomasArrachea

While running the TPS benchmarks (#2073) against a local node, the block-producer panicked in mempool::select_batch. The RPC, store and validator stayed up, only the block-producer and the ntx-builder terminated. I think an error might have surfaced because the TPS was tweaked for running the benchmarks.

Error:

2026-05-13T19:39:09.928619Z ERROR batch_builder.build_batch:batch_builder.select_batch:mempool.select_batch:
panicked at crates/block-producer/src/mempool/mod.rs:300:13:
failed to append batch to dependency graph: unauthenticated input notes are unknown:
[Word([4304757709219042173, 2950813626173734602, 3514952793182312376, 10187277612994866210])]
thread 'tokio-rt-worker' (8) panicked at crates/block-producer/src/mempool/mod.rs:300:13

Propagated up ~2s later, exiting the component:

Error: failed while serving block-producer component
    0: task batch-builder panic'd
    1: task 21 panicked with message "Batch worker pool panic: task 4829 panicked with
       message \"failed to append batch to dependency graph: unauthenticated input notes
       are unknown: [Word([4304757709219042173, ...])]\""

Hypothesis: I think this is triggered when an in-flight transaction's unauthenticated input note was produced by a transaction that has since been pruned from the mempool. Th tx's view of which inputs are authenticated is set at submission, so it keeps claiming the note as unauthenticated even after the block that created the note has been committed. When the mempool then tries to batch it, the batch graph no longer has that note and rejects the batch.

Possible fix: When a transaction is pruned from the mempool, its output notes have already been committed. Before removing the transaction, we could walk its still in-flight descendants and, for any of those output notes the descendants are treating as unauthenticated inputs, mark them as authenticated.

Metadata

Metadata

Labels

block-producerRelated to the block producer componentmempoolRelates to the mempool

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions