@@ -134,24 +134,6 @@ static const Checkpoints::CCheckpointData dataRegtest = {
134134 0 ,
135135 100 };
136136
137- libzerocoin::ZerocoinParams* CChainParams::Zerocoin_Params (bool useModulusV1) const
138- {
139- assert (this );
140- static CBigNum bnHexModulus = 0 ;
141- if (!bnHexModulus)
142- bnHexModulus.SetHex (zerocoinModulus);
143- static libzerocoin::ZerocoinParams ZCParamsHex = libzerocoin::ZerocoinParams (bnHexModulus);
144- static CBigNum bnDecModulus = 0 ;
145- if (!bnDecModulus)
146- bnDecModulus.SetDec (zerocoinModulus);
147- static libzerocoin::ZerocoinParams ZCParamsDec = libzerocoin::ZerocoinParams (bnDecModulus);
148-
149- if (useModulusV1)
150- return &ZCParamsHex;
151-
152- return &ZCParamsDec;
153- }
154-
155137class CMainParams : public CChainParams
156138{
157139public:
@@ -180,7 +162,7 @@ class CMainParams : public CChainParams
180162 consensus.nTargetSpacing = 1 * 60 ;
181163 consensus.nTimeSlotLength = 15 ;
182164
183- // height based activations
165+ // height- based activations
184166 consensus.height_last_PoW = 259200 ;
185167 consensus.height_last_ZC_AccumCheckpoint = 1686240 ;
186168 consensus.height_last_ZC_WrappedSerials = 1686229 ;
@@ -198,6 +180,18 @@ class CMainParams : public CChainParams
198180 consensus.height_ZC_RecalcAccumulators = 908000 ;
199181
200182 // Zerocoin-related params
183+ consensus.ZC_Modulus = " 25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784"
184+ " 4069182906412495150821892985591491761845028084891200728449926873928072877767359714183472702618963750149718246911"
185+ " 6507761337985909570009733045974880842840179742910064245869181719511874612151517265463228221686998754918242243363"
186+ " 7259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133"
187+ " 8441436038339044149526344321901146575444541784240209246165157233507787077498171257724679629263863563732899121548"
188+ " 31438167899885040445364023527381951378636564391212010397122822120720357" ;
189+ consensus.ZC_MaxPublicSpendsPerTx = 637 ; // Assume about 220 bytes each input
190+ consensus.ZC_MaxSpendsPerTx = 7 ; // Assume about 20kb each input
191+ consensus.ZC_MinMintConfirmations = 20 ;
192+ consensus.ZC_MinMintFee = 1 * CENT;
193+ consensus.ZC_MinStakeDepth = 200 ;
194+ consensus.ZC_TimeStart = 1508214600 ; // October 17, 2017 4:30:00 AM
201195 consensus.ZC_WrappedSerialsSupply = 4131563 * COIN; // zerocoin supply at height_last_ZC_WrappedSerials
202196
203197 /* *
@@ -223,7 +217,6 @@ class CMainParams : public CChainParams
223217 /* * Height or Time Based Activations **/
224218 nPivxBadBlockTime = 1471401614 ; // Skip nBit validation of Block 259201 per PR #915
225219 nPivxBadBlocknBits = 0x1c056dac ; // Skip nBit validation of Block 259201 per PR #915
226- nZerocoinStartTime = 1508214600 ; // October 17, 2017 4:30:00 AM
227220 nInvalidAmountFiltered = 268200 *COIN; // Amount of invalid coins filtered through exchanges, that should be considered valid
228221 nEnforceNewSporkKey = 1566860400 ; // !> Sporks signed after Monday, August 26, 2019 11:00:00 PM GMT must use the new spork key
229222 nRejectOldSporkKey = 1569538800 ; // !> Fully reject old spork key after Thursday, September 26, 2019 11:00:00 PM GMT
@@ -258,22 +251,6 @@ class CMainParams : public CChainParams
258251 strObfuscationPoolDummyAddress = " D87q2gC9j6nNrnzCsg4aY6bHMLsT9nUhEw" ;
259252 nStartMasternodePayments = 1403728576 ; // Wed, 25 Jun 2014 20:36:16 GMT
260253
261- /* * Zerocoin */
262- zerocoinModulus = " 25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784"
263- " 4069182906412495150821892985591491761845028084891200728449926873928072877767359714183472702618963750149718246911"
264- " 6507761337985909570009733045974880842840179742910064245869181719511874612151517265463228221686998754918242243363"
265- " 7259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133"
266- " 8441436038339044149526344321901146575444541784240209246165157233507787077498171257724679629263863563732899121548"
267- " 31438167899885040445364023527381951378636564391212010397122822120720357" ;
268- nMaxZerocoinSpendsPerTransaction = 7 ; // Assume about 20kb each
269- nMaxZerocoinPublicSpendsPerTransaction = 637 ; // Assume about 220 bytes each input
270- nMinZerocoinMintFee = 1 * CENT; // high fee required for zerocoin mints
271- nMintRequiredConfirmations = 20 ; // the maximum amount of confirmations until accumulated in 19
272- nRequiredAccumulation = 1 ;
273- nDefaultSecurityLevel = 100 ; // full security level for accumulators
274- nZerocoinHeaderVersion = 4 ; // Block headers must be this version once zerocoin is active
275- nZerocoinRequiredStakeDepth = 200 ; // The required confirmations for a zpiv to be stakable
276-
277254 nBudget_Fee_Confirmations = 6 ; // Number of confirmations for the finalization fee
278255 nProposalEstablishmentTime = 60 * 60 * 24 ; // Proposals must be at least a day old to make it into a budget
279256 }
@@ -335,6 +312,18 @@ class CTestNetParams : public CMainParams
335312 consensus.height_ZC_RecalcAccumulators = 999999999 ;
336313
337314 // Zerocoin-related params
315+ consensus.ZC_Modulus = " 25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784"
316+ " 4069182906412495150821892985591491761845028084891200728449926873928072877767359714183472702618963750149718246911"
317+ " 6507761337985909570009733045974880842840179742910064245869181719511874612151517265463228221686998754918242243363"
318+ " 7259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133"
319+ " 8441436038339044149526344321901146575444541784240209246165157233507787077498171257724679629263863563732899121548"
320+ " 31438167899885040445364023527381951378636564391212010397122822120720357" ;
321+ consensus.ZC_MaxPublicSpendsPerTx = 637 ; // Assume about 220 bytes each input
322+ consensus.ZC_MaxSpendsPerTx = 7 ; // Assume about 20kb each input
323+ consensus.ZC_MinMintConfirmations = 20 ;
324+ consensus.ZC_MinMintFee = 1 * CENT;
325+ consensus.ZC_MinStakeDepth = 200 ;
326+ consensus.ZC_TimeStart = 1501776000 ;
338327 consensus.ZC_WrappedSerialsSupply = 0 ; // WrappedSerials only on main net
339328
340329 /* *
@@ -357,7 +346,6 @@ class CTestNetParams : public CMainParams
357346 nPivxBadBlockTime = 1489001494 ; // Skip nBit validation of Block 259201 per PR #915
358347 nPivxBadBlocknBits = 0x1e0a20bd ; // Skip nBit validation of Block 201 per PR #915
359348 nMasternodeCountDrift = 4 ;
360- nZerocoinStartTime = 1501776000 ;
361349 nInvalidAmountFiltered = 0 ; // Amount of invalid coins filtered through exchanges, that should be considered valid
362350 nEnforceNewSporkKey = 1566860400 ; // !> Sporks signed after Monday, August 26, 2019 11:00:00 PM GMT must use the new spork key
363351 nRejectOldSporkKey = 1569538800 ; // !> Reject old spork key after Thursday, September 26, 2019 11:00:00 PM GMT
@@ -437,7 +425,7 @@ class CRegTestParams : public CTestNetParams
437425
438426 // height based activations
439427 consensus.height_last_PoW = 250 ;
440- consensus.height_last_ZC_AccumCheckpoint = 301 ; // no checkpoints on regtest
428+ consensus.height_last_ZC_AccumCheckpoint = 310 ; // no checkpoints on regtest
441429 consensus.height_last_ZC_WrappedSerials = -1 ;
442430 consensus.height_start_BIP65 = 851019 ; // Not defined for regtest. Inherit TestNet value.
443431 consensus.height_start_InvalidUTXOsCheck = 999999999 ;
@@ -453,7 +441,19 @@ class CRegTestParams : public CTestNetParams
453441 consensus.height_ZC_RecalcAccumulators = 999999999 ;
454442
455443 // Zerocoin-related params
456- consensus.ZC_WrappedSerialsSupply = 0 ; // WrappedSerials only on main net
444+ consensus.ZC_Modulus = " 25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784"
445+ " 4069182906412495150821892985591491761845028084891200728449926873928072877767359714183472702618963750149718246911"
446+ " 6507761337985909570009733045974880842840179742910064245869181719511874612151517265463228221686998754918242243363"
447+ " 7259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133"
448+ " 8441436038339044149526344321901146575444541784240209246165157233507787077498171257724679629263863563732899121548"
449+ " 31438167899885040445364023527381951378636564391212010397122822120720357" ;
450+ consensus.ZC_MaxPublicSpendsPerTx = 637 ; // Assume about 220 bytes each input
451+ consensus.ZC_MaxSpendsPerTx = 7 ; // Assume about 20kb each input
452+ consensus.ZC_MinMintConfirmations = 10 ;
453+ consensus.ZC_MinMintFee = 1 * CENT;
454+ consensus.ZC_MinStakeDepth = 10 ;
455+ consensus.ZC_TimeStart = 0 ; // not implemented on regtest
456+ consensus.ZC_WrappedSerialsSupply = 0 ;
457457
458458
459459 /* *
@@ -473,10 +473,6 @@ class CRegTestParams : public CTestNetParams
473473 nToCheckBlockUpgradeMajority = 1000 ;
474474 nMinerThreads = 1 ;
475475 nMasternodeCountDrift = 4 ;
476- nZerocoinStartTime = 1501776000 ;
477-
478- nMintRequiredConfirmations = 10 ;
479- nZerocoinRequiredStakeDepth = nMintRequiredConfirmations;
480476
481477 vFixedSeeds.clear (); // ! Testnet mode doesn't have any fixed seeds.
482478 vSeeds.clear (); // ! Testnet mode doesn't have any DNS seeds.
0 commit comments