Skip to main content

Module subsidy

Module subsidy 

Source
Expand description

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§

FundingStreamRecipient
A funding stream recipient as specified in protocol specification §7.10.1
FundingStreams
Funding stream recipients and height ranges.

Enums§

FundingStreamReceiver
The funding stream receiver categories.
SubsidyError
Block subsidy errors.

Traits§

ParameterSubsidy
Functionality specific to block subsidy-related consensus rules

Functions§

block_subsidy
BlockSubsidy(height) as described in protocol specification §7.8
founders_reward
FoundersReward(height) as described in §7.8.
founders_reward_address
Returns the founders reward address for a given height and network as described in §7.9.
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
The halving index for a block height and network.
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