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

CLI command to output the total number of (un)opened account versions #2323

Merged
merged 4 commits into from
Oct 3, 2019

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Oct 3, 2019

A new CLI command --debug_account_versions has been added which outputs the following on a recent live ledger: (this would automatically include new account versions when they are added)

Opened accounts:
Account version 0 num accounts: 0
Account version 1 num accounts: 1121920

Unopened accounts:
Account version 0 num accounts: 0
Account version 1 num accounts: 59159

Does 60K unopened accounts seem correct? It felt a little low.

However the results weren't like this initially. There were some in version 0, which I found was actually caused by a bug in the upgrade path merge iterator not correctly setting from_first_database in 1 instance. I've fixed it and added various asserts in the v14 upgrade to make sure it is now correct.

I haven't optimised running the new CLI command in any way, takes about a minute in a release configuration.

@wezrule wezrule added bug enhancement documentation This item indicates the need for or supplies updated or expanded documentation labels Oct 3, 2019
@wezrule wezrule added this to the V20.0 milestone Oct 3, 2019
@wezrule wezrule self-assigned this Oct 3, 2019
Copy link
Contributor

@guilhermelawless guilhermelawless left a comment

Choose a reason for hiding this comment

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

Accounts match on on beta-net where all accounts are version 0

# rpc_beta '{"action":"frontiers", "account": "nano_1111111111111111111111111111111111111111111111111111hifc8npp", "count":"1000000"}' | wc -l
727807

# rpc_beta '{"action":"unopened"}' | wc -l
347702

# ./nano_node --network beta --debug_account_versions
Opened accounts:
Account version 0 num accounts: 727803
Account version 1 num accounts: 0

Unopened accounts:
Account version 0 num accounts: 347698
Account version 1 num accounts: 0

4 are extra on the RPCs due to the response format

@wezrule wezrule merged commit d5fd87c into nanocurrency:master Oct 3, 2019
@wezrule wezrule deleted the cli_account_epoch_versions branch October 3, 2019 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation This item indicates the need for or supplies updated or expanded documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants