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.
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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29678.
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.
No conflicts as of last run.
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?
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
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.
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.
GB
to represent 10003 bytes for consistency with GUI