Add BPF tracepoints for the mempool

Add monitoring tracepoints to mempool operations to allow performant, fine-grained measurement.
Checked Out
$4,500.00
Check Out Task
Task Bounty Details

Days

Estimated Effort

Checked Out

Current Status

$4,500.00

Paid in USD or equivalent BTC upon acceptance

Issue

Bitcoin has a statically defined tracing utility that allows extracting structured data during Bitcoin runtime in an unobtrusive way using ePBF (extended Berkeley Packet Filters). For background, see this discussion.

Certain tracepoints have already been defined for e.g. the UTXO set cache. It may be useful to add similar instrumentation to various mempool operations.

This bounty entails using Bitcoin's existing API to add tracepoints for the mempool, including
 - addition of a transaction to the mempool
 - eviction of a transaction from the mempool  
 
The tracepoints should include the time, transaction data, and any other information useful for monitoring mempool contents.

Note that this task is best approached by someone who has a proposed use for the data extracted from the tracepoints, since reviewers often want to see a concrete use-case for new tracepoints.

Prerequisite Skills

Basic C++

Code Guidelines

Repository Code Guidelines Page

Definition of Done

PR merged which adds the specified tracepoints

Check Out Task