Skip to content

Commit

Permalink
Max Supply / Seesaw (#1)
Browse files Browse the repository at this point in the history
Max supply was set to have 5 coins after max supply was reached so changed it to 0 to not ever go over 100m coins.
Seesaw collateral amount was set to 5k coins, changed it to proper 15k collateral.

* Corrected Readme File

* Background

* Version Bump
  • Loading branch information
MotoAcidic authored Sep 30, 2018
1 parent 47cae2f commit f7d33ad
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 41 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,21 @@ config.status
.vs/smrtc/v15/ipch/AutoPCH/5296bec56a7191ec/MASTERNODEMAN.ipch
.vs/smrtc/v15/ipch/AutoPCH/6883191c1916ca26/AMOUNT.ipch
.vs/smrtc/v15/ipch/AutoPCH/8d46eca7c6902300/INIT.ipch
.vs/CCBC/v15/.suo
.vs/CCBC/v15/Browse.VC.db
.vs/CCBC/v15/Browse.VC.opendb
.vs/CCBC/v15/ipch/AutoPCH/9a0c471bdb4f68f4/BITCOINGUI.ipch
.vs/CCBC/v15/ipch/AutoPCH/1d92aff8c171a719/PARAMGENERATION.ipch
.vs/CCBC/v15/ipch/AutoPCH/41c8d4b10f5772ab/PARAMGEN.ipch
.vs/slnx.sqlite-journal
.vs/CCBC/v15/ipch/AutoPCH/7a053cc9182e9c0c/GUIUTIL.ipch
.vs/CCBC/v15/ipch/AutoPCH/7b7311dfb0c553fa/TRANSACTIONRECORD.ipch
.vs/CCBC/v15/ipch/AutoPCH/d6fbcfae9fa9feb4/PAYMENTSERVER.ipch
.vs/CCBC/v15/ipch/AutoPCH/aee126f7c87e321c/MASTERNODEMAN.ipch
.vs/CCBC/v15/ipch/AutoPCH/40dadb20cea31fa0/BITCOINCONSENSUS.ipch
.vs/CCBC/v15/ipch/AutoPCH/713ff23d09b32455/RPCDUMP.ipch
.vs/CCBC/v15/ipch/AutoPCH/78d5b3ed1536249e/BITCOINGUI.ipch
.vs/CCBC/v15/ipch/AutoPCH/cf13db34be1232da/INIT.ipch
.vs/CCBC/v15/ipch/AutoPCH/fb4db16ec65083b9/OVERVIEWPAGE.ipch
.vs/config/applicationhost.config
.vs/CCBC/v15/ipch/AutoPCH/3e4badd4568fd837/NET.ipch
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<tr><td>Difficulty Retargeting</td><td>Every Block</td></tr>
<tr><td>Max Coin Supply </td><td>100,000,000 CCBC</td></tr>
<tr><td>Premine</td><td>8,000,000 CCBC</td></tr>
<tr><td>MN Port</td><td>5520</td></tr>
<tr><td>RPC Port</td><td>15520</td></tr>
</table>


Expand All @@ -19,9 +21,9 @@
<table>
<th colspan=4>PoW Phase</th>
<tr><th>Block Height</th><th>Reward Amount</th><th>Notes</th><th>Duration (Days)</th></tr>
<tr><td>0</td><td>250 CCBC</td><td>Genesis Block</td><td>0 Days</td></tr>
<tr><td>0</td><td>50 CCBC</td><td>Genesis Block</td><td>0 Days</td></tr>
<tr><td>1</td><td>8,000,000 CCBC</td><td>Initial Premine</td><td>0 Days</td></tr>
<tr><td>2-200</td><td>1 CCBC</td><td rowspan=1>Closed Mining</td><td>1 Days</td></tr>
<tr><td>2-200</td><td>0 CCBC</td><td rowspan=1>Closed Mining</td><td>1 Days</td></tr>
<tr><th colspan=4>PoS / MN Phase</th></tr>
<tr><td>200-25000</td><td>1 CCBC</td><td rowspan=1>Coin Swap</td><td>17.22 Days</td></tr>
<tr><td>25000-50000</td><td>25 CCBC</td><td rowspan=1>First Increase </td><td>17.36 Days</td></tr>
Expand All @@ -39,23 +41,23 @@

<table>
<tr><th>Block Height</th><th>MN Reward Amount</th><th>PoS Reward Amount</th><th>Duration (Days)</th><th>Development Fee</th></tr>
<tr><td>201-25000</td><td>80%</td><td>20%</td><td>17.2 Days</td><td>0%</td></tr>
<tr><td>25000-60000 </td><td>40%</td><td>60%</td><td>17.22 Days</td><td>0%</td></tr>
<tr><td>60000-65000 </td><td>42%</td><td>58%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>65000-70000 </td><td>44%</td><td>56%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>70000-75000 </td><td>46%</td><td>54%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>75000-80000 </td><td>48%</td><td>52%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>80000-85000 </td><td>50%</td><td>50%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>85000-88000 </td><td>53%</td><td>47%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>88000-91000 </td><td>56%</td><td>44%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>91000-94000 </td><td>59%</td><td>41%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>94000-97000 </td><td>62%</td><td>38%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>97000-100000 </td><td>65%</td><td>35%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>100000-125000 </td><td>70%</td><td>30%</td><td>17.36 Days</td><td>10%</td></tr>
<tr><td>125000-150000 </td><td>75%</td><td>25%</td><td>17.36 Days</td><td>10%</td></tr>
<tr><td>150000-175000 </td><td>80%</td><td>20%</td><td>17.36 Days</td><td>10%</td></tr>
<tr><td>201-25000</td><td>60%</td><td>40%</td><td>17.2 Days</td><td>0%</td></tr>
<tr><td>25000-60000 </td><td>60%</td><td>40%</td><td>17.22 Days</td><td>0%</td></tr>
<tr><td>60000-65000 </td><td>65%</td><td>35%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>65000-70000 </td><td>66%</td><td>34%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>70000-75000 </td><td>67%</td><td>33%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>75000-80000 </td><td>68%</td><td>32%</td><td>3.47 Days</td><td>10%</td></tr>
<tr><td>80000-85000 </td><td>69%</td><td>31%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>85000-88000 </td><td>70%</td><td>30%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>88000-91000 </td><td>72%</td><td>28%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>91000-94000 </td><td>74%</td><td>26%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>94000-97000 </td><td>76%</td><td>24%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>97000-100000 </td><td>78%</td><td>22%</td><td>2.08 Days</td><td>10%</td></tr>
<tr><td>100000-125000 </td><td>80%</td><td>20%</td><td>17.36 Days</td><td>10%</td></tr>
<tr><td>125000-150000 </td><td>85%</td><td>15%</td><td>17.36 Days</td><td>10%</td></tr>
<tr><td>150000-175000 </td><td>90%</td><td>10%</td><td>17.36 Days</td><td>10%</td></tr>
<tr><td>SeeSaw Rewards from this point on</td></tr>
</table>

MN Port: 5520
RPC Port: 15520
RPC Port: 15520
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2017)
AC_INIT([Ccbc Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.ccbc.org],[ccbc])
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([Ccbc Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.ccbcoin.club],[ccbc])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/ccbc-config.h])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down
6 changes: 3 additions & 3 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 1
#define CLIENT_VERSION_BUILD 2

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand All @@ -27,7 +27,7 @@
* Copyright year (2009-this)
* Todo: update this when changing our copyright comments in the source
*/
#define COPYRIGHT_YEAR 2017
#define COPYRIGHT_YEAR 2018

#endif //HAVE_CONFIG_H

Expand All @@ -39,7 +39,7 @@
#define DO_STRINGIZE(X) #X

//! Copyright string used in Windows .rc files
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers, 2015-" STRINGIZE(COPYRIGHT_YEAR) " The CCBC Core Developers, 2017-" STRINGIZE(COPYRIGHT_YEAR) " The Ccbc Core Developers"
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers, 2015-" STRINGIZE(COPYRIGHT_YEAR) " The PIVX Core Developers, 2017-" STRINGIZE(COPYRIGHT_YEAR) " The CCBC Core Developers, 2018"

/**
* ccbcd-res.rc includes this file, but it cannot cope with real c++ code.
Expand Down
10 changes: 7 additions & 3 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,16 +1182,19 @@ bool AppInit2(boost::thread_group& threadGroup)
SetProxy(NET_IPV6, addrProxy);
SetProxy(NET_TOR, addrProxy);
SetNameProxy(addrProxy);
SetReachable(NET_TOR); // by default, -proxy sets onion as reachable, unless -noonion later
//SetReachable(NET_TOR); // by default, -proxy sets onion as reachable, unless -noonion later
SetLimited(NET_TOR, false);
}

// -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses
// -noonion (or -onion=0) disables connecting to .onion entirely
// An empty string is used to not override the onion proxy (in which case it defaults to -proxy set above, or none)
// Credit to blademaster for this
std::string onionArg = GetArg("-onion", "");
if (onionArg != "") {
if (onionArg == "0") { // Handle -noonion/-onion=0
SetReachable(NET_TOR, false); // set onions as unreachable
//SetReachable(NET_TOR, false); // set onions as unreachable
SetLimited(NET_TOR);
} else {
CService onionProxy;
if (!Lookup(onionArg.c_str(), onionProxy, 9050, fNameLookup)) {
Expand All @@ -1201,7 +1204,8 @@ bool AppInit2(boost::thread_group& threadGroup)
if (!addrOnion.IsValid())
return InitError(strprintf(_("Invalid -onion address or hostname: '%s'"), onionArg));
SetProxy(NET_TOR, addrOnion);
SetReachable(NET_TOR);
//SetReachable(NET_TOR);
SetLimited(NET_TOR, false);
}
}

Expand Down
15 changes: 8 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ int64_t GetBlockValue(int nHeight)
nSubsidy = Params().MaxMoneyOut() - nMoneySupply;

if (nMoneySupply >= Params().MaxMoneyOut())
nSubsidy = 5; //Needs to be 0 at the end
nSubsidy = 0; //Needs to be 0 at the end
}
return nSubsidy;
}
Expand All @@ -2180,7 +2180,7 @@ CAmount GetSeeSaw(const CAmount& blockValue, int nMasternodeCount, int nHeight)
}

int64_t nMoneySupply = chainActive.Tip()->nMoneySupply;
int64_t mNodeCoins = nMasternodeCount * 5000 * COIN; //5k coins required
int64_t mNodeCoins = nMasternodeCount * 25000 * COIN; //25k coins required

// Use this log to compare the masternode count for different clients
//LogPrintf("Adjusting seesaw at height %d with %d masternodes (without drift: %d) at %ld\n", nHeight, nMasternodeCount, nMasternodeCount - Params().MasternodeCountDrift(), GetTime());
Expand Down Expand Up @@ -6578,15 +6578,16 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// it was the one which was commented out
int ActiveProtocol()
{
// SPORK_14 was used for 70910. Leave it 'ON' so they don't see > 70910 nodes. They won't react to SPORK_15
// messages because it's not in their code

/* if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
// SPORK_14 will remove early wallet adopters of protocol 70002 where max supply didnt have cap and
// seesaw masternode amount was set to 5k instead of 25k collateral
/*
if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
return MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT;
*/

// SPORK_15 is used for 70911. Nodes < 70911 don't see it and still get their protocol version via SPORK_14 and their
// own ModifierUpgradeBlock()
// SPORK_15 will be used after SPORK_14 is used and commented out from being turned off.

if (IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
Expand Down
9 changes: 6 additions & 3 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool fListen = true;
uint64_t nLocalServices = NODE_NETWORK;
CCriticalSection cs_mapLocalHost;
map<CNetAddr, LocalServiceInfo> mapLocalHost;
static bool vfReachable[NET_MAX] = {};
//static bool vfReachable[NET_MAX] = {};
static bool vfLimited[NET_MAX] = {};
static CNode* pnodeLocalHost = NULL;
uint64_t nLocalHostNonce = 0;
Expand Down Expand Up @@ -237,13 +237,15 @@ void AdvertizeLocal(CNode* pnode)
}
}

/*
void SetReachable(enum Network net, bool fFlag)
{
LOCK(cs_mapLocalHost);
vfReachable[net] = fFlag;
if (net == NET_IPV6 && fFlag)
vfReachable[NET_IPV4] = true;
}
*/

// learn a new local address
bool AddLocal(const CService& addr, int nScore)
Expand All @@ -267,7 +269,7 @@ bool AddLocal(const CService& addr, int nScore)
info.nScore = nScore + (fAlready ? 1 : 0);
info.nPort = addr.GetPort();
}
SetReachable(addr.GetNetwork());
//SetReachable(addr.GetNetwork());
}

return true;
Expand Down Expand Up @@ -330,7 +332,8 @@ bool IsLocal(const CService& addr)
bool IsReachable(enum Network net)
{
LOCK(cs_mapLocalHost);
return vfReachable[net] && !vfLimited[net];
//return vfReachable[net] && !vfLimited[net];
return !vfLimited[net];
}

/** check whether a given address is in a network we can probably connect to */
Expand Down
2 changes: 1 addition & 1 deletion src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ bool IsLocal(const CService& addr);
bool GetLocal(CService& addr, const CNetAddr* paddrPeer = NULL);
bool IsReachable(enum Network net);
bool IsReachable(const CNetAddr& addr);
void SetReachable(enum Network net, bool fFlag = true);
//void SetReachable(enum Network net, bool fFlag = true);
CAddress GetLocalAddress(const CNetAddr* paddrPeer = NULL);


Expand Down
Binary file modified src/qt/res/icons/bitcoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/bitcoin_testnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/masternodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/masternodes_active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/overview_active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/images/walletFrame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/images/walletFrame_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/spork.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ using namespace boost;
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT 4070908800 //OFF
#define SPORK_16_ZEROCOIN_MAINTENANCE_MODE_DEFAULT 4070908800 //OFF
#define SPORK_17_TREASURY_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //ON
#define SPORK_18_REVIVE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //ON
#define SPORK_18_REVIVE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //ON

class CSporkMessage;
class CSporkManager;
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* network protocol versioning
*/

static const int PROTOCOL_VERSION = 70002;
static const int PROTOCOL_VERSION = 70003;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand All @@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70000;

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70002;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70002;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70003;

//! nTime field added to CAddress, starting with this version;
//! if possible, avoid requesting addresses nodes older than this
Expand Down

0 comments on commit f7d33ad

Please sign in to comment.