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 fluxnodecount index flag #239

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add fluxnodecount index flag #239

wants to merge 3 commits into from

Conversation

blondfrogs
Copy link
Member

@blondfrogs blondfrogs commented Apr 18, 2024

This PR adds a new index flag fluxnodecount.

This flag will require a reindex to take place as it modifies the CBlockIndex to include the number of confirmed nodes in each tier at each block height.

If this is enabled, you can call getfluxnodecount with additional paramters.
History starts at block 558000 - When deterministic fluxnodes went live

I suggest putting the output to a file ">> history.json" as the data size is pretty large when using smaller numbers

getfluxnodecount true >> history.json - this will return all fluxnode counts from start every 360 blocks or ~12 hours.
getfluxnodecount true 720 >> history.json - this will return all fluxnode counts from start every 720 blocks or ~1 day.
getfluxnodecount true 1 >> history.json - this will return all fluxnode counts from start every block.

For example

getfluxnodecount true 250000 returns

  "558000": {
    "stratus": 0,
    "nimbus": 0,
    "cumulus": 0
  },
  "808000": {
    "stratus": 218,
    "nimbus": 297,
    "cumulus": 180
  },
  "1058000": {
    "stratus": 543,
    "nimbus": 877,
    "cumulus": 1244
  },
  "1308000": {
    "stratus": 2112,
    "nimbus": 2435,
    "cumulus": 10898
  },
  "1558000": {
    "stratus": 1770,
    "nimbus": 2005,
    "cumulus": 8359
  }
}`

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.

1 participant