what do these values in chainparams.cpp do?

0

what do these values in chainparams.cpp do?

consensus.nMajorityEnforceBlockUpgrade = 2;
consensus.nMajorityRejectBlockOutdated = 3;
consensus.nMajorityWindow = 3;

and how do I find them in the existing blockchain when upgrading end for new?

first time I think it's when start diff grow up, but now think it's wrong.

tseries

Posted 2017-07-30T09:18:46.627

Reputation: 57

Answers

0

Those values are part of the IsSuperMajority soft fork deployment system. This method of deploying soft forks is no longer used in Bitcoin now and have been removed. Those values are for the parameters that will activate a soft fork that uses the IsSuperMajority method; they are not relevant if you don't have any soft forks to deploy.

nMajorityEnforceBlockUpgrade is the threshold for enforcing the new consensus rules specified by the soft fork. nMajorityRejectBlockOutdated is the threshold for rejecting all blocks that don't have the version number specified by the soft fork. nMajorityWindow is the number of blocks in the window that are being checked.

For example, with the numbers you posted, suppose you are activating a soft fork where miners signal by setting their block version numbers to 2 or greater. If 2 (nMajorityEnforceBlockUpgrade) out of the last 3 (nMajorityWindow) blocks have a version number of 2 or greater, then you begin enforcing the new rules specified by the soft fork (e.g. block height in coinbase). If 3 (nMajorityRejectBlockOutdated) out of the last 3 (nMajorityWindow) blocks are version number 2 or greater, then any block with a version number less than 2 (i.e. 1 or 0) are now invalid and will be rejected.

Andrew Chow

Posted 2017-07-30T09:18:46.627

Reputation: 40 910

0

what do these values in chainparams.cpp do?

If nMajorityEnforceBlockUpgrade out of the last nMajorityWindow blocks have signaled support for a softfork, enforce the softfork's rules on the blocks that have signaled support.

If nMajorityRejectBlockOutdated out of the last nMajorityWindow blocks have signaled support for a softfork, mark blocks with an old version as invalid.

These are for BIP34 style softforks.

Nick ODell

Posted 2017-07-30T09:18:46.627

Reputation: 26 536