Skip to content

Commit

Permalink
Merge branch 'newmining' into v6.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Mar 12, 2019
2 parents caf1407 + 0f74e83 commit 1de6656
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,15 @@ IoP Core integration/staging tree
https://iop.global


**RELEASE NOTE v6.2.4**
**RELEASE NOTE v6.3.0**
-----------------------

The IoP Blockchain client version *6.2.4* is now available

Improvements
============
Cleared up the help message for dumpminerstats a bit
Preparations for more verbose minerstats
Optimized license cap calculation

Known Issues
============
Toolbar icons still render imperfectly
Scaling on Linux and Windows is still broken. To work around it, start the program with `QT_SCALE_FACTOR=2 iop-qt` or equivalently.
We received feedback about some possible UI improvements. Stay tuned!
The IoP Blockchain client version *6.3.0* is now available

Changes
=======
- Updated user interface with the new logo.
- Updated subsidy calculation with lower halving interval. Additional rewards compensate for lower halving interval and coins lost to fermat beta mining. Max Supply is now just below 21 million IOP, as initially planned. This version will hard fork from previous versions on block 149999. Please update as soon as possible.

**RELEASE NOTE v6.2.0**
-----------------------
Expand Down
9 changes: 9 additions & 0 deletions doc/release-notes/release-notes-6.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**RELEASE NOTE v6.3.0**
-----------------------

The IoP Blockchain client version *6.3.0* is now available

Changes
=======
- Updated user interface with the new logo.
- Updated subsidy calculation with lower halving interval. Additional rewards compensate for lower halving interval and coins lost to fermat beta mining. Max Supply is now just below 21 million IOP, as initially planned. This version will hard fork from previous versions on block 149999. Please update as soon as possible.
4 changes: 2 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class CMainParams : public CChainParams {
public:
CMainParams() {
strNetworkID = "main";
consensus.nSubsidyHalvingInterval = 210000;
consensus.nSubsidyHalvingInterval = 150000;
/* **** IOP CHANGE //
IoP Chain uses the coinbase content to store the miner signature, so we can not enforce BIP34 in its current form.
So deactivate the check for BIP34 completely
Expand Down Expand Up @@ -186,7 +186,7 @@ class CTestNetParams : public CChainParams {
public:
CTestNetParams() {
strNetworkID = "test";
consensus.nSubsidyHalvingInterval = 210000;
consensus.nSubsidyHalvingInterval = 100000;
/* **** IOP CHANGE //
IoP Chain uses the coinbase content to store the miner signature, so we can not enforce BIP34 in its current form.
So deactivate the check for BIP34 completely
Expand Down
7 changes: 6 additions & 1 deletion src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
assert(pindexLast != nullptr);
unsigned int nProofOfWorkLimit = UintToArith256(params.powLimit).GetCompact();

// Special case to reset diff for planned university mining
if (pindexLast->nHeight == params.nSubsidyHalvingInterval - 1) {
return nProofOfWorkLimit;
}

// Only change once per difficulty adjustment interval
if ((pindexLast->nHeight+1) % params.DifficultyAdjustmentInterval() != 0)
{
Expand All @@ -29,7 +34,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
{
// Return the last non-special-min-difficulty-rules-block
const CBlockIndex* pindex = pindexLast;
while (pindex->pprev && pindex->nHeight % params.DifficultyAdjustmentInterval() != 0 && pindex->nBits == nProofOfWorkLimit)
while (pindex->pprev && pindex->nHeight % params.DifficultyAdjustmentInterval() != 0 && pindex->nHeight != params.nSubsidyHalvingInterval && pindex->nBits == nProofOfWorkLimit)
pindex = pindex->pprev;
return pindex->nBits;
}
Expand Down
13 changes: 9 additions & 4 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,14 +1053,19 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
/* IoP CHANGE */
CAmount nSubsidy;
if (nHeight == 1) {
nSubsidy = 2100000 * COIN;
// } else if (nHeight < consensusParams.nPowSubsidyIncreaseHeight) {
// nSubsidy = 2 * COIN; //this code line to be removed after beta release. We are forcing 1 IoP per block during this phase. Then will be 50 coins per block.
nSubsidy = 2100000 * COIN;
} else {
nSubsidy = 50 * COIN;
}

// Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
// this makes the theor. max supply of mainnet exactly equal to BTC theor. max supply,
// compensating for lower halving interval and coins lost due to beta mining
if (nHeight == consensusParams.nSubsidyHalvingInterval - 1) {
nSubsidy += 6000000 * COIN;
nSubsidy += 37027227072051;
}

// Subsidy is cut in half every 150,000 blocks which will occur approximately every 3 years.
nSubsidy >>= halvings;
return nSubsidy;
}
Expand Down

0 comments on commit 1de6656

Please sign in to comment.