privatesend: Increase max participants to 20 (#3610)

* Add spork to change max mixing participants to 20

Signed-off-by: pasta <pasta@dashboost.org>

* Also change min participants on devnet/testnet

Signed-off-by: pasta <pasta@dashboost.org>

* adjust formatting

Signed-off-by: pasta <pasta@dashboost.org>

* add nPoolNewMinParticipants under regtest

Signed-off-by: pasta <pasta@dashboost.org>
This commit is contained in:
PastaPastaPasta 2020-07-17 10:19:29 +00:00 committed by pasta
parent f425316eed
commit 508fc2db4b
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984
5 changed files with 24 additions and 5 deletions

View File

@ -406,7 +406,9 @@ public:
nLLMQConnectionRetryTimeout = 60; nLLMQConnectionRetryTimeout = 60;
nPoolMinParticipants = 3; nPoolMinParticipants = 3;
nPoolMaxParticipants = 5; // TODO: bump on next HF / mandatory upgrade nPoolNewMinParticipants = 3;
nPoolMaxParticipants = 5;
nPoolNewMaxParticipants = 20;
nFulfilledRequestExpireTime = 60*60; // fulfilled requests expire in 1 hour nFulfilledRequestExpireTime = 60*60; // fulfilled requests expire in 1 hour
vSporkAddresses = {"Xgtyuk76vhuFW2iT7UAiHgNdWXCf3J34wh"}; vSporkAddresses = {"Xgtyuk76vhuFW2iT7UAiHgNdWXCf3J34wh"};
@ -582,8 +584,10 @@ public:
fAllowMultiplePorts = true; fAllowMultiplePorts = true;
nLLMQConnectionRetryTimeout = 60; nLLMQConnectionRetryTimeout = 60;
nPoolMinParticipants = 3; // TODO drop to 2 with next mandatory upgrade nPoolMinParticipants = 3;
nPoolNewMinParticipants = 2;
nPoolMaxParticipants = 5; nPoolMaxParticipants = 5;
nPoolNewMaxParticipants = 20;
nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes
vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"}; vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"};
@ -740,8 +744,10 @@ public:
fAllowMultiplePorts = true; fAllowMultiplePorts = true;
nLLMQConnectionRetryTimeout = 60; nLLMQConnectionRetryTimeout = 60;
nPoolMinParticipants = 3; // same, drop to 2 w/ breaking change nPoolMinParticipants = 3;
nPoolNewMinParticipants = 2;
nPoolMaxParticipants = 5; nPoolMaxParticipants = 5;
nPoolNewMaxParticipants = 20;
nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes
vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"}; vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"};
@ -853,7 +859,9 @@ public:
nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes
nPoolMinParticipants = 2; nPoolMinParticipants = 2;
nPoolNewMinParticipants = 2;
nPoolMaxParticipants = 5; nPoolMaxParticipants = 5;
nPoolNewMaxParticipants = 20;
// privKey: cP4EKFyJsHT39LDqgdcB43Y3YXjNyjb5Fuas1GQSeAtjnZWmZEQK // privKey: cP4EKFyJsHT39LDqgdcB43Y3YXjNyjb5Fuas1GQSeAtjnZWmZEQK
vSporkAddresses = {"yj949n1UH6fDhw6HtVE5VMj2iSTaSWBMcW"}; vSporkAddresses = {"yj949n1UH6fDhw6HtVE5VMj2iSTaSWBMcW"};

View File

@ -89,7 +89,9 @@ public:
void UpdateLLMQTestParams(int size, int threshold); void UpdateLLMQTestParams(int size, int threshold);
void UpdateLLMQDevnetParams(int size, int threshold); void UpdateLLMQDevnetParams(int size, int threshold);
int PoolMinParticipants() const { return nPoolMinParticipants; } int PoolMinParticipants() const { return nPoolMinParticipants; }
int PoolNewMinParticipants() const { return nPoolNewMinParticipants; }
int PoolMaxParticipants() const { return nPoolMaxParticipants; } int PoolMaxParticipants() const { return nPoolMaxParticipants; }
int PoolNewMaxParticipants() const { return nPoolNewMaxParticipants; }
int FulfilledRequestExpireTime() const { return nFulfilledRequestExpireTime; } int FulfilledRequestExpireTime() const { return nFulfilledRequestExpireTime; }
const std::vector<std::string>& SporkAddresses() const { return vSporkAddresses; } const std::vector<std::string>& SporkAddresses() const { return vSporkAddresses; }
int MinSporkKeys() const { return nMinSporkKeys; } int MinSporkKeys() const { return nMinSporkKeys; }
@ -118,7 +120,9 @@ protected:
CCheckpointData checkpointData; CCheckpointData checkpointData;
ChainTxData chainTxData; ChainTxData chainTxData;
int nPoolMinParticipants; int nPoolMinParticipants;
int nPoolNewMinParticipants;
int nPoolMaxParticipants; int nPoolMaxParticipants;
int nPoolNewMaxParticipants;
int nFulfilledRequestExpireTime; int nFulfilledRequestExpireTime;
std::vector<std::string> vSporkAddresses; std::vector<std::string> vSporkAddresses;
int nMinSporkKeys; int nMinSporkKeys;

View File

@ -11,6 +11,7 @@
#include <primitives/transaction.h> #include <primitives/transaction.h>
#include <pubkey.h> #include <pubkey.h>
#include <sync.h> #include <sync.h>
#include <spork.h>
#include <timedata.h> #include <timedata.h>
#include <tinyformat.h> #include <tinyformat.h>
@ -445,8 +446,12 @@ public:
static std::string GetMessageByID(PoolMessage nMessageID); static std::string GetMessageByID(PoolMessage nMessageID);
/// Get the minimum/maximum number of participants for the pool /// Get the minimum/maximum number of participants for the pool
static int GetMinPoolParticipants() { return Params().PoolMinParticipants(); } static int GetMinPoolParticipants() { return sporkManager.IsSporkActive(SPORK_22_PS_MORE_PARTICIPANTS) ?
static int GetMaxPoolParticipants() { return Params().PoolMaxParticipants(); } Params().PoolNewMinParticipants() :
Params().PoolMinParticipants(); }
static int GetMaxPoolParticipants() { return sporkManager.IsSporkActive(SPORK_22_PS_MORE_PARTICIPANTS) ?
Params().PoolNewMaxParticipants() :
Params().PoolMaxParticipants(); }
static CAmount GetMaxPoolAmount() { return vecStandardDenominations.empty() ? 0 : PRIVATESEND_ENTRY_MAX_SIZE * vecStandardDenominations.front(); } static CAmount GetMaxPoolAmount() { return vecStandardDenominations.empty() ? 0 : PRIVATESEND_ENTRY_MAX_SIZE * vecStandardDenominations.front(); }

View File

@ -24,6 +24,7 @@ std::vector<CSporkDef> sporkDefs = {
MAKE_SPORK_DEF(SPORK_17_QUORUM_DKG_ENABLED, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_17_QUORUM_DKG_ENABLED, 4070908800ULL), // OFF
MAKE_SPORK_DEF(SPORK_19_CHAINLOCKS_ENABLED, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_19_CHAINLOCKS_ENABLED, 4070908800ULL), // OFF
MAKE_SPORK_DEF(SPORK_21_QUORUM_ALL_CONNECTED, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_21_QUORUM_ALL_CONNECTED, 4070908800ULL), // OFF
MAKE_SPORK_DEF(SPORK_22_PS_MORE_PARTICIPANTS, 4070908800ULL), // OFF
}; };
CSporkManager sporkManager; CSporkManager sporkManager;

View File

@ -28,6 +28,7 @@ enum SporkId : int32_t {
SPORK_17_QUORUM_DKG_ENABLED = 10016, SPORK_17_QUORUM_DKG_ENABLED = 10016,
SPORK_19_CHAINLOCKS_ENABLED = 10018, SPORK_19_CHAINLOCKS_ENABLED = 10018,
SPORK_21_QUORUM_ALL_CONNECTED = 10020, SPORK_21_QUORUM_ALL_CONNECTED = 10020,
SPORK_22_PS_MORE_PARTICIPANTS = 10021,
SPORK_INVALID = -1, SPORK_INVALID = -1,
}; };