#35948 init: correct first-run disk space estimate

full analysis

https://github.com/bitcoin/bitcoin/pull/35948 · l0rinc · +5/-4 in 2 files, 1 commits · labels: none

Goal

  • Warn users with accurate required disk space on first startup
  • Prevent misleading pruned node operators into thinking they need full chain storage

Updates the first-run free disk space warning in AppInitMain to report space in GiB and calculate required space using the actual needed byte count rather than the hardcoded full chain size. It also updates Doxygen comments in chainparams.h to clarify that the assumed sizes are in GiB.

Problem: The node checks disk space using GiB values but warns users in GB. Furthermore, pruned nodes triggering the low-space warning are told they need the full chain size (hundreds of gigabytes) instead of their actual prune target requirements.

Category: Utilities (logging, arguments, libraries) (#38 of 66)

P3 · bug fix

  • P3 because it fixes an inaccurate startup warning for pruned node operators
  • Prevents confusion by showing actual prune targets instead of hundreds of gigabytes

Fixes an inaccurate and confusing user-facing warning during startup. Users running with -prune are warned they need hundreds of gigabytes when only a fraction is required.

Membership: Modifies startup space validation and warning reporting in src/init.cpp.

Factors: security/stability 0, bug 1, performance 0, user value 1, leverage 0

Category: Kernel (libbitcoinkernel) (#18 of 18)

P4 · cleanup

  • P4 because it only corrects unit names in documentation comments
  • Leaves all kernel code logic, signatures, and boundaries untouched

Changes two comments from GB to GiB in chainparams.h. There is no change to kernel code logic, signatures, or boundaries.

Membership: Touches documentation comments in src/kernel/chainparams.h.

Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0

Reviewability: Ready

  • Ready to review with a small diff, passing CI, and addressed feedback

The diff is very small, CI is passing, mergeable state is clean, and the latest push addressed reviewer suggestions.

Author status: silent since 2026-08-17 force push which addressed all reviewer feedback

Resolved concerns:

  • achow101 preferred keeping internal values in GiB and updating display strings and comments rather than converting internal representations to GB, which author adopted in a force-push.
  • hebasto noted that intro.cpp in GUI still mixes up GB and GiB, but agreed it can be addressed in a follow-up.

Agreement: Strong

  • Strong consensus across reviewers to fix the misleading startup warning text
  • Verified expected warning behavior on pruned setups (murchandamus, jeanpablojp)
  • Supported keeping internal units in GiB while fixing displayed strings (achow101, mercie-ux)
  • Agreed that remaining GUI unit inconsistencies can be handled in a follow-up (hebasto)

Strong consensus with multiple ACKs; pending merge post-freeze for milestone 33.0

Reviewers agree on correcting the misleading startup warning text and keeping internal units as GiB. Review comments about GUI unit cleanup are deferred to follow-ups.

  • mercie-ux confirmed a 63 GB mismatch between the check and displayed text on the initial version
  • achow101 ACKed the revision keeping internal units in GiB
  • murchandamus and jeanpablojp ACKed and verified pruned behavior
  • fanquake noted string freeze constraints for the release branch
  • hebasto found the GiB change in init acceptable and noted GUI follow-up

Review verdicts (DrahtBot): 3 (+1)

Files

0 lines under test/bench/ci.

  • src/init.cpp +3/-2
  • src/kernel/chainparams.h +2/-2

Card

This PR corrects the first-run low disk space warning during node initialization so that units are labeled as GiB and pruned nodes display the actual required space rather than the full chain size. It also updates header comments in chainparams.h to clarify that assumed sizes are in GiB. The change fixes a confusing false-alarm warning for users starting pruned nodes on smaller drives. It has multiple ACKs and is ready for merge once the target release window opens.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T15:56, confidence high, input hash 55c4340a14103b4d