@@ -18,7 +18,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 1
|
||||
|
||||
/* Minor version */
|
||||
#define CLIENT_VERSION_MINOR 4
|
||||
#define CLIENT_VERSION_MINOR 5
|
||||
|
||||
/* Build revision */
|
||||
#define CLIENT_VERSION_REVISION 0
|
||||
@@ -265,7 +265,7 @@
|
||||
#define PACKAGE_NAME "Palladium Core"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "Palladium Core 1.4.1"
|
||||
#define PACKAGE_STRING "Palladium Core 1.5.0"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "palladium"
|
||||
@@ -274,7 +274,7 @@
|
||||
#define PACKAGE_URL "https://palladiumblockchain.net/"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.4.1"
|
||||
#define PACKAGE_VERSION "1.5.0"
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
AC_PREREQ([2.69])
|
||||
define(_CLIENT_VERSION_MAJOR, 1)
|
||||
define(_CLIENT_VERSION_MINOR, 4)
|
||||
define(_CLIENT_VERSION_REVISION, 1)
|
||||
define(_CLIENT_VERSION_MINOR, 5)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_RC, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH PALLADIUM-CLI "1" "April 2024" "palladium-cli v1.4.1" "User Commands"
|
||||
.TH PALLADIUM-CLI "1" "April 2024" "palladium-cli v1.5.0" "User Commands"
|
||||
.SH NAME
|
||||
palladium-cli \- manual page for palladium-cli v1.4.1
|
||||
palladium-cli \- manual page for palladium-cli v1.5.0
|
||||
.SH SYNOPSIS
|
||||
.B palladium-cli
|
||||
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Palladium Core\/\fR
|
||||
@@ -15,7 +15,7 @@ palladium-cli \- manual page for palladium-cli v1.4.1
|
||||
.B palladium-cli
|
||||
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
|
||||
.SH DESCRIPTION
|
||||
Palladium Core RPC client version v1.4.1
|
||||
Palladium Core RPC client version v1.5.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH PALLADIUM-QT "1" "April 2024" "palladium-qt v1.4.1" "User Commands"
|
||||
.TH PALLADIUM-QT "1" "April 2024" "palladium-qt v1.5.0" "User Commands"
|
||||
.SH NAME
|
||||
palladium-qt \- manual page for palladium-qt v1.4.1
|
||||
palladium-qt \- manual page for palladium-qt v1.5.0
|
||||
.SH SYNOPSIS
|
||||
.B palladium-qt
|
||||
[\fI\,command-line options\/\fR]
|
||||
.SH DESCRIPTION
|
||||
Palladium Core version v1.4.1
|
||||
Palladium Core version v1.5.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH PALLADIUM-TX "1" "April 2024" "palladium-tx v1.4.1" "User Commands"
|
||||
.TH PALLADIUM-TX "1" "April 2024" "palladium-tx v1.5.0" "User Commands"
|
||||
.SH NAME
|
||||
palladium-tx \- manual page for palladium-tx v1.4.1
|
||||
palladium-tx \- manual page for palladium-tx v1.5.0
|
||||
.SH SYNOPSIS
|
||||
.B palladium-tx
|
||||
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded palladium transaction\/\fR
|
||||
@@ -9,7 +9,7 @@ palladium-tx \- manual page for palladium-tx v1.4.1
|
||||
.B palladium-tx
|
||||
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded palladium transaction\/\fR
|
||||
.SH DESCRIPTION
|
||||
Palladium Core palladium\-tx utility version v1.4.1
|
||||
Palladium Core palladium\-tx utility version v1.5.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH PALLADIUM-WALLET "1" "April 2024" "palladium-wallet v1.4.1" "User Commands"
|
||||
.TH PALLADIUM-WALLET "1" "April 2024" "palladium-wallet v1.5.0" "User Commands"
|
||||
.SH NAME
|
||||
palladium-wallet \- manual page for palladium-wallet v1.4.1
|
||||
palladium-wallet \- manual page for palladium-wallet v1.5.0
|
||||
.SH DESCRIPTION
|
||||
Palladium Core palladium\-wallet version v1.4.1
|
||||
Palladium Core palladium\-wallet version v1.5.0
|
||||
.PP
|
||||
palladium\-wallet is an offline tool for creating and interacting with Palladium Core wallet files.
|
||||
By default palladium\-wallet will act on wallets in the default mainnet wallet directory in the datadir.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH PALLADIUMD "1" "April 2024" "palladiumd v1.4.1" "User Commands"
|
||||
.TH PALLADIUMD "1" "April 2024" "palladiumd v1.5.0" "User Commands"
|
||||
.SH NAME
|
||||
palladiumd \- manual page for palladiumd v1.4.1
|
||||
palladiumd \- manual page for palladiumd v1.5.0
|
||||
.SH SYNOPSIS
|
||||
.B palladiumd
|
||||
[\fI\,options\/\fR] \fI\,Start Palladium Core\/\fR
|
||||
.SH DESCRIPTION
|
||||
Palladium Core version v1.4.1
|
||||
Palladium Core version v1.5.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* Testnet (v3)
|
||||
* Testnet
|
||||
*/
|
||||
class CTestNetParams : public CChainParams {
|
||||
public:
|
||||
@@ -185,7 +185,8 @@ public:
|
||||
strNetworkID = CBaseChainParams::TESTNET;
|
||||
consensus.nSubsidyHalvingInterval = 210000;
|
||||
|
||||
consensus.BIP34Height = 0;
|
||||
consensus.BIP34Height = 1700;
|
||||
consensus.BIP34Hash = uint256();
|
||||
consensus.BIP65Height = 0;
|
||||
consensus.BIP66Height = 0;
|
||||
consensus.CSVHeight = 0;
|
||||
@@ -195,19 +196,20 @@ public:
|
||||
|
||||
|
||||
// The best chain should have at least this much work.
|
||||
consensus.nMinimumChainWork = uint256S("0x00");
|
||||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000003077e5d4c957"); // Current testnet chainwork
|
||||
|
||||
// By default assume that the signatures in ancestors of this block are valid.
|
||||
consensus.defaultAssumeValid = uint256S("0x00");
|
||||
consensus.defaultAssumeValid = uint256S("0x0000000000f8470a0cc0f6210b23bbeba248bf937205e34588aa84596b72c3bd"); // Current best block hash
|
||||
|
||||
|
||||
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||
consensus.nPowTargetTimespan = 24 * 60 * 60;
|
||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60;
|
||||
consensus.nPowTargetSpacing = 2 * 60;
|
||||
consensus.fPowAllowMinDifficultyBlocks = true;
|
||||
consensus.nPowTargetSpacingV2 = 2 * 60;
|
||||
consensus.fPowAllowMinDifficultyBlocks = true; // Enable minimum difficulty after 20 minutes of inactivity
|
||||
consensus.fPowNoRetargeting = false;
|
||||
consensus.nRuleChangeActivationThreshold = 720;
|
||||
consensus.nMinerConfirmationWindow = 540;
|
||||
consensus.nRuleChangeActivationThreshold = 540;
|
||||
consensus.nMinerConfirmationWindow = 720;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
|
||||
|
||||
@@ -81,8 +81,8 @@ std::string FormatFullVersion()
|
||||
{
|
||||
// Display a simplified semantic version: omit trailing ".0" and git suffix
|
||||
// by reusing FormatVersion on the aggregated CLIENT_VERSION.
|
||||
// This yields e.g. "v1.4.1" when CLIENT_VERSION_BUILD == 0,
|
||||
// or "v1.4.1.1" if a non-zero build number is used.
|
||||
// This yields e.g. "v1.5.0" when CLIENT_VERSION_BUILD == 0,
|
||||
// or "v1.5.0.1" if a non-zero build number is used.
|
||||
return std::string("v") + FormatVersion(CLIENT_VERSION);
|
||||
}
|
||||
|
||||
|
||||
27
src/pow.cpp
27
src/pow.cpp
@@ -19,6 +19,15 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
if ((pindexLast->nHeight >= 28930) && (pindexLast->nHeight <= 28999))
|
||||
return nProofOfWorkLimit;
|
||||
|
||||
// Special difficulty rule for testnet: If the new block's timestamp is more than 20 minutes
|
||||
// then allow mining of a min-difficulty block. This rule has priority over LWMA.
|
||||
if (params.fPowAllowMinDifficultyBlocks && pblock->GetBlockTime() > pindexLast->GetBlockTime() + 20 * 60)
|
||||
return nProofOfWorkLimit;
|
||||
|
||||
// For testnet, use LWMA from beginning to recalculate every block like mainnet
|
||||
if (params.fPowAllowMinDifficultyBlocks && pindexLast->nHeight >= 0)
|
||||
return LwmaCalculateNextWorkRequired(pindexLast, params);
|
||||
|
||||
if (pindexLast->nHeight >= 29000)
|
||||
return LwmaCalculateNextWorkRequired(pindexLast, params);
|
||||
|
||||
@@ -27,19 +36,11 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
{
|
||||
if (params.fPowAllowMinDifficultyBlocks)
|
||||
{
|
||||
// Special difficulty rule for testnet:
|
||||
// If the new block's timestamp is more than 2* 10 minutes
|
||||
// then allow mining of a min-difficulty block.
|
||||
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*2)
|
||||
return nProofOfWorkLimit;
|
||||
else
|
||||
{
|
||||
// Return the last non-special-min-difficulty-rules-block
|
||||
const CBlockIndex* pindex = pindexLast;
|
||||
while (pindex->pprev && pindex->nHeight % params.DifficultyAdjustmentInterval() != 0 && pindex->nBits == nProofOfWorkLimit)
|
||||
pindex = pindex->pprev;
|
||||
return pindex->nBits;
|
||||
}
|
||||
// Return the last non-special-min-difficulty-rules-block
|
||||
const CBlockIndex* pindex = pindexLast;
|
||||
while (pindex->pprev && pindex->nHeight % params.DifficultyAdjustmentInterval() != 0 && pindex->nBits == nProofOfWorkLimit)
|
||||
pindex = pindex->pprev;
|
||||
return pindex->nBits;
|
||||
}
|
||||
return pindexLast->nBits;
|
||||
}
|
||||
|
||||
@@ -491,8 +491,10 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
||||
if (g_rpc_node->connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0)
|
||||
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, PACKAGE_NAME " is not connected!");
|
||||
|
||||
if (::ChainstateActive().IsInitialBlockDownload())
|
||||
// Block getblocktemplate during initial block download for security
|
||||
if (::ChainstateActive().IsInitialBlockDownload()) {
|
||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is in initial sync and waiting for blocks...");
|
||||
}
|
||||
|
||||
static unsigned int nTransactionsUpdatedLast;
|
||||
const CTxMemPool& mempool = EnsureMemPool();
|
||||
|
||||
@@ -3437,7 +3437,16 @@ static bool ContextualCheckBlockHeader(const CBlockHeader& block, BlockValidatio
|
||||
|
||||
// Check proof of work
|
||||
const Consensus::Params& consensusParams = params.GetConsensus();
|
||||
if (block.nBits != GetNextWorkRequired(pindexPrev, &block, consensusParams))
|
||||
|
||||
// For testnet, allow min difficulty blocks after 20 minutes of inactivity
|
||||
bool skipPowCheck = false;
|
||||
if (params.NetworkIDString() == "test" && consensusParams.fPowAllowMinDifficultyBlocks) {
|
||||
if (pindexPrev && block.GetBlockTime() > pindexPrev->GetBlockTime() + consensusParams.nPowTargetSpacing * 2) {
|
||||
skipPowCheck = true; // Allow min difficulty after 20 min inactivity
|
||||
}
|
||||
}
|
||||
|
||||
if (!skipPowCheck && block.nBits != GetNextWorkRequired(pindexPrev, &block, consensusParams))
|
||||
return state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, "bad-diffbits", "incorrect proof of work");
|
||||
|
||||
// Check against checkpoints
|
||||
|
||||
Reference in New Issue
Block a user