Should we check free disk size before syncing blocks #15813

issue crackercracked opened this issue on April 13, 2019
  1. crackercracked commented at 10:38 PM on April 13, 2019: none

    This happens to me that my computer forces qt to exit because my disk is running out of memory

    Should we skip syncing or check and show warning beforehand when disk size available is enough for syncing all blocks?

    Also wondering how large free disks should I prepare for syncing all the blocks?

  2. benthecarman commented at 7:29 PM on April 17, 2019: contributor

    As for how much free disk space you need, my datadir folder currently it taking up about ~300gb, this however has fully syned mainnet and testnet. Without testnet it is about 30gb less.

  3. maflcko commented at 7:53 PM on April 17, 2019: member

    I believe the gui intro does this, but not the bitcoind

  4. maflcko added the label good first issue on Apr 17, 2019
  5. maflcko commented at 7:54 PM on April 17, 2019: member

    I guess it could print a warning or error on init

  6. darosior commented at 10:23 AM on April 18, 2019: member

    I started looking into this and it is already done at the eleventh step in init : https://github.com/bitcoin/bitcoin/blob/dae72998e8576439254ee497e82e2b9ce4917977/src/init.cpp#L1681-L1688 But it uses the default minimum space for CheckDiskSpace of 50MiB https://github.com/bitcoin/bitcoin/blob/2d46f1be0c3c8b7287aa1f62bb1f5b4a8d00ff6e/src/util/system.cpp#L138-L144 we could estimate a better additional_bytes value depending on initial sync, pruning, etc ? But can we hardcode it ? We cannot know each block size before starting downloading them

  7. maflcko commented at 2:32 PM on April 18, 2019: member

    Yeah, but we can assume the accumulative block size of the currently most-work valid chain. See m_assumed_blockchain_size (It is used that way in the gui intro)

  8. achow101 closed this on Nov 18, 2022

  9. bitcoin locked this on Nov 18, 2023

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: 2026-04-13 21:14 UTC

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