Explicitly parameterise FundingStream in specification

This commit is contained in:
Jack Grigg 2019-01-25 02:08:06 +00:00
parent cffde64533
commit 36d4481d7e
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 10 additions and 6 deletions

View File

@ -57,8 +57,10 @@ ZIPs.
The value of a funding stream at a given block height is defined as:: The value of a funding stream at a given block height is defined as::
FundingStream.Value(height) = FundingStream[FUND].Value(height) =
floor((BlockReward(height) * FundingStream.ValueNumerator) / FundingStream.ValueDenominator) floor((
BlockReward(height) * FundingStream[FUND].ValueNumerator
) / FundingStream[FUND].ValueDenominator)
An active funding stream at a given block height is defined as a funding stream for which the block height is An active funding stream at a given block height is defined as a funding stream for which the block height is
less than its end height, but not less than its start height. less than its end height, but not less than its start height.
@ -68,11 +70,13 @@ halving interval, creating a roughly-monthly sequence of funding periods. The ad
block height is defined as follows (using ``HalvingInterval`` as-defined in [#protocol-constants]_):: block height is defined as follows (using ``HalvingInterval`` as-defined in [#protocol-constants]_)::
AddressChangeInterval = HalvingInterval / 48 AddressChangeInterval = HalvingInterval / 48
FundingStream.AddressIndex(height) = FundingStream[FUND].AddressIndex(height) =
floor((height - FundingStream.StartHeight) / AddressChangeInterval) floor((
Address(height) = FundingStream.Addresses[FundingStream.AddressIndex(height)] height - FundingStream[FUND].StartHeight
) / AddressChangeInterval)
Address(height) = FundingStream[FUND].Addresses[FundingStream[FUND].AddressIndex(height)]
- TODO: Fix ``FundingStream.AddressIndex`` to line funding periods up across funding streams. - TODO: Fix ``FundingStream[FUND].AddressIndex`` to line funding periods up across funding streams.
Consensus rules Consensus rules
--------------- ---------------