Merge branch 'v0.11.2.x' of https://github.com/darkcoinproject/darkcoin into v11.2-dash
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 11)
|
||||
define(_CLIENT_VERSION_REVISION, 2)
|
||||
define(_CLIENT_VERSION_BUILD, 4)
|
||||
define(_CLIENT_VERSION_BUILD, 6)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2015)
|
||||
AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashcurrency.com],[darkcoin])
|
||||
|
@ -97,17 +97,19 @@ Make note of the hash (which is your collaterla_output) and index.
|
||||
### Enter your MasterNode details into your masternode.conf file
|
||||
[From the darkcoin github repo](https://github.com/darkcoin/darkcoin/blob/master/doc/masternode_conf.md)
|
||||
|
||||
The new masternode.conf format consists of a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index.
|
||||
The new masternode.conf format consists of a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index, donation address and donation percentage (the latter two are optional and should be in format "address:percantage").
|
||||
|
||||
```
|
||||
alias ipaddress:port masternode_private_key collateral_output collateral_output_index
|
||||
alias ipaddress:port masternode_private_key collateral_output collateral_output_index donationin_address:donation_percentage
|
||||
```
|
||||
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
mn01 127.0.0.1:9999 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0
|
||||
mn02 127.0.0.2:9999 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0
|
||||
mn02 127.0.0.2:9999 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh:25
|
||||
```
|
||||
|
||||
## What about the darkcoin.conf file?
|
||||
|
@ -6,18 +6,20 @@ The multi masternode config allows to control multiple masternodes from a single
|
||||
* Mac OS: ~/Library/Application Support/Dash/
|
||||
* Unix/Linux: ~/.darkcoin/
|
||||
|
||||
The new masternode.conf format consists of a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index.
|
||||
The new masternode.conf format consists of a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id, collateral output index, donation address and donation percentage (the latter two are optional and should be in format "address:percantage").
|
||||
|
||||
Example:
|
||||
```
|
||||
mn1 127.0.0.2:19999 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0
|
||||
mn2 127.0.0.3:19999 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0
|
||||
mn3 127.0.0.4:19999 92Da1aYg6sbenP6uwskJgEY2XWB5LwJ7bXRqc3UPeShtHWJDjDv db478e78e3aefaa8c12d12ddd0aeace48c3b451a8b41c570d0ee375e2a02dfd9 1
|
||||
mn2 127.0.0.3:19999 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh:33
|
||||
mn3 127.0.0.4:19999 92Da1aYg6sbenP6uwskJgEY2XWB5LwJ7bXRqc3UPeShtHWJDjDv db478e78e3aefaa8c12d12ddd0aeace48c3b451a8b41c570d0ee375e2a02dfd9 1 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh
|
||||
```
|
||||
|
||||
In the example above, the collateral for mn1 consists of transaction:
|
||||
http://test.explorer.darkcoin.fr/tx/2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c
|
||||
output index 0 has amount 1000
|
||||
In the example above:
|
||||
* the collateral for mn1 consists of transaction http://test.explorer.darkcoin.fr/tx/2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c, output index 0 has amount 1000
|
||||
* masternode 2 will donate 33% of its income
|
||||
* masternode 3 will donate 100% of its income
|
||||
|
||||
|
||||
The following new RPC commands are supported:
|
||||
* list-conf: shows the parsed masternode.conf
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 11
|
||||
#define CLIENT_VERSION_REVISION 2
|
||||
#define CLIENT_VERSION_BUILD 4
|
||||
#define CLIENT_VERSION_BUILD 6
|
||||
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ static const int64_t DARKSEND_POOL_MAX = (999.99*COIN);
|
||||
#define MASTERNODE_EXPIRATION_SECONDS (65*60)
|
||||
#define MASTERNODE_REMOVAL_SECONDS (70*60)
|
||||
|
||||
static const int MIN_POOL_PEER_PROTO_VERSION = 70070; // minimum peer version accepted by DarkSendPool
|
||||
static const int MIN_POOL_PEER_PROTO_VERSION = 70072; // minimum peer version accepted by DarkSendPool
|
||||
|
||||
class CTransaction;
|
||||
|
||||
|
@ -285,7 +285,6 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
|
||||
}
|
||||
|
||||
// relay to all peers that an entry was added to the pool successfully.
|
||||
RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_ACCEPTED);
|
||||
Check();
|
||||
|
||||
} else if (strCommand == "dsi") { //Darksend vIn
|
||||
@ -642,13 +641,8 @@ void CDarksendPool::SetNull(bool clearEverything){
|
||||
|
||||
if(clearEverything){
|
||||
myEntries.clear();
|
||||
|
||||
if(fMasterNode){
|
||||
sessionID = 1 + (rand() % 999999);
|
||||
} else {
|
||||
sessionID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// -- seed random number generator (used for ordering output lists)
|
||||
unsigned int seed = 0;
|
||||
@ -765,7 +759,7 @@ void CDarksendPool::CheckFinalTransaction()
|
||||
// See if the transaction is valid
|
||||
if (!txNew.AcceptToMemoryPool(false))
|
||||
{
|
||||
if(nCountAttempts > 10) {
|
||||
if(nCountAttempts > 60) {
|
||||
LogPrintf("CDarksendPool::Check() - CommitTransaction : Error: Transaction not valid\n");
|
||||
SetNull();
|
||||
pwalletMain->Lock();
|
||||
@ -773,9 +767,8 @@ void CDarksendPool::CheckFinalTransaction()
|
||||
|
||||
// not much we can do in this case]
|
||||
UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
|
||||
if(nCountAttempts > 5) RelayCompletedTransaction(sessionID, true, "Transaction not valid, please try again");
|
||||
|
||||
if(!fSubmitAnonymousFailed && nCountAttempts > 5)
|
||||
if(!fSubmitAnonymousFailed && nCountAttempts > 30)
|
||||
fSubmitAnonymousFailed = true;
|
||||
return;
|
||||
}
|
||||
@ -1418,7 +1411,7 @@ bool CDarksendPool::StatusUpdate(int newState, int newEntriesCount, int newAccep
|
||||
lastMessage = error;
|
||||
}
|
||||
|
||||
if(newAccepted == 1) {
|
||||
if(newAccepted == 1 && newSessionID != 0) {
|
||||
sessionID = newSessionID;
|
||||
LogPrintf("CDarksendPool::StatusUpdate - set sessionID to %d\n", sessionID);
|
||||
sessionFoundMasternode = true;
|
||||
@ -1476,8 +1469,8 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
|
||||
|
||||
if(mine >= 0){ //might have to do this one input at a time?
|
||||
//already signed
|
||||
if(finalTransaction.vin[mine].scriptSig != CScript()) continue;
|
||||
if(sigs.size() > 7) break; //send 7 each signing
|
||||
CScript scriptOld = finalTransaction.vin[mine].scriptSig;
|
||||
if(!fSubmitAnonymousFailed && sigs.size() > 7) break; //send 7 each signing
|
||||
|
||||
int foundOutputs = 0;
|
||||
int64_t nValue1 = 0;
|
||||
@ -1510,6 +1503,8 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
|
||||
// not sure what to do here, it will timeout...?
|
||||
}
|
||||
|
||||
if(scriptOld != CScript() && finalTransaction.vin[mine].scriptSig == scriptOld) continue;
|
||||
|
||||
sigs.push_back(finalTransaction.vin[mine]);
|
||||
if(fDebug) LogPrintf(" -- dss %d %d %s\n", mine, (int)sigs.size(), finalTransaction.vin[mine].scriptSig.ToString().c_str());
|
||||
}
|
||||
@ -2127,6 +2122,7 @@ bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txColla
|
||||
if(sessionUsers < 0) sessionUsers = 0;
|
||||
|
||||
if(sessionUsers == 0) {
|
||||
sessionID = 1 + (rand() % 999999);
|
||||
sessionDenom = nDenom;
|
||||
sessionUsers++;
|
||||
lastTimeChanged = GetTimeMillis();
|
||||
@ -2554,6 +2550,7 @@ bool CDSAnonTx::AddOutput(const CTxOut out){
|
||||
|
||||
vout.push_back(out);
|
||||
std::random_shuffle ( vout.begin(), vout.end(), randomizeList);
|
||||
ClearSigs();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -2570,6 +2567,16 @@ bool CDSAnonTx::AddInput(const CTxIn in){
|
||||
|
||||
vin.push_back(in);
|
||||
std::random_shuffle ( vin.begin(), vin.end(), randomizeList);
|
||||
ClearSigs();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CDSAnonTx::ClearSigs(){
|
||||
LOCK(cs_darksend);
|
||||
|
||||
BOOST_FOREACH(CTxDSIn& in, vin)
|
||||
in.scriptSig = CScript();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -38,9 +38,9 @@ class CActiveMasternode;
|
||||
#define MASTERNODE_REJECTED 0
|
||||
#define MASTERNODE_RESET -1
|
||||
|
||||
#define DARKSEND_QUEUE_TIMEOUT 120 // in seconds
|
||||
#define DARKSEND_QUEUE_TIMEOUT 180 // in seconds
|
||||
#define DARKSEND_SIGNING_TIMEOUT 30 // in seconds
|
||||
#define DARKSEND_DOWNGRADE_TIMEOUT 30 // in seconds
|
||||
#define DARKSEND_DOWNGRADE_TIMEOUT 60 // in seconds
|
||||
|
||||
// used for anonymous relaying of inputs/outputs/sigs
|
||||
#define DARKSEND_RELAY_IN 1
|
||||
@ -271,6 +271,8 @@ public:
|
||||
bool AddOutput(const CTxOut out);
|
||||
/// Add an input
|
||||
bool AddInput(const CTxIn in);
|
||||
/// Clear Signatures
|
||||
bool ClearSigs();
|
||||
/// Add Signature
|
||||
bool AddSig(const CTxIn in);
|
||||
/// Count the number of entries in the transaction
|
||||
|
@ -25,7 +25,7 @@ class CMasternodeScanningError;
|
||||
extern map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
|
||||
extern CMasternodeScanning mnscan;
|
||||
|
||||
static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70066;
|
||||
static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70072;
|
||||
|
||||
/*
|
||||
1% of the network is scanned every 2.5 minutes, making a full
|
||||
|
@ -143,6 +143,7 @@ CMasternode::CMasternode()
|
||||
nLastDsq = 0;
|
||||
donationAddress = CScript();
|
||||
donationPercentage = 0;
|
||||
nScanningErrorCount = 0;
|
||||
}
|
||||
|
||||
CMasternode::CMasternode(const CMasternode& other)
|
||||
@ -165,6 +166,7 @@ CMasternode::CMasternode(const CMasternode& other)
|
||||
nLastDsq = other.nLastDsq;
|
||||
donationAddress = other.donationAddress;
|
||||
donationPercentage = other.donationPercentage;
|
||||
nScanningErrorCount = other.nScanningErrorCount;
|
||||
}
|
||||
|
||||
CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
|
||||
@ -185,6 +187,7 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
|
||||
allowFreeTx = true;
|
||||
protocolVersion = protocolVersionIn;
|
||||
nLastDsq = 0;
|
||||
nScanningErrorCount = 0;
|
||||
donationAddress = newDonationAddress;
|
||||
donationPercentage = newDonationPercentage;
|
||||
}
|
||||
@ -404,8 +407,8 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
|
||||
|
||||
// pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
|
||||
CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments);
|
||||
|
||||
if(pmn != NULL)
|
||||
if(pmn != NULL &&
|
||||
(RegTest() || (!RegTest() && pmn->GetMasternodeInputAge() > nMinimumAge && pmn->lastTimeSeen - pmn->sigTime > nMinimumAge * 2.5 * 60)))
|
||||
{
|
||||
newWinner.score = 0;
|
||||
newWinner.nBlockHeight = nBlockHeight;
|
||||
|
@ -800,9 +800,9 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
||||
{
|
||||
if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
|
||||
if(vin == CTxIn()){
|
||||
pfrom->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.sigTime, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion);
|
||||
pfrom->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.sigTime, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion, mn.donationAddress, mn.donationPercentage);
|
||||
} else if (vin == mn.vin) {
|
||||
pfrom->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.sigTime, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion);
|
||||
pfrom->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.sigTime, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion, mn.donationAddress, mn.donationPercentage);
|
||||
LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
@ -776,7 +776,7 @@ QString loadStyleSheet()
|
||||
}
|
||||
else {
|
||||
cssName = QString(":/css/drkblue");
|
||||
settings.setValue("theme", ":/css/drkblue");
|
||||
settings.setValue("theme", "drkblue");
|
||||
}
|
||||
|
||||
QFile qFile(cssName);
|
||||
|
@ -605,7 +605,6 @@ QDialog#AboutDialog QLabel#label_2 { /* Margin for About Dash text */
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
|
||||
/* OVERVIEW SCREEN */
|
||||
|
||||
QWidget .QFrame#frame { /* Wallet Balance */
|
||||
@ -686,10 +685,14 @@ margin-left:16px;
|
||||
|
||||
QWidget .QFrame#frameDarksend { /* Darksend Widget */
|
||||
background-color:transparent;
|
||||
qproperty-minimumSize: 451px 318px;
|
||||
}
|
||||
|
||||
QWidget .QFrame#frameDarksend QWidget {
|
||||
qproperty-geometry: rect(10 0 431 22);
|
||||
}
|
||||
|
||||
QWidget .QFrame#frameDarksend .QLabel#label_2 { /* Darksend Header */
|
||||
qproperty-geometry: rect(10 9 431 135);
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
min-width:230px;
|
||||
color:#3398cc;
|
||||
@ -702,7 +705,7 @@ min-height:22px;
|
||||
|
||||
|
||||
QWidget .QFrame#frameDarksend #formLayoutWidget {
|
||||
qproperty-geometry: rect(10 55 451 175);
|
||||
qproperty-geometry: rect(10 38 451 175);
|
||||
}
|
||||
|
||||
QWidget .QFrame#frameDarksend #formLayoutWidget > .QLabel {
|
||||
@ -784,7 +787,7 @@ QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#labelSubmittedDenom { /*
|
||||
|
||||
QWidget .QFrame#frameDarksend .QLabel#darksendStatus { /* Darksend Status Notifications */
|
||||
qproperty-alignment: 'AlignVCenter | AlignCenter';
|
||||
qproperty-geometry: rect(70 233 395 45);
|
||||
qproperty-geometry: rect(70 213 395 34);
|
||||
font-size:11px;
|
||||
color:#818181;
|
||||
}
|
||||
@ -792,6 +795,9 @@ color:#818181;
|
||||
|
||||
/* DARKSEND BUTTONS */
|
||||
|
||||
|
||||
|
||||
|
||||
QWidget .QFrame#frameDarksend .QPushButton { /* Darksend Buttons - General Attributes */
|
||||
border:0px solid #ffffff;
|
||||
}
|
||||
@ -802,11 +808,11 @@ outline:none;
|
||||
}
|
||||
|
||||
QWidget .QFrame#frameDarksend .QPushButton#runAutoDenom { /* No idea why this button is in the .UI file... */
|
||||
qproperty-geometry: rect(391 -25 1 1);
|
||||
qproperty-geometry: rect(0 0 0 0);
|
||||
}
|
||||
|
||||
QWidget .QFrame#frameDarksend .QPushButton#toggleDarksend { /* Start Darksend Mixing */
|
||||
qproperty-geometry: rect(120 282 295 35);
|
||||
qproperty-geometry: rect(120 255 295 35);
|
||||
border:1px solid #ffffff;
|
||||
font-size:16px;
|
||||
font-weight:bold;
|
||||
@ -818,7 +824,7 @@ padding-bottom:6px;
|
||||
}
|
||||
|
||||
QWidget .QFrame#frameDarksend .QPushButton#darksendAuto { /* Try Mix Button */
|
||||
qproperty-geometry: rect(150 328 118 20);
|
||||
qproperty-geometry: rect(150 301 118 20);
|
||||
background-color:#F8F6F6;
|
||||
border:0px;
|
||||
border-right:1px solid #c1c1c1;
|
||||
@ -834,7 +840,7 @@ background-color:#f2f0f0;
|
||||
|
||||
|
||||
QWidget .QFrame#frameDarksend .QPushButton#darksendReset { /* Reset Button */
|
||||
qproperty-geometry: rect(268 328 117 20);
|
||||
qproperty-geometry: rect(268 301 117 20);
|
||||
background-color:#F8F6F6;
|
||||
border:0px;
|
||||
border-radius: 0px;
|
||||
|
BIN
src/qt/res/icons/tx_inout.png
Normal file → Executable file
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
src/qt/res/icons/tx_input.png
Normal file → Executable file
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
src/qt/res/icons/tx_mined.png
Normal file → Executable file
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
src/qt/res/icons/tx_output.png
Normal file → Executable file
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 508 B |
@ -27,7 +27,7 @@ extern const std::string CLIENT_DATE;
|
||||
// network protocol versioning
|
||||
//
|
||||
|
||||
static const int PROTOCOL_VERSION = 70070;
|
||||
static const int PROTOCOL_VERSION = 70072;
|
||||
|
||||
// intial proto version, to be increased after version/verack negotiation
|
||||
static const int INIT_PROTO_VERSION = 209;
|
||||
|