diff --git a/zip-0207.rst b/zip-0207.rst index 15b65846..ea3f92c5 100644 --- a/zip-0207.rst +++ b/zip-0207.rst @@ -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 <