Skip to content
Bitcoin block database troubleshooting tools
C++ C Python HTML Makefile Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
py-leveldb
py-lmdb
.gitignore
README.md
check_bitflips.py
compile_leveldb.sh
compile_lmdb.sh
leveldb2lmdb.py
printblockdb.py
scan-blocks.py
simplecheck.py

README.md

▄▚█▐▙▞█▖▙▐▜▚▖▌▗▟▌▗▐▟▗▌▖▚▟▌▄█▚█▜▌▟█▚▟▟▐▀▙ Collected bitcoin block database troubleshooting tools. ▐▟▌▀▜▗▘▙▝▛▛▄▝▙▚▟▜▚▚▌▝▙▘▟▞▞▞▗▞▞▙▘▙▛▜▟▐▗▙▙

Run ./compile_leveldb.sh to build the necessary leveldb.so python module, as well as leveldbutil.

Do not use existing python-leveldb with these tools! The internal library is specifically tweaked to be exactly like Bitcoin's. Using an external leveldb can result in the databases becoming incompatible with Bitcoin due to, for example, different compression settings or version drift.

dependencies

apt-get install python3-setuptools python3-dev

lmdb

EXPERIMENTAL

Run ./compile_lmdb.sh to build the lmdb module. This will use py-lmdb's internal lmdb module, not the system lmdb (if any).

./leveldb2lmdb.py /data/bitcoin/chainstate /data/bitcoin/chainstate2 $((1024*1024*1024*8))
./leveldb2lmdb.py /data/bitcoin/blocks/index /data/bitcoin/blocks/index2 $((1024*1024*1024*8)) 
You can’t perform that action at this time.