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?

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.

  • 1
    For the record, the database name will always be blackballs-418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e3 for mainnet, which is what the vast majority of people will need a list for. – user36303 Aug 27 '18 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.