Save users from having to Google this: https://bitcoin.stackexchange.com/a/60711
Explain when reindex-chainstate can be used instead of reindex #13662
pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:2018/07/reindex-chainstate-doc changing 1 files +1 −1-
Sjors commented at 2:43 PM on July 14, 2018: member
- Sjors force-pushed on Jul 14, 2018
- fanquake added the label Docs on Jul 14, 2018
-
Explain when reindex-chainstate can be used instead of reindex 65a449f8e3
-
in src/init.cpp:387 in 6c53e46179 outdated
383 | @@ -384,7 +384,7 @@ void SetupServerArgs() 384 | "Warning: Reverting this setting requires re-downloading the entire blockchain. " 385 | "(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)", MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), false, OptionsCategory::OPTIONS); 386 | gArgs.AddArg("-reindex", "Rebuild chain state and block index from the blk*.dat files on disk", false, OptionsCategory::OPTIONS); 387 | - gArgs.AddArg("-reindex-chainstate", "Rebuild chain state from the currently indexed blocks", false, OptionsCategory::OPTIONS); 388 | + gArgs.AddArg("-reindex-chainstate", "Rebuild chain state from the currently indexed blocks. Only necessary in pruning mode or if blocks on disk might be corrupted.", false, OptionsCategory::OPTIONS);
MarcoFalke commented at 2:53 PM on July 14, 2018:If the blocks on disk are corrupted, you should do a "full" reindex, not rebuild the chainstate.
Sjors commented at 3:44 PM on July 14, 2018:Oops, I got the comment the wrong way around.
Sjors force-pushed on Jul 14, 2018in src/init.cpp:387 in 65a449f8e3
383 | @@ -384,7 +384,7 @@ void SetupServerArgs() 384 | "Warning: Reverting this setting requires re-downloading the entire blockchain. " 385 | "(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)", MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), false, OptionsCategory::OPTIONS); 386 | gArgs.AddArg("-reindex", "Rebuild chain state and block index from the blk*.dat files on disk", false, OptionsCategory::OPTIONS); 387 | - gArgs.AddArg("-reindex-chainstate", "Rebuild chain state from the currently indexed blocks", false, OptionsCategory::OPTIONS); 388 | + gArgs.AddArg("-reindex-chainstate", "Rebuild chain state from the currently indexed blocks. When in pruning mode or if blocks on disk might be corrupted, use full -reindex instead.", false, OptionsCategory::OPTIONS);
MarcoFalke commented at 4:40 PM on July 14, 2018:I believe it will automatically prompt you to use
-reindexwhen needed while in pruning mode, so maybe no need to mention it here?Then, you could move the note about corruption to reindex. E.g. "Rebuild chain state and block index from the blk.dat files on disk *. Only needed when blocks on disk are corrupted. "
Sjors commented at 1:01 PM on July 16, 2018:I just sabotaged a pruned node by deleting the most recent
blkxxxxx.datfile and then started bitcoind:Please restart with -reindex or -reindex-chainstate to recover.Restarting that pruned node with
-reindex-chainstatewill result in the same error message and won't tell the user they need to use-reindexinstead. So I think it's better to mention pruned node in the help here.MarcoFalke commented at 4:40 PM on July 14, 2018: memberConcept ACK
randolf approvedMarcoFalke commented at 6:22 PM on September 7, 2018: memberutACK 65a449f8e3
MarcoFalke merged this on Sep 7, 2018MarcoFalke closed this on Sep 7, 2018MarcoFalke referenced this in commit fb06eb4ef7 on Sep 7, 2018Sjors deleted the branch on Sep 7, 2018jasonbcox referenced this in commit 7d378722c7 on Dec 20, 2019jonspock referenced this in commit c19015eaeb on Oct 2, 2020jonspock referenced this in commit 6bfb03aae5 on Oct 5, 2020jonspock referenced this in commit d2b7e882e7 on Oct 10, 2020PastaPastaPasta referenced this in commit 249b096928 on Jul 19, 2021PastaPastaPasta referenced this in commit 0e3c42f0e2 on Jul 19, 2021PastaPastaPasta referenced this in commit e517d78269 on Jul 19, 2021PastaPastaPasta referenced this in commit 6f501ade6f on Jul 19, 2021MarcoFalke locked this on Sep 8, 2021ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 09:15 UTC
More mirrored repositories can be found on mirror.b10c.me