From 4f06564f36a6b2cd380bb4b6ef07c2c9ea4b5e76 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 19 Mar 2024 15:47:26 +0000 Subject: [PATCH 1/3] Bugfix: init: Correct conversion of AssumedBlockchainSize to use GB --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index faaf3353d07..afd559291c6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1714,7 +1714,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) // On first startup, warn on low block storage space if (!do_reindex && !do_reindex_chainstate && chain_active_height <= 1) { - uint64_t assumed_chain_bytes{chainparams.AssumedBlockchainSize() * 1024 * 1024 * 1024}; + uint64_t assumed_chain_bytes{chainparams.AssumedBlockchainSize() * 1'000'000'000}; uint64_t additional_bytes_needed{ chainman.m_blockman.IsPruneMode() ? std::min(chainman.m_blockman.GetPruneTarget(), assumed_chain_bytes) : From 4c62285bb93b763cbc29e2ab5fe81d221f471084 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 19 Mar 2024 05:04:24 +0000 Subject: [PATCH 2/3] Bugfix: init: For first-run disk space check, advise user of correct pruned size rather than full blockchain size --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index afd559291c6..f3f056da4da 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1726,7 +1726,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) "Approximately %u GB of data will be stored in this directory." ), fs::quoted(fs::PathToString(args.GetBlocksDirPath())), - chainparams.AssumedBlockchainSize() + additional_bytes_needed / 1'000'000'000 )); } } From c452d6c1efe253daa91f1269d378ff82971315f0 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 19 Mar 2024 16:34:00 +0000 Subject: [PATCH 3/3] doc/release-process: Correct m_assumed_*_size to GB --- doc/release-process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index fa2c53eb0c5..e980413ddb2 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -310,13 +310,13 @@ cat "$VERSION"/*/all.SHA256SUMS.asc > SHA256SUMS.asc Both variables are used as a guideline for how much space the user needs on their drive in total, not just strictly for the blockchain. Note that all values should be taken from a **fully synced** node and have an overhead of 5-10% added on top of its base value. -To calculate `m_assumed_blockchain_size`, take the size in GiB of these directories: +To calculate `m_assumed_blockchain_size`, take the size in GB of these directories: - For `mainnet` -> the data directory, excluding the `/testnet3`, `/testnet4`, `/signet`, and `/regtest` directories and any overly large files, e.g. a huge `debug.log` - For `testnet` -> `/testnet3` - For `testnet4` -> `/testnet4` - For `signet` -> `/signet` -To calculate `m_assumed_chain_state_size`, take the size in GiB of these directories: +To calculate `m_assumed_chain_state_size`, take the size in GB of these directories: - For `mainnet` -> `/chainstate` - For `testnet` -> `/testnet3/chainstate` - For `testnet4` -> `/testnet4/chainstate`