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

Add accounts-summary subcommand to ledger-tool #16624

Closed
wants to merge 1 commit into from

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Apr 18, 2021

Problem

No easy way to get stats on the current number of active accounts

Summary of Changes

  • Add ledger-tool accounts-summary subcommand for viewing a high level summary of active accounts
---
Accounts Summary:
  - Total accounts: 56
  - Total storage bytes: 561639
  - Rent paying accounts: 0
---
Top Program Accounts:
  1. Feature111111111111111111111111111111111111 Total: 29
  2. Sysvar1111111111111111111111111111111111111 Total: 8
  3. NativeLoader1111111111111111111111111111111 Total: 8
  4. BPFLoader2111111111111111111111111111111111 Total: 4
  5. 11111111111111111111111111111111 Total: 3
  6. Config1111111111111111111111111111111111111 Total: 1
  7. Vote111111111111111111111111111111111111111 Total: 1
  8. Stake11111111111111111111111111111111111111 Total: 1
  9. TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA Total: 1

Fixes #

@jstarry
Copy link
Member Author

jstarry commented Apr 18, 2021

Ideally these stats can be cached and served from the RPC API for use in the explorer as well

@codecov
Copy link

codecov bot commented Apr 18, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@59268b8). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #16624   +/-   ##
=========================================
  Coverage          ?    79.9%           
=========================================
  Files             ?      414           
  Lines             ?   112270           
  Branches          ?        0           
=========================================
  Hits              ?    89776           
  Misses            ?    22494           
  Partials          ?        0           

@jstarry jstarry requested a review from mvines April 18, 2021 07:00
@jstarry
Copy link
Member Author

jstarry commented Apr 18, 2021

@mvines is this useful? I created it as a one-off but thought it might be nice to check in

@ryoqun
Copy link
Member

ryoqun commented Apr 19, 2021

@jstarry I think these are useful maybe onset of this: #10090

Also, there is laying my spl-token total cap checker grouped by mint, in my local repo.... I'll try to bring it finally....

@jstarry
Copy link
Member Author

jstarry commented Apr 19, 2021

Thanks for pointing that issue out @ryoqun, I will expand this PR to include the other info listed there

@stale
Copy link

stale bot commented Jun 2, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jun 2, 2021
@jstarry jstarry removed the stale [bot only] Added to stale content; results in auto-close after a week. label Jun 6, 2021
@stale
Copy link

stale bot commented Jun 16, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jun 16, 2021
@stale
Copy link

stale bot commented Jun 26, 2021

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale bot closed this Jun 26, 2021
@ryoqun ryoqun reopened this Aug 17, 2021
@stale stale bot removed the stale [bot only] Added to stale content; results in auto-close after a week. label Aug 17, 2021
@ryoqun
Copy link
Member

ryoqun commented Aug 17, 2021

@jstarry I think these are useful maybe onset of this: #10090

Also, there is laying my spl-token total cap checker grouped by mint, in my local repo.... I'll try to bring it finally....

loong late self-reply: but here's the branch: https://github.com/ryoqun/solana/tree/spl-token-distribution

@jstarry
Copy link
Member Author

jstarry commented Aug 19, 2021

Thanks @ryoqun! This one has fallen in priority but when I get some down time I'll try to wrap it up

@ryoqun
Copy link
Member

ryoqun commented Aug 20, 2021

@CriesofCarrots do you happen to have rebased version of https://github.com/ryoqun/solana/tree/spl-token-distribution locally? or, the branch worked as-is for the recent run of it?

@CriesofCarrots
Copy link
Contributor

@CriesofCarrots do you happen to have rebased version of https://github.com/ryoqun/solana/tree/spl-token-distribution locally? or, the branch worked as-is for the recent run of it?

@ryoqun , sort of. I needed it rebased on v1.6 for mainnet-beta: https://github.com/CriesofCarrots/solana/tree/v1.6-spl-token-distribution
Also, I added code to track and print the number of 0-amount token accounts.

@stale
Copy link

stale bot commented Aug 28, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Aug 28, 2021
@stale
Copy link

stale bot commented Sep 4, 2021

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale bot closed this Sep 4, 2021
@jstarry jstarry deleted the ledger-account-stats branch November 29, 2021 01:09
@ryoqun
Copy link
Member

ryoqun commented Feb 16, 2022

@CriesofCarrots do you happen to have rebased version of https://github.com/ryoqun/solana/tree/spl-token-distribution locally? or, the branch worked as-is for the recent run of it?

@ryoqun , sort of. I needed it rebased on v1.6 for mainnet-beta: https://github.com/CriesofCarrots/solana/tree/v1.6-spl-token-distribution Also, I added code to track and print the number of 0-amount token accounts.

(fyi, I'm revisiting this out-of-tree branch yet again)

EDIT: https://github.com/ryoqun/solana/tree/wip-v1.8-spl-token-distribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants