3 ms·
Hi! I've spent the last few weeks developing a visualization of live Bitcoin activity, which shows how new transactions pile up in the mempool before being pack
by mononaut 5y ago
Hi! I've spent the last few weeks developing a visualization of live Bitcoin activity, which shows how new transactions pile up in the mempool before being packaged into blocks.
Whenever I make Bitcoin transactions, I tend to sit mindlessly refreshing a block explorer until they're confirmed. My aim with this project was to come up with something a bit more engaging to watch while waiting for the next block.
The front end is built in Svelte, with the visualization itself rendered in vanilla WebGL. On the back there's an Elixir server which consumes ZeroMQ events emitted by a local Bitcoin node, parses the raw block and transaction data, and forwards it over websockets to any connected clients.
This was my first foray into both Svelte and Elixir/Erlang (coming from a professional background of mostly Vue, Node and Python), so the whole project was a bit of a learning exercise.
Aside from playing with those bits of new tech, I particularly enjoyed the challenge of designing the Mondrian-style online square packing algorithm, and streamlining the graphics pipeline to handle several thousand separately animated squares without hammering the processor or frame rate too hard.
I'd love to hear any feedback or questions!
- breck 5y agoLove it! Really helpful visualization. Gives me a better feel for the mempool. Some thoughts: - Why are transactions dropping in bursts? - Would it make more sense to have the latest block at the bottom, then the white line on top, then the mempool on top of that? - It might be cool to give some room to a context of the whole blockchain. - "3 minutes ago" on each transaction hover popup would be helpful. - It might be fun to add "highlight a transaction", and then someone could use this and see their transaction in the mempool while they wait - An "ETA" until next block might be helpful - Perhaps also show $USD? - Can you make one for BitClout?