Author

Topic: How to work out 'checkpoint of stake modifiers'? (Read 2101 times)

newbie
Activity: 17
Merit: 0
September 17, 2018, 01:37:19 AM
#10
Hi All

Im deving for other coins at the moment, can someone tell me how to work out the 'checkpoint of stake modifier' values within kernel.cpp ?

This is for one of those oh so popular PoS coins at the moment  Wink


Code:
// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map mapStakeModifierCheckpoints =
    boost::assign::map_list_of
            (     0, 0xfd11f4e7u )
;


Bump! I am interested how to get a Stake Modifier Checksum for the Genesis Block? I got this error:

Code:
ERROR: AddToBlockIndex() : Rejected by stake modifier checkpoint height=0, modifier=0x0000000000000000
ERROR: LoadBlockIndex() : genesis block not accepted

You need to comment out this check while creating the genesis block

example..
https://github.com/mammix2/boostcoin-core/blob/master/src/main.cpp#L2074-L2075

Then uncomment it once you're up and running

would you share your dependencies at C:/tools/* ??
jr. member
Activity: 51
Merit: 1
You need to comment out this check while creating the genesis block

example..
https://github.com/mammix2/boostcoin-core/blob/master/src/main.cpp#L2074-L2075

Then uncomment it once you're up and running

Thank you very much, it helped me a lot.
legendary
Activity: 1302
Merit: 1004
Hi All

Im deving for other coins at the moment, can someone tell me how to work out the 'checkpoint of stake modifier' values within kernel.cpp ?

This is for one of those oh so popular PoS coins at the moment  Wink


Code:
// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map mapStakeModifierCheckpoints =
    boost::assign::map_list_of
            (     0, 0xfd11f4e7u )
;


Bump! I am interested how to get a Stake Modifier Checksum for the Genesis Block? I got this error:

Code:
ERROR: AddToBlockIndex() : Rejected by stake modifier checkpoint height=0, modifier=0x0000000000000000
ERROR: LoadBlockIndex() : genesis block not accepted

You need to comment out this check while creating the genesis block

example..
https://github.com/mammix2/boostcoin-core/blob/master/src/main.cpp#L2074-L2075

Then uncomment it once you're up and running
jr. member
Activity: 51
Merit: 1
Hi All

Im deving for other coins at the moment, can someone tell me how to work out the 'checkpoint of stake modifier' values within kernel.cpp ?

This is for one of those oh so popular PoS coins at the moment  Wink


Code:
// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map mapStakeModifierCheckpoints =
    boost::assign::map_list_of
            (     0, 0xfd11f4e7u )
;


Bump! I am interested how to get a Stake Modifier Checksum for the Genesis Block? I got this error:

Code:
ERROR: AddToBlockIndex() : Rejected by stake modifier checkpoint height=0, modifier=0x0000000000000000
ERROR: LoadBlockIndex() : genesis block not accepted
newbie
Activity: 13
Merit: 0
Interesting info Smiley
legendary
Activity: 996
Merit: 1013
Thanks for the reply, i'll check it out Smiley

To clarify a little, you don't actually need those as they are extra security precaution.

Still it might be a good idea to add one for the genesis block at least.

When you've got your genesis, run getblock on it. Copy the modifierchecksum field, insert into code and recompile.
legendary
Activity: 1302
Merit: 1004

I don't know that much about PoS but here's what Sunny King had to say:

CheckStakeModifierCheckpoints() is just used to make sure the stake modifier computation is deterministic and every node computes to the same value. It's only checked with a few blocks, like the hard checkpoint that bitcoin uses.

It's not actually part of the protocol itself. The reason it was there is because of the complexity of modifier computation there could be bugs that made it non-deterministic. I put it there just so if someone runs into it then I would know a bug exists with the modifier computation.

Peercoin currently has 3 checkpoints added after genesis. I guess you can add them whenever you feel like it,
in connection with client updates for instance.

Thanks for the reply, i'll check it out Smiley
legendary
Activity: 996
Merit: 1013

I don't know that much about PoS but here's what Sunny King had to say:

CheckStakeModifierCheckpoints() is just used to make sure the stake modifier computation is deterministic and every node computes to the same value. It's only checked with a few blocks, like the hard checkpoint that bitcoin uses.

It's not actually part of the protocol itself. The reason it was there is because of the complexity of modifier computation there could be bugs that made it non-deterministic. I put it there just so if someone runs into it then I would know a bug exists with the modifier computation.

Peercoin currently has 3 checkpoints added after genesis. I guess you can add them whenever you feel like it,
in connection with client updates for instance.
legendary
Activity: 1302
Merit: 1004
Bump.

Anyone?
legendary
Activity: 1302
Merit: 1004
Hi All

Im deving for other coins at the moment, can someone tell me how to work out the 'checkpoint of stake modifier' values within kernel.cpp ?

This is for one of those oh so popular PoS coins at the moment  Wink


Code:
// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map mapStakeModifierCheckpoints =
    boost::assign::map_list_of
            (     0, 0xfd11f4e7u )
;

Jump to: