zcash / zcash

Zcash - Internet Money

Home Page:https://z.cash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include the number of spends and outputs for each pool in the output of getblockchaininfo

daira opened this issue · comments

Is your feature request related to a problem? Please describe.

I frequently (well, sometimes) want to know the size of the nullifier set and commitment tree for a shielded pool. (I've used "spends" and "outputs" in the issue title because that terminology also makes sense for the transparent pool.)

Describe the solution you'd like

For each pool in the "valuePools" array of the getblockchaininfo output, include:

  • "spends" (numeric) the total number of spends from this pool
  • "outputs" (numeric) the total number of outputs created in this pool

The top-level "commitments" field could be deprecated since it will be identical to the "outputs" field for the Sprout pool.

Alternatives you've considered

This information could be given by a separate RPC, but there is an obvious place to put it in the getblockchaininfo output, and I think it is easy to calculate so should not slow down the RPC.