Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include size_on_disk on getblockchaininfo #757

Open
Falci opened this issue Jul 2, 2022 · 6 comments
Open

Include size_on_disk on getblockchaininfo #757

Falci opened this issue Jul 2, 2022 · 6 comments
Labels
Feature Request issue - feature request Good first issue issues - beginners and people unfamiliar with code

Comments

@Falci
Copy link
Member

Falci commented Jul 2, 2022

No description provided.

@Falci Falci added the Feature Request issue - feature request label Jul 2, 2022
@pinheadmz
Copy link
Member

🥪

@pinheadmz pinheadmz added the Good first issue issues - beginners and people unfamiliar with code label Jul 2, 2022
@Falci
Copy link
Member Author

Falci commented Jul 2, 2022

🥪

Did you mean 🍉?

@pinheadmz
Copy link
Member

No:
https://discord.com/channels/822591034202521641/825772593180704768/992125032060944564

Free cheese sandwich to whoever opens issue #100!

@Falci Falci assigned Falci and unassigned Falci Jul 3, 2022
@Falci
Copy link
Member Author

Falci commented Jul 4, 2022

Which directories/files should we consider? All them?

hsd_data % du -hsx 2>/dev/null *
9.2G    blocks
 11G    chain
 14M    debug.log
 20M    debug_2022-02-04_10-44-02-910.log
 20M    debug_2022-02-10_09-28-29-262.log
 20M    debug_2022-02-19_18-19-25-959.log
 20M    debug_2022-03-04_07-07-09-799.log
 20M    debug_2022-03-31_08-43-33-499.log
 20M    debug_2022-04-17_12-01-03-976.log
 20M    debug_2022-04-18_06-58-51-976.log
 20M    debug_2022-04-18_14-34-50-939.log
 20M    debug_2022-05-03_20-39-59-716.log
 20M    debug_2022-06-11_22-25-42-401.log
 96K    hosts.json
4.0K    key
224K    regtest
 27G    tree
 12M    wallet
4.0K    wallet.log

@rithvikvibhu
Copy link
Member

rithvikvibhu commented Jul 4, 2022

I think size_on_disk in getblockchaininfo should semantically be the same as in bitcoin, so blocks + chain (or spvchain when in spv mode).
All full nodes will have around the same total. Including tree makes it a bit dynamic, since it can be compacted at any time and as many times as needed.

We could have another object in hsd-cli info or getblockchaininfo (not sure why we have two, whichever is a better fit):

sizes: {
  blockchain: spv ? size(spvchain) : (size(blocks)+size(chain)),
  tree: size(tree),
  total: size(.), // includes everything: wallet, logs, etc.
},

@pinheadmz
Copy link
Member

The chain folder also currently includes the addr and tx indexes. Those will get moved out to their own folder hopefully with indexer refactor in hsd v5 (to pull from bcoin)

Also now that we have treeState object in chainDB I think we can add a gettreeinfo which should cover the size of the Urkel tree on disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request issue - feature request Good first issue issues - beginners and people unfamiliar with code
Projects
None yet
Development

No branches or pull requests

3 participants