Specify the correct start and end heights for new funding streams

This commit is contained in:
Jack Grigg 2019-02-01 10:41:58 +00:00
parent e2b5431316
commit 0e5701144a
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 19 additions and 15 deletions

View File

@ -47,8 +47,16 @@ Specification
Definitions
-----------
- ``PostBlossomHalvingInterval`` as-defined in [#zip-0208]_.
We use the following constants and functions defined in [#zip-0208]_:
- ``BlossomActivationHeight``
- ``PostBlossomHalvingInterval``
- ``Halving(height)``
We also define the following constants and functions:
- ``SlowStartShift`` as-defined in [#block-subsidy]_.
- ``HeightForHalving(halving)``: Smallest ``height`` such that ``Halving(height) = halving``
Funding streams
---------------
@ -132,16 +140,15 @@ Stream definitions
The three consensus-defined funding streams described above each start at the Blossom activation height, and
end at the first block reward halving. They are defined as follows:
======== =============== ================= ================== ===============================================
Stream Value numerator Value denominator Start height End height
======== =============== ================= ================== ===============================================
ZECC EF 737 1000 Blossom activation ``SlowStartShift + PostBlossomHalvingInterval``
ZF E 144 1000 Blossom activation ``SlowStartShift + PostBlossomHalvingInterval``
ZECC SR 119 1000 Blossom activation ``SlowStartShift + PostBlossomHalvingInterval``
======== =============== ================= ================== ===============================================
======== =============== ================= =========================== =======================
Stream Value numerator Value denominator Start height End height
======== =============== ================= =========================== =======================
ZECC EF 737 1000 ``BlossomActivationHeight`` ``HeightForHalving(1)``
ZF E 144 1000 ``BlossomActivationHeight`` ``HeightForHalving(1)``
ZECC SR 119 1000 ``BlossomActivationHeight`` ``HeightForHalving(1)``
======== =============== ================= =========================== =======================
- To-do: specify the correct values.
- To-do: specify the correct start height.
The sets of recipient addresses are defined as follows:
@ -196,8 +203,7 @@ Example implementation
consensus.vFundingPeriods[Consensus::FS_ZECC_EF].valueDenominator = 1000;
consensus.vFundingPeriods[Consensus::FS_ZECC_EF].startHeight =
consensus.vUpgrades[Consensus::UPGRADE_BLOSSOM].nActivationHeight;
consensus.vFundingPeriods[Consensus::FS_ZECC_EF].endHeight =
(consensus.nSubsidySlowStartInterval / 2) + consensus.nSubsidyPostBlossomHalvingInterval;
consensus.vFundingPeriods[Consensus::FS_ZECC_EF].endHeight = HeightForHalving(consensus, 1);
assert(consensus.vFundingPeriods[Consensus::FS_ZECC_EF].valueNumerator <
consensus.vFundingPeriods[Consensus::FS_ZECC_EF].valueDenominator);
assert(consensus.vFundingPeriods[Consensus::FS_ZECC_EF].startHeight <
@ -208,8 +214,7 @@ Example implementation
consensus.vFundingPeriods[Consensus::FS_ZF_E].valueDenominator = 1000;
consensus.vFundingPeriods[Consensus::FS_ZF_E].startHeight =
consensus.vUpgrades[Consensus::UPGRADE_BLOSSOM].nActivationHeight;
consensus.vFundingPeriods[Consensus::FS_ZF_E].endHeight =
(consensus.nSubsidySlowStartInterval / 2) + consensus.nSubsidyPostBlossomHalvingInterval;
consensus.vFundingPeriods[Consensus::FS_ZF_E].endHeight = HeightForHalving(consensus, 1);
assert(consensus.vFundingPeriods[Consensus::FS_ZF_E].valueNumerator <
consensus.vFundingPeriods[Consensus::FS_ZF_E].valueDenominator);
assert(consensus.vFundingPeriods[Consensus::FS_ZF_E].startHeight <
@ -220,8 +225,7 @@ Example implementation
consensus.vFundingPeriods[Consensus::FS_ZECC_SR].valueDenominator = 1000;
consensus.vFundingPeriods[Consensus::FS_ZECC_SR].startHeight =
consensus.vUpgrades[Consensus::UPGRADE_BLOSSOM].nActivationHeight;
consensus.vFundingPeriods[Consensus::FS_ZECC_SR].endHeight =
(consensus.nSubsidySlowStartInterval / 2) + consensus.nSubsidyPostBlossomHalvingInterval;
consensus.vFundingPeriods[Consensus::FS_ZECC_SR].endHeight = HeightForHalving(consensus, 1);
assert(consensus.vFundingPeriods[Consensus::FS_ZECC_SR].valueNumerator <
consensus.vFundingPeriods[Consensus::FS_ZECC_SR].valueDenominator);
assert(consensus.vFundingPeriods[Consensus::FS_ZECC_SR].startHeight <