Anatomy of the Bitcoin Node filesystem
There are man explanations like this, but this one is mine.
Just in case anyone was curious. I dug up some good posts on this and thought I'd distill it as best I could. I'll be using Windows file separators, but fee free to change them in your head.
If you name a -datadir argument, this is what will land there. If one is not named it defaults to %APPDATA%\Bitcoin
<datadir>\bitcoin.conf- The config file<datadir>\debug.log- The log file<datadir>\*.dat- Info on fees, peers, bans and mempool<datadir>\blocks\index\*- Metadata for the block store<datadir>\chainstate\*- The UTXO database
If you name a -blocksdir argument, this is what will land there. If one is not named it defaults to <datadir>
<blocksdir>\blocks\blk*.dat- The raw block data<blocksdir>\blocks\rev*.dat- The Undo files. List of spent UTXOs for each block
If you name a -main.walletdir argument, this is what will land there. If one is not named it defaults to <datadir>\wallets or just <datadir> if the wallets subdirectory doesn't exist.
<walletdir>\wallet.dat- The wallet file with private keys and UTXOs<walletdir>\db.log- Database log of access to wallet<walletdir\database\*- More database logs
Note that -datadir, -blocksdir and -main.walletdir can all point to different storage. The things you need to keep in mind:
-datadirshould be your FASTEST storage-blocksdirshould be your LARGEST storage-main.walletdirshould be your most SECURE storage
As a footnote, testnet will throw a testnet3\ in everything, and would require a -test.walletdir switch to set the wallet directory.
Submitted September 22, 2020 at 11:11AM by brianddk https://ift.tt/3mJItvJ
Comments
Post a Comment