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::
FundingStream.Value(height) =
floor((BlockReward(height) * FundingStream.ValueNumerator) / FundingStream.ValueDenominator)
FundingStream[FUND].Value(height) =
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
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]_)::
AddressChangeInterval = HalvingInterval / 48
FundingStream.AddressIndex(height) =
floor((height - FundingStream.StartHeight) / AddressChangeInterval)
Address(height) = FundingStream.Addresses[FundingStream.AddressIndex(height)]
FundingStream[FUND].AddressIndex(height) =
floor((
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
---------------