{
 "number": 35948,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/35948",
 "title": "init: correct first-run disk space estimate",
 "author": "l0rinc",
 "author_association": "MEMBER",
 "created_at": "2026-08-10T22:35:22Z",
 "updated_at": "2026-09-14T13:46:57Z",
 "age_days": 37,
 "draft": false,
 "labels": [],
 "milestone": "33.0",
 "base": "master",
 "head_sha": "42215b85811a4950265fa2d02b22e83046ed95d5",
 "head_ref": "l0rinc/init-first-run-disk-space",
 "head_repo": "l0rinc/bitcoin",
 "head_history": [
  {
   "t": "2026-08-17T23:24:03Z",
   "sha": "42215b85811a4950265fa2d02b22e83046ed95d5"
  }
 ],
 "additions": 5,
 "deletions": 4,
 "changed_files": 2,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "ack": [
     {
      "login": "murchandamus",
      "url": "https://github.com/bitcoin/bitcoin/pull/35948#pullrequestreview-4997891568"
     },
     {
      "login": "jeanpablojp",
      "url": "https://github.com/bitcoin/bitcoin/pull/35948#issuecomment-5382874487"
     },
     {
      "login": "achow101",
      "url": "https://github.com/bitcoin/bitcoin/pull/35948#issuecomment-5401547644"
     }
    ],
    "stale_ack": [
     {
      "login": "mercie-ux",
      "url": "https://github.com/bitcoin/bitcoin/pull/35948#issuecomment-5263166367"
     }
    ]
   },
   "conflicts": [
    {
     "number": 33324,
     "title": "blocks: add resumable reobfuscation for existing block files",
     "author": "l0rinc"
    }
   ]
  }
 },
 "acks_parsed": {
  "mercie-ux": {
   "kind": "ack",
   "hash": "fc4342822b",
   "t": "2026-08-12T06:28:52Z",
   "stale": true
  },
  "murchandamus": {
   "kind": "ack",
   "hash": "42215b85811a4950265fa2d02b22e83046ed95d5",
   "t": "2026-08-21T22:29:12Z",
   "stale": false
  },
  "achow101": {
   "kind": "ack",
   "hash": "42215b85811a4950265fa2d02b22e83046ed95d5",
   "t": "2026-08-24T21:22:49Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 2,
  "stale_ack": 1,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "achow101",
   "fanquake",
   "hebasto",
   "jeanpablojp",
   "mercie-ux",
   "murchandamus"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-08-17T23:24:35Z",
  "last_reviewer_activity": "2026-09-14T13:46:57Z",
  "last_reviewer": "hebasto",
  "author_silent_days": 30,
  "waiting_on_author_days": 3,
  "days_since_update": 3
 },
 "refs": {
  "mentioned": [
   29678
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 29678,
    "type": "pull",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "Bugfix: Correct first-run free space checks"
   }
  ],
  "conflicts": [
   33324
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/init.cpp"
 ],
 "body": "**Problem:** The assumed blockchain size is maintained in GiB, but the first-run disk-space warning labels it as GB.\nFor pruned nodes, the warning also displays the full-chain estimate even though the check uses the lower of the prune target and that estimate.\nThe chainparams API comments likewise describe both assumed sizes as GB.\n\n**Fix:** Label the warning as GiB, display the same rounded-up GiB estimate that the disk-space check uses, and document both assumed sizes as GiB.\n\nThis PR revives the first-run warning fixes from #29678.",
 "commits": [
  {
   "sha": "42215b85811a4950265fa2d02b22e83046ed95d5",
   "date": "2026-08-17T23:23:53Z",
   "message": "init: correct first-run disk space estimate\n\nThe assumed blockchain size is maintained in GiB, but the first-run warning labels it as GB.\nFor pruned nodes, the disk-space check uses the lower prune target while the warning displays the full-chain size.\n\nLabel the value as GiB and round the checked byte estimate up to GiB so the warning describes the selected storage mode.\n\nCo-authored-by: Luke Dashjr <luke-jr+git@utopios.org>\nCo-authored-by: Ava Chow <github@achow101.com>"
  }
 ],
 "timeline": [
  {
   "t": "2026-08-12T06:28:52Z",
   "kind": "comment",
   "who": "mercie-ux",
   "assoc": "NONE",
   "text": "ACK fc4342822b\n\nTraced the `856` in `chainparams.cpp` through both the old and new math. Found a real 63 GB gap between what the check silently required and what the GUI ever showed. Confirmed."
  },
  {
   "t": "2026-08-17T22:36:05Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "Rather than changing the units that we use in the code, why not change the units as displayed to the user? It shouldn't be that hard to change the units in startup messages since those are just strings.\n\nAs one of the people who do/review the chainparams updates, I strongly prefer to use GiB rather than GB since `du` uses the `*iB` units by default. Most of these updates are done by looking at commands used in previous PRs, none of which have used `*iB` units, so I would expect this to be a little bit confusing. Also `*B` units is actually (annoyingly) ambiguous since some places use it to mean multiples of 1024 (i.e. same as `*iB`) while others use it as multiples of 1000. The `*iB` units are actually unambiguous."
  },
  {
   "t": "2026-08-17T23:24:03Z",
   "kind": "force_push",
   "who": "l0rinc",
   "commit": "42215b85811a4950265fa2d02b22e83046ed95d5"
  },
  {
   "t": "2026-08-17T23:24:35Z",
   "kind": "comment",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "text": "I assumed the original change had a good reason for moving these values to `GB`, but keeping them in `GiB` makes this change a lot simpler!\nThanks for the review, pushed and added you as a co-author."
  },
  {
   "t": "2026-08-21T22:29:12Z",
   "kind": "review",
   "who": "murchandamus",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "42215b85811a4950265fa2d02b22e83046ed95d5",
   "text": "ACK 42215b85811a4950265fa2d02b22e83046ed95d5\n\nThanks for picking this up. \u2014 I\u2019m not sure the co-authorship is needed here, your code is not reusing any of the lines from the original, you\u2019re just proposing an alternative fix to the identified problem."
  },
  {
   "t": "2026-08-22T22:13:49Z",
   "kind": "comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "text": "tACK 42215b85811a4950265fa2d02b22e83046ed95d5\n\nRan the pruned case on a 585 MiB volume, `-prune=550` makes master warn about 856 GB where this branch says 1 GiB."
  },
  {
   "t": "2026-08-24T09:15:03Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "cc @hebasto @GBKS given comments in #29678."
  },
  {
   "t": "2026-08-24T21:22:49Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "ACK 42215b85811a4950265fa2d02b22e83046ed95d5\n\nGoing to wait for a UI person's opinion before merging though."
  },
  {
   "t": "2026-08-24T22:53:04Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nGiven this was changed to change strings, and we past string/translation freeze, I don't think it can be merged anyways?"
  },
  {
   "t": "2026-08-24T23:09:59Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\noh right"
  },
  {
   "t": "2026-09-14T13:46:15Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/init.cpp",
   "commit": "42215b85811a4950265fa2d02b22e83046ed95d5",
   "in_reply_to": null,
   "text": "The `-prune` option has MiB granularity. It seems weird to specify `-prune=550` and then see a message saying, \"Approximately 1 GiB of data will be stored in this directory.\""
  },
  {
   "t": "2026-09-14T13:46:57Z",
   "kind": "review",
   "who": "hebasto",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "42215b85811a4950265fa2d02b22e83046ed95d5",
   "text": "[quoted text omitted]\n\nThis change resolves the unit mismatch.\n\nFrom https://github.com/bitcoin/bitcoin/pull/29678#issuecomment-2222160247:\n[quoted text omitted]\n\nIn most scenarios, GUI users deal with the intro dialog to set their datadir and prune options for the first time. I think it's acceptable to keep \"GiB\" in the `AppInitMain` warning.\n\nHowever, I've noticed that the `Intro` [constructor](https://github.com/bitcoin/bitcoin/blob/a49fa1f6e698430f9d8619cf769a514ae71fca5a/src/qt/intro.cpp#L42) in `src/qt/intro.cpp` actually accepts values in GiB while treating them as if they are measured in GB:https://github.com/bitcoin/bitcoin/blob/a49fa1f6e698430f9d8619cf769a514ae71fca5a/src/qt/intro.cpp#L151\n\nPerhaps the GUI part can be fixed in a follow-up."
  }
 ],
 "labels_log": [
  {
   "t": "2026-08-14T17:49:09Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-18T01:07:24Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-08-17T23:22:14Z",
   "kind": "renamed",
   "who": "l0rinc",
   "from": "init: correct first-run disk space estimates",
   "to": "init: correct first-run disk space estimate"
  },
  {
   "t": "2026-08-25T05:04:54Z",
   "kind": "milestoned",
   "who": "maflcko"
  }
 ],
 "text_chars": 3858,
 "text_tokens_estimate": 964,
 "changed_paths": [
  "src/init.cpp",
  "src/kernel/chainparams.h"
 ],
 "files": [
  {
   "path": "src/init.cpp",
   "add": 3,
   "del": 2
  },
  {
   "path": "src/kernel/chainparams.h",
   "add": 2,
   "del": 2
  }
 ],
 "test_lines": 0,
 "git": {
  "head": "42215b85811a4950265fa2d02b22e83046ed95d5",
  "head_matches_backup": true,
  "base": "f72537037d3350e2974efd760eaa7b04f820880c",
  "commits": [
   {
    "sha": "42215b8581",
    "subject": "init: correct first-run disk space estimate",
    "files": 2,
    "add": 5,
    "del": 4
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "55c4340a14103b4d",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}