Bitcoin JSON RPC has savemempool command for saving mempool data to the disk. However, it seems like saved file is binary. How can I read this file in human readable format?


  • 1
    Does this answer your question? DumpMempool() and LoadMempool() in src/validation.cpp Mar 30, 2023 at 14:44
  • You can also check how this is implemented in github.com/bitcoin/bitcoin/blob/master/src/kernel/… written in C++, where DumpMempool() function is responsible for dumping the contents of a transaction mempool to a file and LoadMempool() function is responsible for loading the contents of the mempool from a specified file on disk. To read the transactions, you would need to create a similar LoadMempool function in your chosen programming language and parse the structured objects: uint64_t version ... up to unbroadcast_txids.
    – deyw
    Mar 30, 2023 at 15:24
  • Is there any Python code that can read mempool.data file?
    – xor
    Mar 30, 2023 at 19:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.