Skip to content

Instantly share code, notes, and snippets.

@phm87
Forked from leto/anonset.md
Created January 5, 2020 22:44
Show Gist options
  • Save phm87/dfd6bc0015a188f7a1ffb0a261d14da1 to your computer and use it in GitHub Desktop.
Save phm87/dfd6bc0015a188f7a1ffb0a261d14da1 to your computer and use it in GitHub Desktop.
Hush Shielded Pool stats as of Jan 5th 2020

Hush Shielded Pool stats as of Jan 5th 2020

With zindex enabled, the getchaintxstats RPC returns an immense amount of information about zaddr usage. This RPC did not exist in Bitcoin when Zcash forked, so I ported it from latest BTC Core to Komodo and Hush. In the Hush version of this RPC, the -zindex functionality was added.

By default, the RPC gives stats for the last month. It can be given an arbitrary "block window" to calculate stats for any time period. Some statistics apply to the entire chain and are not specific to the block window, such as those below.

The "anonymity set" (anonset) or "shielded pool size" of Hush mainnet:

$ ./hush-cli getchaintxstats|grep shielded_pool
  "shielded_pool_size": 32714,

One can verify this number by looking at total shielded outputs:

$ ./hush-cli getchaintxstats|grep shielded_outputs
  "shielded_outputs": 50867,

and then looking at the global nullifier count:

$ ./hush-cli getchaintxstats|grep nullif
  "nullifiers": 18153,

One will notice that, by definition, shielded pool size is equal to the total number of shielded outputs minus the number of nullifiers and that is indeed how shielded_pool_size is calculated.

The shielded pool size can go up and down with each block. When someone spends many shielded outputs (zouts), the number goes down. When many payments are made to zaddrs that go unspent, the number goes up. This is why it must be studied constantly, in real-time via RPCs. Occassionally studying it with external tools is cumbersome and makes it easier to ignore.

Hush is dedicated to pushing the entire Zcash Protocol world forward, kicking and screaming if we must, into a future with more privacy.

Full help output of getchaintxstats: https://gist.github.com/leto/1429fac00b7836ee3f87d8d5d883aea1

Example output: https://gist.github.com/leto/cbc7feb8e5cf54de0911e248408252f3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment