ZIP - Changing Zcash supply curve to 3% yearly after 2020 halving

@noamchom, to make this easier, I developed an itty-bitty little shell script for you to run on your node.

@daira, since your attention has already been requested on this thread, I ask that you please review the following to see if does what it says on the tin, without any evilness (muahahaha!). Thanks.

Dependencies: zcash-cli (a part of the package for the Zcash reference node, zcashd), and jq.

#!/bin/sh

# countzec.sh
#
# A simple way to check the current Zcash supply.
#
# By nullius <nullius@nym.zone>, an authentic Cypherpunk.
# PGP: 0xC2E91CD74A4C57A105F6C21B5A00591B2F307E0C
#
# Cypherpunks anti-License. http://cypherspace.org/CPL/
#
# Except that it is FORBIDDEN BY LAW to mix this with with
# any source code licensed under the GPL, AGPL, or BOSL.
#
# (That is just a way to FUD the status of the following public-domain
# code, for the purpose of encouraging people to stay anonymous
# and ignore all software licenses.  It is the Cypherpunk way.)
#
# The motive for this code snippet:
#
# https://forum.zcashcommunity.com/t/zip-changing-zcash-supply-curve-to-3-yearly-after-2020-halving/34894/81
#
# BUG:  The two RPC queries together are not atomic.  If a block
# were to arrive at exactly the wrong instant, the following could
# give a wrong answer.

{ zcash-cli getblockchaininfo ; zcash-cli gettxoutsetinfo ; } | \
	jq -se '(reduce .[0].valuePools[].chainValue as $zec (0.0; . + $zec)) + .[1].total_amount'

countzec.sh.asc: Always verify digital signatures!

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSNOMR84IlYpr/EF5vEJ5MVn575SQUCYt9pgAAKCRDEJ5MVn575
SbdWAQD8ojC/00RnDWi05thxcWifH2jJ7HNfmwRMwqhUULGN5QD+LXYMVI5NYa9t
WkBP6rkxom++1i7VFlcUsdqZeiAWjAM=
=7Eqb
-----END PGP SIGNATURE-----
2 Likes