mempool-dat

Thursday, May 16, 2019

A Golang package that can deserialize Bitcoin Core’s mempool.dat files. This is a toy project. I developed this to learn more about Golang and the mempool.dat file format by Bitcoin Core.

This Go package parses Bitcoin Core’s mempool.dat files. These are automatically written since Bitcoin Core v0.14.0 on shutdown and can be written manually by calling the RPC savemempool since Bitcoin Core v0.16.0.

The package offers access to the mempool.dat’s

- header
    - version
    - number of transactions
- mempool entries
    - raw transaction parsed as (https://godoc.org/github.com/btcsuite/btcd/wire#MsgTx)
    - first seen timestamp
    - the feeDelta
- and the not-parsed mapDeltas as byte slices

Source on GitHub Documentation on GoDoc

I’ve talked about the LoadMempool() and DumpMempool() functions of Bitcoin Core at the 2019 Chaincode Labs Summer Residency seminar. These functions are used to write and read the mempool.dat file.

Slides (Google Slides)
All text and images in this work are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License Creative Commons License

Next

Image for mempool.observer (2019 version)

June 1, 2019

mempool.observer (2019 version)

The mempool.observer website displays visualizations about my Bitcoin mempool. For example, a visualization of my current mempool and the historical mempool of my node is shown. The idea is to provide information about the current mempool state to a Bitcoin user with a seemingly stuck and longtime-unconfirmed transaction. Additionally, the site can be used for double-checking feerate estimates before sending a transaction.

Previous

Image for c-lightning plugin: csvexportpays

March 2, 2019

c-lightning plugin: csvexportpays

A toy plugin for c-lightning to export all payments made with a c-lightning node to a .csv file. I build this a few days after Blockstream released the plugin support in c-lightning v0.7 to showcase how simple it is to build plugins.