Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9,411 changes: 211 additions & 9,200 deletions Makefile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cloakcoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ QT += core gui network
QT += widgets
TEMPLATE = app
TARGET = cloakcoin-qt
VERSION = 2.2.2.2
VERSION = 2.3.0.0
INCLUDEPATH += src src/json src/qt src/tor
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES
#DEFINES += CURL_STATICLIB
Expand Down
6 changes: 3 additions & 3 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_MINOR 3
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0

// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
Expand Down
2 changes: 1 addition & 1 deletion src/enigma/enigma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ bool Enigma::HandleCloakOnionData(CCloakingData cloakDataIn, CNode* node, int le

if (!alreadyProcessed)
{
Sleep(100);
Sleep(250);
cloakDataIn.hops++;

if (level > 0){
Expand Down
Empty file modified src/leveldb/build_detect_platform
100755 → 100644
Empty file.
40 changes: 27 additions & 13 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2151,6 +2151,7 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckNewOnl

bool CBlock::AcceptBlock()
{
static unsigned int nStakeSplitAge = (60 * 60 * 24 * 30);
// Check for duplicate
uint256 hash = GetHash();
if (mapBlockIndex.count(hash))
Expand Down Expand Up @@ -2213,18 +2214,35 @@ bool CBlock::AcceptBlock()
if (!std::equal(expect.begin(), expect.end(), vtx[0].vin[0].scriptSig.begin()))
return DoS(100, error("AcceptBlock() : block height mismatch in coinbase"));

// Enforce rule that staking must be either split or merge
if (nVersion > 4)
// Enforce proper staking: split, merge or noop (noop only for UTXOs older than nStakeSplitAge)
if (nVersion > 5)
{
// if 15,120 of the last 20,160 blocks (75%) are version 5 or greater (51/100 if testnet):
if ((!fTestNet && CBlockIndex::IsSuperMajority(5, pindexPrev, 15120, 20160)) ||
(fTestNet && CBlockIndex::IsSuperMajority(5, pindexPrev, 51, 100))) {
printf(">>>>>>>>> ISM75 activation of version 5 achieved <<<<<<<<<\n");
CTxDB txdb("r");
CTransaction txPrev;
CTxIndex txindex;

// cloak: coinstake should be a proper split or merge stake
//--- DEBUGGING helper section
if (vtx[1].vin.size() == 1 && vtx[1].vout.size() == 2) { // it's an old UTXO, noop stake (single input, empty + 1 output)
// get previous tx by following prevout of the stake input, vtx[0] is coinbase
if (!txPrev.ReadFromDisk(txdb, vtx[1].vin[0].prevout, txindex))
return error("AcceptBlock() : ReadFromDisk failed to read previous transaction!");
printf("##### noop stake ::: previousTx nTime=%u, nStakeSplitAge=%u, staking tx current nTime=%u \n", txPrev.nTime, nStakeSplitAge, vtx[1].nTime);
if (txPrev.nTime + nStakeSplitAge <= vtx[1].nTime)
printf(">>>>>>>>> stake-fix: valid old UTXO noop stake found <<<<<<<<<\n");
}
//--- END DEBUGGING helper section

// if 5,400 of the last 7,200 blocks (75%) are version 6 or greater (51/100 if testnet):
if ((!fTestNet && CBlockIndex::IsSuperMajority(6, pindexPrev, 5400, 7200)) ||
(fTestNet && CBlockIndex::IsSuperMajority(6, pindexPrev, 51, 100))) {
printf(">>>>>>>>> stake-fix: ISM75 activation of version 6 achieved <<<<<<<<<\n");

// cloak: coinstake should be a proper stake
if (!((vtx[1].vin.size() == 1 && vtx[1].vout.size() == 3) || // it's a split stake (one input, empty + 2 split outputs) OR
(vtx[1].vin.size() > 1 && vtx[1].vout.size() == 2))) // it's a merge stake (multiple inputs, empty + 1 merge output)
return DoS(100, error("AcceptBlock() : rejected, coistake should be a split or a merge"));
(vtx[1].vin.size() > 1 && vtx[1].vout.size() == 2) || // it's a merge stake (multiple inputs, empty + 1 merge output)
(vtx[1].vin.size() == 1 && vtx[1].vout.size() == 2 && (txPrev.nTime + nStakeSplitAge <= vtx[1].nTime))
)) // it's an old UTXO, noop stake (single input, empty + 1 output)
return DoS(100, error("AcceptBlock() : rejected, improper coinstake inputs or outputs"));
}
}

Expand All @@ -2236,10 +2254,6 @@ bool CBlock::AcceptBlock()
{
return error("AcceptBlock() : rejected nVersion=4 block");
}

if (!((vtx[1].vin.size() == 1 && vtx[1].vout.size() == 3) || // it's a split stake (one input, empty + 2 split outputs) OR
(vtx[1].vin.size() > 1 && vtx[1].vout.size() == 2))) // it's a merge stake (multiple inputs, empty + 1 merge output)
printf(">>>>>>> Engineered block received :( \n");
}

// Write block to history file
Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ class CBlock
{
public:
// header
static const int CURRENT_VERSION=5;
static const int CURRENT_VERSION=6;
int nVersion;
uint256 hashPrevBlock;
uint256 hashMerkleRoot;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent):
rpcConsole(0)
{
resize(850, 550);
setWindowTitle(tr("CLOAK Core v2.2.2.2 2x4"));
setWindowTitle(tr("CLOAK Core v2.3.0.0"));
#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/bitcoin"));
setWindowIcon(QIcon(":icons/bitcoin"));
Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
const std::string CLIENT_NAME("KlausFuchs");

// Client version number
#define CLIENT_VERSION_SUFFIX " 'rEVOLUTION' 2x4"
#define CLIENT_VERSION_SUFFIX " 'rEVOLUTION'"

// The following part of the code determines the CLIENT_BUILD variable.
// Several mechanisms are used for this:
Expand Down
6 changes: 3 additions & 3 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ static const int BIP0031_VERSION = 60000;
static const int MEMPOOL_GD_VERSION = 60002;

#define DISPLAY_VERSION_MAJOR 2
#define DISPLAY_VERSION_MINOR 2
#define DISPLAY_VERSION_REVISION 2
#define DISPLAY_VERSION_BUILD 2
#define DISPLAY_VERSION_MINOR 3
#define DISPLAY_VERSION_REVISION 0
#define DISPLAY_VERSION_BUILD 0

#endif