Skip to content

Commit

Permalink
Merge pull request #17 from DigitalCoin1/Version-2.6.5.4
Browse files Browse the repository at this point in the history
Version 2.6.5.4
  • Loading branch information
LightBurdenOfficial authored Oct 14, 2021
2 parents 3991e77 + 39e5b3e commit 4c233d7
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<br>
[![N|Solid](https://i.imgur.com/0BOgWZy.png)](https://sperocoin.org/)
# Sperocoin - Sustainability in technology
# Version: 2.6.5.3
# Version: 2.6.5.4
Sperocoin came with the mission to renew the world of the exhaustive consumption of electric energy.

With the PoS mining concept, we have an ecologically correct coin, since it is not necessary to use powerful mining machines to obtain rewards for solved blocks.
Expand Down
2 changes: 1 addition & 1 deletion SperoCoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TEMPLATE = app
DEFINES += fName1 fName2
fName1 = "SperoCoin-Qt"
macx:TARGET = "SperoCoin-Qt"
VERSION = 2.6.5.3
VERSION = 2.6.5.4
QMAKE_TARGET_BUNDLE_PREFIX = co.SperoCoin
contains(QT_ARCH, i386) {
fName2 = "-x86-v"
Expand Down
10 changes: 9 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,12 @@ addnode=http://dnssperocoin.ddnsking.com:55680<br>
→ [NEW] Checkpoints;<br>
→ [FIX] Mineração PoS;<br>
→ [BUMP] Alterada versão do protocolo mínimo para 700004;<br>
→ [BUMP] Nova versão 2.6.5.2;<br>
→ [BUMP] Nova versão 2.6.5.2;<br>
> 2021/10/14<br>
→ [NEW] Checkpoints;<br>
→ [REMOVE] Pagamentos para a Foundation PoS;<br>
→ [NEW] Fase especial de mineração para a Foundation PoW;<br>
→ [FORK] Preparação do código para o hardfork;<br>
→ [BUMP] Alterada versão do protocolo mínimo para 700005;<br>
→ [BUMP] Nova versão 2.6.5.4;<br>
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 6
#define CLIENT_VERSION_REVISION 5
#define CLIENT_VERSION_BUILD 3
#define CLIENT_VERSION_BUILD 4

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
Expand Down
26 changes: 21 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,17 +1054,17 @@ int64_t GetProofOfWorkReward(int64_t nFees)
devCoin = 0.015 * COIN;
}

else if(pindexBest->nHeight >= HALVING_POW_03 && pindexBest->nHeight < END_DEV_POS_PAYMENT){
else if(pindexBest->nHeight >= HALVING_POW_03 && pindexBest->nHeight < START_FOUNDATION_POW_BLOCKS){
nSubsidy = 0.025 * COIN;
devCoin = 0 * COIN;
}

else if(pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
else if(pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS){
nSubsidy = 0.025 * COIN;
devCoin = 10000 * COIN;
}

else if(pindexBest->nHeight >= 1339010 && pindexBest->nHeight < HALVING_POW_04){
else if(pindexBest->nHeight > END_FOUNDATION_POW_BLOCKS && pindexBest->nHeight < HALVING_POW_04){
nSubsidy = 0.025 * COIN;
devCoin = 0 * COIN;
}
Expand Down Expand Up @@ -1905,7 +1905,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck)
int64_t nReward = GetProofOfWorkReward(nFees);
// Check coinbase reward
/* Início Adaptação para pagamentos Foundation */
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03){
if (vtx[0].GetValueOut() > nReward){
return DoS(50, error("ConnectBlock() : PoW reward(Foundation Fee) exceeded (actual=%" PRId64 " vs calculated=%" PRId64 ")", vtx[0].GetValueOut(), nReward));
}
Expand All @@ -1918,7 +1918,23 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck)
if (vtx[0].vout[1].nValue < devCoin){
return error("ConnectBlock() : PoW coinbase does not pay enough to dev addresss");
}
} else{
} else if(pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS){
int64_t calcDevCoin = devCoin - GetProofOfWorkReward(nFees);
int64_t nReward = devCoin + calcDevCoin;

if (vtx[0].GetValueOut() > nReward){
return DoS(50, error("ConnectBlock() : PoW reward(Foundation Fee) exceeded (actual=%" PRId64 " vs calculated=%" PRId64 ")", vtx[0].GetValueOut(), nReward));
}
CBitcoinAddress address(!fTestNet ? FOUNDATION : FOUNDATION_TEST);
CScript scriptPubKey;
scriptPubKey.SetDestination(address.Get());
if (vtx[0].vout[1].scriptPubKey != scriptPubKey){
return error("ConnectBlock() : PoW coinbase does not pay to the dev address");
}
if (vtx[0].vout[1].nValue < devCoin){
return error("ConnectBlock() : PoW coinbase does not pay enough to dev addresss");
}
} else {
if (vtx[0].GetValueOut() > nReward)
return DoS(50, error("ConnectBlock() : PoW coinbase reward exceeded (actual=%" PRId64 " vs calculated=%" PRId64 ")", vtx[0].GetValueOut(), nReward));
}
Expand Down
2 changes: 2 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ static const int HALVING_POW_05 = 2151200;
static const int HALVING_POS_03 = 1150000;
static const int HALVING_POS_04 = 2151200;
static const int END_DEV_POS_PAYMENT = 1339000;
static const int START_FOUNDATION_POW_BLOCKS = 1339200;
static const int END_FOUNDATION_POW_BLOCKS = 1339210;
/* Configurações de Blocos */
static const unsigned int MAX_BLOCK_SIZE = 20000000; //20MB
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
Expand Down
13 changes: 9 additions & 4 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake, int64_t* pFees)
txNew.vin[0].prevout.SetNull();
CBitcoinAddress address(!fTestNet ? FOUNDATION : FOUNDATION_TEST);
/* Início Adaptação para pagamentos Foundation */
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
if((pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03) || (pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS)){
txNew.vout.resize(2);
}else{
txNew.vout.resize(1);
Expand All @@ -134,7 +134,7 @@ if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03
CReserveKey reservekey(pwallet);
txNew.vout[0].scriptPubKey.SetDestination(reservekey.GetReservedKey().GetID());
/* Início Adaptação para pagamentos Foundation */
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
if((pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03) || (pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS)){
txNew.vout[1].scriptPubKey.SetDestination(address.Get());
}
/* Fim Adaptação para pagamentos Foundation */
Expand All @@ -147,7 +147,7 @@ if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03

txNew.vout[0].SetEmpty();
/* Início Adaptação para pagamentos Foundation */
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
if((pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03) || (pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS)){
txNew.vout[1].SetEmpty();
}
/* Fim Adaptação para pagamentos Foundation */
Expand Down Expand Up @@ -377,10 +377,15 @@ if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03
{
/* Início Adaptação para pagamentos Foundation */
pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(nFees);
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03){
pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(nFees) - devCoin;
pblock->vtx[0].vout[1].nValue = devCoin;
}

if(pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS){
pblock->vtx[0].vout[0].nValue = devCoin - GetProofOfWorkReward(nFees);
pblock->vtx[0].vout[1].nValue = devCoin;
}
/* Fim Adaptação para pagamentos Foundation */
}

Expand Down
2 changes: 1 addition & 1 deletion src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
result.push_back(Pair("bits", HexBits(pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
/* Início Adaptação para pagamentos Foundation */
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= END_DEV_POS_PAYMENT && pindexBest->nHeight < 1339010){
if(pindexBest->nHeight >= POS_POW_HYBRID && pindexBest->nHeight < HALVING_POW_03 || pindexBest->nHeight >= START_FOUNDATION_POW_BLOCKS && pindexBest->nHeight <= END_FOUNDATION_POW_BLOCKS){
CBitcoinAddress address(!fTestNet ? FOUNDATION : FOUNDATION_TEST);
result.push_back(Pair("payee", address.ToString()));
result.push_back(Pair("payee_amount", devCoin));
Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const std::string CLIENT_NAME("SperoCoin");
// git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
#define GIT_ARCHIVE 1
#ifdef GIT_ARCHIVE
# define GIT_COMMIT_ID ": Beta 2.6.5.3"
# define GIT_COMMIT_ID ": Beta 2.6.5.4"
//# define GIT_COMMIT_DATE "$Format:%cD"
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ static const int DATABASE_VERSION = 70508;
// network protocol versioning
//

static const int PROTOCOL_VERSION = 700005;
static const int PROTOCOL_VERSION = 700006;

// Versions prior to May 2019 will not be supported and will be disconnected
static const int MIN_PROTO_VERSION = 700005;
static const int MIN_PROTO_VERSION = 700006;

// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
Expand All @@ -44,7 +44,7 @@ static const int NOBLKS_VERSION_START = 60002;
static const int NOBLKS_VERSION_END = 700003;

// BIP 0031, pong message, is enabled for all versions AFTER this one
static const int BIP0031_VERSION = 700005;
static const int BIP0031_VERSION = 700006;

// "mempool" command, enhanced "getdata" behavior starts with this version:
static const int MEMPOOL_GD_VERSION = 700004;
Expand Down

0 comments on commit 4c233d7

Please sign in to comment.