Skip to content

EliteCoder18/mempool-galaxy

Repository files navigation

mempool-galaxy

Real-time Bitcoin mempool visualized as a particle-physics galaxy in your terminal. Each unconfirmed transaction is a star — fee rate encodes its orbit and color. Blocks eat stars with a nova. No node required: ships with a --demo flag.

Live preview → open preview.html in any browser.


What you see

Color Fee rate
dim gray < 1 sat/vB
cool blue 1–5 sat/vB
cyan 5–20 sat/vB
green 20–50 sat/vB
yellow 50–100 sat/vB
orange 100–300 sat/vB
white-hot 300+ sat/vB

High-fee transactions burn bright at the galactic core. Low-fee dust drifts in the outer arms. CPFP chains render as connected particles orbiting together — package relay made visible.


Install

cargo install mempool-galaxy

Run without a node (bundled demo recording):

mempool-galaxy --demo

Connect to Bitcoin Core:

mempool-galaxy --rpc-url http://127.0.0.1:8332 --rpc-user <user> --rpc-pass <pass>

Falls back to mempool.space WebSocket automatically if RPC is unreachable.


Controls

Key Action
+ / - Zoom in / out
Arrow keys Pan
Mouse scroll Zoom
Mouse drag Pan
p Pause physics
r Reset view
d Toggle demo mode
q / Ctrl-C Quit

Architecture

Five crates communicating over channels and shared state:

mg-pipeline  →  mg-core (MempoolState + TxGraph)
                    ↓
              mg-physics (rayon particle sim)
                    ↓
              mg-renderer (crossterm + half-blocks)
                    ↓
                mg-cli (clap + input handler)
  • mg-pipeline — Bitcoin Core RPC + ZMQ, mempool.space WebSocket fallback
  • mg-corebdk_chain::TxGraph<()> for CPFP ancestor tracking, event broadcast bus
  • mg-physics — per-frame gravity/spring/repulsion forces parallelized with rayon; nova effect on block arrival; spatial grid for O(n·k) at 10k particles
  • mg-renderer — custom framebuffer, Unicode half-block (▀▄█) doubling, differential flush (~80% I/O reduction), Gaussian glow per star
  • mg-cliclap args, config from ~/.config/mempool-galaxy/config.toml, demo record/replay

Requirements

  • Rust 1.80+
  • True-color terminal (iTerm2, Kitty, Alacritty, Windows Terminal)
  • Bitcoin Core (optional — demo mode works standalone)

License

MIT or Apache-2.0

About

No description, website, or topics provided.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
Unknown
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors