1

The resulting file after running monero-blockchain-blackball is a data.mdb LMDB file. Unfortunately, this file cannot be opened directly by the GUI or CLI. How can I extract the necessary data so that the wallet can read it?

sgp
  • 8,836
  • 7
  • 43
  • 113

1 Answers1

1

You will need to follow these steps to convert the database to a list of outputs that the wallet can read. I have performed this conversion on Debian/Ubuntu.

In order to extract the data, you need to build the LMDB tools. Follow the instructions on GitHub to make the LMDB binaries.

cd ~/monero/external/db_drivers/liblmdb

make

Then run the following:

./mdb_stat -a /folder/with/blackball/database

This will show the hash of the database that you have created. Take a note of the database name (eg: blackballs-418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e3). You will use it in the next step.

You now need to extract the outputs that need to be blackballed. Use one of the following:

./mdb_dump -s blackballs-<hash> /folder/with/blackball/database/ | awk '/[0-9a-f]{64}/{print $1}' > /output/path/file.txt

./mdb_dump -s blackballs-<hash> /folder/with/blackball/database/ | grep ^.................................................................$ | tr -d \ > /output/path/file.txt

The resulting .txt file can be imported into the official GUI and CLI.

sgp
  • 8,836
  • 7
  • 43
  • 113