dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Introduce new blockchain parameter stake_maturity_threshold #965

Closed dsaveliev closed 5 years ago

dsaveliev commented 5 years ago

Related to https://github.com/dtr-org/unit-e/pull/934

We must keep separate the initial stake maturity threshold and regular stake maturity param. (Basically, an initial threshold must be higher that stake maturity, at least the next should be true : stake_maturity_activation_height >= 2 * stake_maturity) Equal params would lead to all stake pieces to become immature on the net start:

2019-04-12 08:31:49 [            ] InvalidChainFound: invalid block=e691a6c9311dafdec621dff901fa51a5ff86b6e1083d2ffb4099356e6a86f0d6  height=102  log2_work=59.802843  date=2019-04-11 15:44:20
2019-04-12 08:31:49 [            ] InvalidChainFound:  current best=c06c8c10eb631e5c3162e8d3adf52b90e051d463701d508922acd3bae0cf7821  height=101  log2_work=59.788768  date=2019-04-11 15:44:16
2019-04-12 08:31:49 [            ] ERROR: ConnectTip(): ConnectBlock e691a6c9311dafdec621dff901fa51a5ff86b6e1083d2ffb4099356e6a86f0d6 failed
2019-04-12 08:31:49 [            ] InvalidChainFound: invalid block=e691a6c9311dafdec621dff901fa51a5ff86b6e1083d2ffb4099356e6a86f0d6  height=102  log2_work=59.802843  date=2019-04-11 15:44:20
2019-04-12 08:31:49 [            ] InvalidChainFound:  current best=c06c8c10eb631e5c3162e8d3adf52b90e051d463701d508922acd3bae0cf7821  height=101  log2_work=59.788768  date=2019-04-11 15:44:16
2019-04-12 08:32:43 [            ] ERROR: AcceptBlockHeader: block e691a6c9311dafdec621dff901fa51a5ff86b6e1083d2ffb4099356e6a86f0d6 is marked invalid
2019-04-12 08:32:46 [            ] ERROR: AcceptBlockHeader: prev block invalid

Signed-off-by: Dmitry Saveliev dima@thirdhash.com

scravy commented 5 years ago

utACK f703742da5e6ae8c79968c96e87c2414d4d88766

scravy commented 5 years ago

utACK 6286f1e8f44d88f046d0048548f3ffc3fa35d97e