Expand description
Constants and calculations for Block Subsidy and Funding Streams
This module contains the consensus parameters which are required for verification.
Some consensus parameters change based on network upgrades. Each network upgrade happens at a particular block height. Some parameters have a value (or function) before the upgrade height, at the upgrade height, and after the upgrade height. (For example, the value of the reserved field in the block header during the Heartwood upgrade.)
Typically, consensus parameters are accessed via a function that takes a
Network
and block::Height
.
Structs§
- FUNDING_
STREAMS_ MAINNET - The funding streams for Mainnet as described in:
- FUNDING_
STREAMS_ TESTNET - The funding streams for Testnet as described in:
- Funding
Stream Recipient - A funding stream recipient as specified in protocol specification §7.10.1
- Funding
Streams - Funding stream recipients and height ranges.
Enums§
- Funding
Stream Receiver - The funding stream receiver categories.
- Subsidy
Error - Block subsidy errors.
Constants§
- BLOSSOM_
POW_ TARGET_ SPACING_ RATIO - Used as a multiplier to get the new halving interval after Blossom.
- FUNDING_
STREAMS_ NUM_ ADDRESSES_ MAINNET - Number of addresses for each funding stream in the Mainnet.
In the spec (protocol specification §7.10) this is defined as:
fs.addressindex(fs.endheight - 1)
however we know this value beforehand so we prefer to make it a constant instead. - FUNDING_
STREAMS_ NUM_ ADDRESSES_ TESTNET - Number of addresses for each funding stream in the Testnet.
In the spec (protocol specification §7.10) this is defined as:
fs.addressindex(fs.endheight - 1)
however we know this value beforehand so we prefer to make it a constant instead. - FUNDING_
STREAM_ ADDRESS_ CHANGE_ INTERVAL - Address change interval function here as a constant as described in protocol specification §7.10.1.
- FUNDING_
STREAM_ ECC_ ADDRESSES_ MAINNET - List of addresses for the ECC funding stream in the Mainnet.
- FUNDING_
STREAM_ ECC_ ADDRESSES_ TESTNET - List of addresses for the ECC funding stream in the Testnet.
- FUNDING_
STREAM_ MG_ ADDRESSES_ MAINNET - List of addresses for the Major Grants funding stream in the Mainnet.
- FUNDING_
STREAM_ MG_ ADDRESSES_ TESTNET - List of addresses for the Major Grants funding stream in the Testnet.
- FUNDING_
STREAM_ RECEIVER_ DENOMINATOR - Denominator as described in protocol specification §7.10.1.
- FUNDING_
STREAM_ SPECIFICATION - The specification for pre-NU6 funding stream receivers, a URL that links to ZIP-214.
- FUNDING_
STREAM_ ZF_ ADDRESSES_ MAINNET - List of addresses for the Zcash Foundation funding stream in the Mainnet.
- FUNDING_
STREAM_ ZF_ ADDRESSES_ TESTNET - List of addresses for the Zcash Foundation funding stream in the Testnet.
- LOCKBOX_
SPECIFICATION - The specification for post-NU6 funding stream and lockbox receivers, a URL that links to ZIP-1015.
- MAX_
BLOCK_ SUBSIDY - The largest block subsidy, used before the first halving.
- NU6_
1_ LOCKBOX_ DISBURSEMENTS_ MAINNET - The one-time lockbox disbursement output addresses and amounts expected in the NU6.1 activation block’s coinbase transaction on Mainnet. See:
- NU6_
1_ LOCKBOX_ DISBURSEMENTS_ TESTNET - The one-time lockbox disbursement output addresses and amounts expected in the NU6.1 activation block’s coinbase transaction on Testnet. See:
- POST_
BLOSSOM_ HALVING_ INTERVAL - After Blossom the block time is reduced to 75 seconds but halving period should remain around 4 years.
- POST_
NU6_ 1_ FUNDING_ STREAMS_ NUM_ ADDRESSES_ TESTNET - Number of addresses for each post-NU6 funding stream in the Testnet.
In the spec (protocol specification §7.10) this is defined as:
fs.addressindex(fs.endheight - 1)
however we know this value beforehand so we prefer to make it a constant instead. - POST_
NU6_ 1_ FUNDING_ STREAM_ FPF_ ADDRESSES_ TESTNET - List of addresses for the Major Grants post-NU6.1 funding stream on Testnet administered by the Financial Privacy Fund (FPF).
- POST_
NU6_ FUNDING_ STREAMS_ NUM_ ADDRESSES_ MAINNET - Number of addresses for each post-NU6 funding stream on Mainnet.
In the spec (protocol specification §7.10) this is defined as:
fs.addressindex(fs.endheight - 1)
however we know this value beforehand so we prefer to make it a constant instead. - POST_
NU6_ FUNDING_ STREAMS_ NUM_ ADDRESSES_ TESTNET - Number of addresses for each post-NU6 funding stream in the Testnet.
In the spec (protocol specification §7.10) this is defined as:
fs.addressindex(fs.endheight - 1)
however we know this value beforehand so we prefer to make it a constant instead. - POST_
NU6_ FUNDING_ STREAM_ FPF_ ADDRESSES_ MAINNET - List of addresses for the Major Grants post-NU6 funding stream on Mainnet administered by the Financial Privacy Fund (FPF).
- POST_
NU6_ FUNDING_ STREAM_ FPF_ ADDRESSES_ TESTNET - List of addresses for the Major Grants post-NU6 funding stream on Testnet administered by the Financial Privacy Fund (FPF).
- PRE_
BLOSSOM_ HALVING_ INTERVAL - Halving is at about every 4 years, before Blossom block time is 150 seconds.
Traits§
- Parameter
Subsidy - Functionality specific to block subsidy-related consensus rules
Functions§
- block_
subsidy BlockSubsidy(height)
as described in protocol specification §7.8- funding_
stream_ address_ period - Returns the address change period as described in protocol specification §7.10
- funding_
stream_ values - Returns the
fs.Value(height)
for each stream receiver as described in protocol specification §7.8 - halving_
divisor - The divisor used for halvings.
- height_
for_ halving - The first block height of the halving at the provided halving index for a network.
- miner_
subsidy MinerSubsidy(height)
as described in protocol specification §7.8- num_
halvings - The halving index for a block height and network.