Open
Conversation
After the time-wrap bug hit Starcoin at block 777855 again and finally stoped the network from producing new blocks the following changes to the protocol were implemented: 1) The ActualSpacing is bound by 2 seconds and TargetTimespan, i.e. 15 minutes 2) The PoW/PoS ratio is set to 1:3 (compare to the original one 1:12) to allow more PoW blocks as anyway for the last half of year the PoS was already broken. 3) The block trust scoring algorithm changed to target 3 PoW blocks among past 12 blocks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to update checkpoints need modifications in 2 files :
first "checkpoints.cpp" file modifications = added 7 lines after line 43 :
namespace Checkpoints
{
typedef std::map<int, uint256> MapCheckpoints;
secondly "kernel.cpp" file modifications = added 7 lines after line 38 :
// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map<int, unsigned int> mapStakeModifierCheckpoints =
boost::assign::map_list_of
( 0, 0x0e00670bu )
( 100, 0xb52d1d99u )
( 10000, 0xc1c3e28fu )
(100000, 0x88a23121u )
(200000, 0xfcbb2766u )
(300000, 0x1e19374au )
(371800, 0xa200c164u )
(425001, 0x530acdccu )
(518284, 0x3dff5bd6u )
(550012, 0x83b9a085u )
(678769, 0xb598e419u )
(725125, 0xca32a70cu )
(762056, 0x71edfcfeu )
(777800, 0x927769a8u )
(778013, 0x4f3cd727u )
(784130, 0x7ed1b3afu )
(823502, 0x7749ff66u )
(1285154, 0xd4bc00e3u )
(1780061, 0xb1ce3bbcu )
(2281896, 0xb496c5f8u )
(2770248, 0x52b5037bu )
(3241509, 0x3ce3512du )
(3711537, 0x26480028u )
(3952780, 0x8218e17bu )
;
// Get the last stake modifier and its generation time from a given block
static bool GetLastStakeModifier(const CBlockIndex* pindex, uint64& nStakeModifier, int64& nModifierTime)
I have tested them : modified files and recompiled my wallet.