Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

laanwj/blockdb-troubleshoot

Repository files navigation

▄▚█▐▙▞█▖▙▐▜▚▖▌▗▟▌▗▐▟▗▌▖▚▟▌▄█▚█▜▌▟█▚▟▟▐▀▙ 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)) 

About

Bitcoin block database troubleshooting tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published