Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: okeying on March 29, 2016, 05:48:09 AM



Title: what's meaning of these params?
Post by: okeying on March 29, 2016, 05:48:09 AM
hi everyone ,I got some puzzleds with these params.Is there anybody could solve my puzzleds? Thanks very much!By the way,I'm a fresh man in the Bitcoin world.

 ??? ??? ???
        genesis.nTime    = nTime;
        genesis.nBits    = nBits;
        genesis.nNonce   = nNonce;
        genesis.nVersion = nVersion;


        consensus.nSubsidyHalvingInterval = 210000;
        consensus.nMajorityEnforceBlockUpgrade = 750;
        consensus.nMajorityRejectBlockOutdated = 950;
        consensus.nMajorityWindow = 1000;
        consensus.BIP34Height = 227931;
        consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8");
        consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
        consensus.nPowTargetSpacing = 10 * 60;
        consensus.fPowAllowMinDifficultyBlocks = false;
        consensus.fPowNoRetargeting = false;
        consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
        consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008

        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008


Title: Re: what's meaning of these params?
Post by: fbueller on March 29, 2016, 01:01:07 PM
The first part is the genesis block, the rest are other constants related to network rules - like the subsidy (mining reward) halving interval, desired block interval, and so on.

As you can see, it's just a place to dump constants that are required throughout the code.

Edit: did you mean to open a poll here?


Title: Re: what's meaning of these params?
Post by: jrpatking on March 29, 2016, 02:42:08 PM
Why do you feel much about consensus code? Do you want clear explanation of each and every code you listed here?