ain icon indicating copy to clipboard operation
ain copied to clipboard

Parameterised block time

Open Bushstar opened this issue 1 year ago • 1 comments

Summary

  • Move hard coded block time, block period and any other related variables to Gov vars.

Areas impacted moving nTargetSpacing, nTargetTimespanV2 and emissionReductionPeriod to Gov vars

Block time Difficulty adjust period Emission reduction Loans Auctions Calculate anchor team Interest per block Set pool rewards Auto updating of daily rewards Split auto lock Oracle interval if not set in Gov var

Other areas moved to Gov vars

Anchor auths created chainparams 15 blocks Anchor team change chainparams 120 blocks MN Activation chainparams 1008 blocks MN resignation chainparams 2016 blocks MN owner, operator, reward change uses MN resignation time CICXOrder::DEFAULT_EXPIRY 2880 CICXMakeOffer::EUNOSPAYA_DEFAULT_EXPIRY 20 CICXMakeOffer::MAKER_DEPOSIT_REFUND_TIMEOUT 100 CICXSubmitDFCHTLC::EUNOSPAYA_MINIMUM_TIMEOUT 1440 CICXSubmitDFCHTLC::EUNOSPAYA_MINIMUM_2ND_TIMEOUT 480 CICXSubmitEXTHTLC::EUNOSPAYA_BTC_BLOCKS_IN_DFI_BLOCKS 20

Following noted time related areas

Max stake age chainparams 14 * 24 * 60 * 60 Coin age period increment 6 hours Anchor min depth 3 hours

Other notes:

Limit future swap volume settable via Gov vars, has hard coded defaults if not set. CFP/VOC set by Gov var. Voting and emergency voting period has defaults in chain params. Future swap set by Gov var

Implications

  • Storage

    • [x] Database reindex required
    • [ ] Database reindex optional
    • [ ] Database reindex not required
    • [ ] None
  • Consensus

    • [x] Network upgrade required
    • [ ] Includes backward compatible changes
    • [ ] Includes consensus workarounds
    • [ ] Includes consensus refactors
    • [ ] None

Bushstar avatar Jun 29 '24 06:06 Bushstar

Currently blocked on missing commits:

Other areas moved to Gov vars
Anchor auths created chainparams 15 blocks
Anchor team change chainparams 120 blocks
MN Activation chainparams 1008 blocks
MN resignation chainparams 2016 blocks
MN owner, operator, reward change uses MN resignation time
CICXOrder::DEFAULT_EXPIRY 2880
CICXMakeOffer::EUNOSPAYA_DEFAULT_EXPIRY 20
CICXMakeOffer::MAKER_DEPOSIT_REFUND_TIMEOUT 100
CICXSubmitDFCHTLC::EUNOSPAYA_MINIMUM_TIMEOUT 1440
CICXSubmitDFCHTLC::EUNOSPAYA_MINIMUM_2ND_TIMEOUT 480
CICXSubmitEXTHTLC::EUNOSPAYA_BTC_BLOCKS_IN_DFI_BLOCKS 20

And then:

  • To ensure they are all set together or errors on set.

prasannavl avatar Sep 06 '24 15:09 prasannavl