Skip to content

arminsabouri/Mempool-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mempool Monitor

A Rust-based Bitcoin mempool monitoring tool that tracks transactions, detects Replace-By-Fee (RBF) updates, and when transactions are mined. This tool connects directly to your Bitcoin node via ZMQ and RPC to provide real-time mempool analysis. The goal of this project is to collect data on unconfirmed transactions to help with various data driven research projects.

Prerequisites

  • Rust toolchain (1.70 or later)
  • Running Bitcoin Core node with:
    • txindex=1
    • RPC enabled (authentication via user and password)
    • ZMQ enabled (zmqpubrawtx=tcp://127.0.0.1:28332)

Usage

Example regtest run:

cargo run -- --bitcoind-user foo --bitcoind-password bar --bitcoind-host "127.0.0.1" --bitcoind-rpc-port 18443 --bitcoind-zmq-port 28373

Building

docker run --rm -it -v "$PWD":/volume -w /volume messense/rust-musl-cross:x86_64-musl cargo build --release --target x86_64-unknown-linux-musl

TODO

  • add tests
  • DB operations should be async
  • Do not start if node is not synced
  • Should not start if mempool is not loaded
  • Replace sled with something that allows you to query via various indecies
  • multi-threading
  • add record CPFP
  • Track prune
  • prune large witnesses
  • Capture mempool size and tx count at the time of entry and exit
  • Some CI checks: Lint, clippy, future tests
  • Do not panic if rpc fails

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published