bitcoind – What is the distinction between the three index directories “blocks/index/”, “bitcoin/indexes” and “chainstate”? – CoinNewsTrend

bitcoind – What is the distinction between the three index directories “blocks/index/”, “bitcoin/indexes” and “chainstate”?

[ad_1]

Bitcoin Core has a number of totally different databases and indexes that it maintains independently of one another since some issues are optionally available.

blocks/index incorporates the LevelDB database for the block index. This incorporates the data of the place each single block is situated within the blocks/ listing (which blk*.dat file incorporates it, and the offset inside the file). It additionally has the data of which rev*.dat file has the undo information, and the place that undo information is inside that file.

chainstate/ incorporates the LevelDB database that has the UTXO set.

Each the block index and the chainstate database are mandatory for regular operation, and each Bitcoin Core node has them. Nonetheless, they’re separate as they retailer distinct information, and lacking the chainstate database doesn’t imply that the block index is invalid.

In case you are lacking the chainstate database however have the block index, the chainstate database may be rebuilt a lot sooner than rebuilding each the chainstate and the block index. That is what the -reindex-chainstate choice does – it removes the chainstate database however retains the block index so it solely has to rebuild the chainstate. -reindex is a full reindex and removes each databases.

The databasese in indexes/ are for the optionally available indexes – txindex, coinstatsindex, and blockfilterindex. These are maintained individually as a result of they aren’t mandatory for regular operation. The structure of those databases are impartial of one another, and since these indexes are constructed asynchronously, every index has its personal database.

[ad_2]

Supply hyperlink