Bugfix: Correct first-run free space checks #29678

pull luke-jr wants to merge 3 commits into bitcoin:master from luke-jr:fix_init_lowdisk_warning_reqd changing 2 files +4 −4
  1. luke-jr commented at 4:36 pm on March 19, 2024: member

    It’s not clear what m_assumed_*_size are actually set based on, but historically it was in GB, not GiB, and that’s still used in the GUI which is more user-facing.

    Could just as easily change the GUI if GiB is preferred.

  2. DrahtBot commented at 4:36 pm on March 19, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29678.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK hebasto, murchandamus, BrandonOdiwuor

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  3. Sjors commented at 5:37 pm on March 19, 2024: member

    I’m not sure what the latest convention is, cc @hebasto. A few years ago #15163 made it so RPC, code and GUI all use KiB / MiB / GiB.

    (though for pruning it seems the config file uses MiB, but the GUI converts it to GB - yet there are translated error strings using MiB, confusing…)

  4. DrahtBot added the label Needs rebase on May 20, 2024
  5. luke-jr force-pushed on May 28, 2024
  6. DrahtBot removed the label Needs rebase on May 28, 2024
  7. DrahtBot added the label Needs rebase on Jun 10, 2024
  8. fanquake commented at 3:44 pm on June 25, 2024: member
    @hebasto can you follow up given the gui / translation Qs here. This also needs a rebase.
  9. hebasto commented at 5:56 pm on July 10, 2024: member

    Indeed, there is inconsistency in GB/GiB unit usage.

    For instance, the value of the m_assumed_blockchain_size variable in GiB is used with the “GB” units in the user-faced messages here: https://github.com/bitcoin/bitcoin/blob/45f757c72672fc351bf669e731744f2f5e269233/src/init.cpp#L1707 and here: https://github.com/bitcoin/bitcoin/blob/45f757c72672fc351bf669e731744f2f5e269233/src/qt/forms/intro.ui#L206

    Concept ACK.


    It would be nice to mention the second commit changes in the PR description, no?


    Could just as easily change the GUI if GiB is preferred.

    The GUI now uses “GB” (SI prefix) as a unit, based on the mindset of non-technical/non-CS users. @GBKS What are modern guidelines in this regard?


    @Sjors

    I’m not sure what the latest convention is, cc @hebasto. A few years ago #15163 made it so RPC, code and GUI all use KiB / MiB / GiB.

    (though for pruning it seems the config file uses MiB, but the GUI converts it to GB - yet there are translated error strings using MiB, confusing…)

    For the GUI, the conversion to/from GB is still used: https://github.com/bitcoin/bitcoin/blob/45f757c72672fc351bf669e731744f2f5e269233/src/qt/optionsmodel.h#L26-L34

  10. GBKS commented at 6:45 am on July 11, 2024: none

    The GUI now uses “GB” (SI prefix) as a unit, based on the mindset of non-technical/non-CS users.

    GB is standard for general audiences, and GiB for technical, scientific, or engineering contexts. I’d recommend keeping GB in the GUI.

    I am curious about use cases where it is essential for the user to know the GiB value in order to make decisions.

  11. Bugfix: init: Correct conversion of AssumedBlockchainSize to use GB 4f06564f36
  12. Bugfix: init: For first-run disk space check, advise user of correct pruned size rather than full blockchain size 4c62285bb9
  13. doc/release-process: Correct m_assumed_*_size to GB c452d6c1ef
  14. luke-jr force-pushed on Sep 2, 2024
  15. DrahtBot removed the label Needs rebase on Sep 2, 2024
  16. achow101 requested review from murchandamus on Oct 15, 2024
  17. murchandamus commented at 8:28 am on October 17, 2024: contributor

    All of these changes seem consistent to me.

    Concept ACK on generally using GB to refer to 1,000,000,000 bytes and GiB to refer to 1024³ bytes everywhere.

  18. BrandonOdiwuor commented at 10:56 am on November 18, 2024: contributor
    Concept ACK using GB to represent 10003 bytes for consistency with GUI

github-metadata-mirror

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: 2024-11-23 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me