Skip to content

Smart storage values based on assumed chain and chainstate values#278

Merged
hebasto merged 2 commits into
bitcoin-core:mainfrom
jarolrod:smart-blockchain-size
Mar 16, 2023
Merged

Smart storage values based on assumed chain and chainstate values#278
hebasto merged 2 commits into
bitcoin-core:mainfrom
jarolrod:smart-blockchain-size

Conversation

@jarolrod
Copy link
Copy Markdown
Contributor

@jarolrod jarolrod commented Mar 1, 2023

When a prune target is set, that limits how much storage is taken up by blocks. But there is still other data such as the chainstate. This moves us away from wrongly conveying that the prune target is how much data will be taken up, and instead conveys how much data will be taken up considering the prune target, assumed blockchain size, and assumed chainstate size. The assumed sizes are updated every release cycle.

Changes:

  • Storage Location

    • The text that shows what the minimum amount of space needed is now displays assumed chainstate size + 1GB instead of just 1GB
  • Storage Options

    • The default prune button is now 2GB + assumed chainstate size instead of just the prune target of 2GB
    • Store all data button is now the assumed blockchain size + assumed chainstate size instead of a hardcoded 550GB
    • Custom Prune button is now the prune target + assumed chainstate size instead of just the prune target set in detailed settings
  • Storage Settings

    • The text of the Setting which is used to set a custom prune target is changed from "Storage limit (GB)" to "Block Storage limit (GB)" to convey this controls block storage specifically. The Custom prune button that then appears on the storage options page shows this prune target + assumed chainstate size

Master

Storage Location Storage Storage Settings Custom Prune
storage-location-master storage-master storage-setting-master custom-prune-master

PR

Storage Location Storage Storage Settings Custom Prune
storage-location-pr storage-pr storage-settings-pr custom-prune-pr

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android

@jarolrod jarolrod force-pushed the smart-blockchain-size branch from b1c639b to 5ead189 Compare March 15, 2023 06:05
@jarolrod
Copy link
Copy Markdown
Contributor Author

Updated from b1c639b to 5ead189, Compare

  • Changes: rebased over main

@jarolrod
Copy link
Copy Markdown
Contributor Author

cc @johnny9 @hebasto

Copy link
Copy Markdown
Collaborator

@johnny9 johnny9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5ead189

@hebasto hebasto merged commit 33d1751 into bitcoin-core:main Mar 16, 2023
johnny9 pushed a commit to johnny9/bitcoin-core-app that referenced this pull request Jul 4, 2025
… chain and chainstate values

3ef1803 qml: smart storage values based on assumed chain and chainstate size (Jarol Rodriguez)
ae1ab3b qml: expose assumed blockchain and chainstate size as to qml (Jarol Rodriguez)

Pull request description:

  When a prune target is set, that limits how much storage is taken up by blocks. But there is still other data such as the chainstate. This moves us away from wrongly conveying that the prune target is how much data will be taken up, and instead conveys how much data will be taken up considering the prune target, assumed blockchain size, and assumed chainstate size. The assumed sizes are updated every release cycle.

  Changes:
  - Storage Location
    - The text that shows what the minimum amount of space needed is now displays assumed chainstate size + 1GB instead of just 1GB

  - Storage Options
    - The default prune button is now 2GB + assumed chainstate size instead of just the prune target of 2GB
    - Store all data button is now the assumed blockchain size + assumed chainstate size instead of a hardcoded 550GB
    - Custom Prune button is now the prune target + assumed chainstate size instead of just the prune target set in detailed settings

  - Storage Settings
    - The text of the Setting which is used to set a custom prune target is changed from `"Storage limit (GB)"` to  `"Block Storage limit (GB)"` to convey this controls block storage specifically. The Custom prune button that then appears on the storage options page shows this prune target + assumed chainstate size

  #### Master
  | Storage Location | Storage | Storage Settings | Custom Prune |
  | ---------------- | ------- | ---------------- | ------------ |
  | <img width="752" alt="storage-location-master" src="https://user-images.githubusercontent.com/23396902/222280393-301cb341-55a6-44b3-b4ff-225527e07d64.png"> | <img width="752" alt="storage-master" src="https://user-images.githubusercontent.com/23396902/222280426-eff403d6-b9c5-4c4c-85f0-e2423df0bd69.png"> | <img width="752" alt="storage-setting-master" src="https://user-images.githubusercontent.com/23396902/222280478-3071ed98-b3e1-448f-9c8b-2879a772d46f.png"> | <img width="752" alt="custom-prune-master" src="https://user-images.githubusercontent.com/23396902/222280523-32453595-1a6d-4dc5-b885-7f09126944ee.png"> |

  ## PR
  | Storage Location | Storage | Storage Settings | Custom Prune |
  | ---------------- | ------- | ---------------- | ------------ |
  | <img width="752" alt="storage-location-pr" src="https://user-images.githubusercontent.com/23396902/222280732-3937b587-61eb-4889-8e6b-896f5df3a193.png"> |  <img width="752" alt="storage-pr" src="https://user-images.githubusercontent.com/23396902/222280906-114a3609-0a0b-4a49-90f6-f1336fa6108c.png"> |  <img width="752" alt="storage-settings-pr" src="https://user-images.githubusercontent.com/23396902/222280940-0bd860a7-62b1-44bc-8710-18343728ea1f.png"> |<img width="752" alt="custom-prune-pr" src="https://user-images.githubusercontent.com/23396902/222280983-e1b7beb3-392c-4c1b-aa16-1fefe52370a6.png"> |

  [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/278)
  [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/278)
  [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/278)
  [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/278)

ACKs for top commit:
  johnny9:
    ACK 3ef1803

Tree-SHA512: 752564fb2c8daf707961bd7f587af6d55b6860a329f8c9e069f8f986f1fd21f77706728bf71f9f59c310ca909bf2ffc8b0f38cea3cf3dce495214a1141dfd089
tx-signer450 added a commit to tx-signer450/gui-qml that referenced this pull request Oct 20, 2025
… chain and chainstate values

3ef1803bc0fa3265a8d2714e9ea783e042ee879e qml: smart storage values based on assumed chain and chainstate size (Jarol Rodriguez)
ae1ab3bcb8baf0adf756df4a72e4b20fbded6100 qml: expose assumed blockchain and chainstate size as to qml (Jarol Rodriguez)

Pull request description:

  When a prune target is set, that limits how much storage is taken up by blocks. But there is still other data such as the chainstate. This moves us away from wrongly conveying that the prune target is how much data will be taken up, and instead conveys how much data will be taken up considering the prune target, assumed blockchain size, and assumed chainstate size. The assumed sizes are updated every release cycle.

  Changes:
  - Storage Location
    - The text that shows what the minimum amount of space needed is now displays assumed chainstate size + 1GB instead of just 1GB

  - Storage Options
    - The default prune button is now 2GB + assumed chainstate size instead of just the prune target of 2GB
    - Store all data button is now the assumed blockchain size + assumed chainstate size instead of a hardcoded 550GB
    - Custom Prune button is now the prune target + assumed chainstate size instead of just the prune target set in detailed settings

  - Storage Settings
    - The text of the Setting which is used to set a custom prune target is changed from `"Storage limit (GB)"` to  `"Block Storage limit (GB)"` to convey this controls block storage specifically. The Custom prune button that then appears on the storage options page shows this prune target + assumed chainstate size

  #### Master
  | Storage Location | Storage | Storage Settings | Custom Prune |
  | ---------------- | ------- | ---------------- | ------------ |
  | <img width="752" alt="storage-location-master" src="https://user-images.githubusercontent.com/23396902/222280393-301cb341-55a6-44b3-b4ff-225527e07d64.png"> | <img width="752" alt="storage-master" src="https://user-images.githubusercontent.com/23396902/222280426-eff403d6-b9c5-4c4c-85f0-e2423df0bd69.png"> | <img width="752" alt="storage-setting-master" src="https://user-images.githubusercontent.com/23396902/222280478-3071ed98-b3e1-448f-9c8b-2879a772d46f.png"> | <img width="752" alt="custom-prune-master" src="https://user-images.githubusercontent.com/23396902/222280523-32453595-1a6d-4dc5-b885-7f09126944ee.png"> |

  ## PR
  | Storage Location | Storage | Storage Settings | Custom Prune |
  | ---------------- | ------- | ---------------- | ------------ |
  | <img width="752" alt="storage-location-pr" src="https://user-images.githubusercontent.com/23396902/222280732-3937b587-61eb-4889-8e6b-896f5df3a193.png"> |  <img width="752" alt="storage-pr" src="https://user-images.githubusercontent.com/23396902/222280906-114a3609-0a0b-4a49-90f6-f1336fa6108c.png"> |  <img width="752" alt="storage-settings-pr" src="https://user-images.githubusercontent.com/23396902/222280940-0bd860a7-62b1-44bc-8710-18343728ea1f.png"> |<img width="752" alt="custom-prune-pr" src="https://user-images.githubusercontent.com/23396902/222280983-e1b7beb3-392c-4c1b-aa16-1fefe52370a6.png"> |

  [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/278)
  [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/278)
  [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/278)
  [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/278)

ACKs for top commit:
  johnny9:
    ACK 3ef1803bc0fa3265a8d2714e9ea783e042ee879e

Tree-SHA512: 752564fb2c8daf707961bd7f587af6d55b6860a329f8c9e069f8f986f1fd21f77706728bf71f9f59c310ca909bf2ffc8b0f38cea3cf3dce495214a1141dfd089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants