Skip to content

Commit

Permalink
v1.3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
le2Ks committed Apr 5, 2024
1 parent c9500e9 commit ce1312b
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 42 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_MINOR, 3)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2024)
Expand Down
6 changes: 3 additions & 3 deletions doc/man/obsidian-cli.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
.TH OBSIDIAN-CLI "1" "February 2024" "obsidian-cli v1.2.2.1" "User Commands"
.TH OBSIDIAN-CLI "1" "April 2024" "obsidian-cli v1.3.0.0" "User Commands"
.SH NAME
obsidian-cli \- manual page for obsidian-cli v1.2.2.1
obsidian-cli \- manual page for obsidian-cli v1.3.0.0
.SH SYNOPSIS
.B obsidian-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Obsidian Network\/\fR
Expand All @@ -15,7 +15,7 @@ obsidian-cli \- manual page for obsidian-cli v1.2.2.1
.B obsidian-cli
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
.SH DESCRIPTION
Obsidian Network RPC client version v1.2.2.1
Obsidian Network RPC client version v1.3.0.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/obsidian-qt.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
.TH OBSIDIAN-QT "1" "February 2024" "obsidian-qt v1.2.2.1" "User Commands"
.TH OBSIDIAN-QT "1" "April 2024" "obsidian-qt v1.3.0.0" "User Commands"
.SH NAME
obsidian-qt \- manual page for obsidian-qt v1.2.2.1
obsidian-qt \- manual page for obsidian-qt v1.3.0.0
.SH SYNOPSIS
.B obsidian-qt
[\fI\,command-line options\/\fR]
.SH DESCRIPTION
Obsidian Network version v1.2.2.1 (64\-bit)
Obsidian Network version v1.3.0.0 (64\-bit)
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/obsidian-tx.1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
.TH OBSIDIAN-TX "1" "February 2024" "obsidian-tx v1.2.2.1" "User Commands"
.TH OBSIDIAN-TX "1" "April 2024" "obsidian-tx v1.3.0.0" "User Commands"
.SH NAME
obsidian-tx \- manual page for obsidian-tx v1.2.2.1
obsidian-tx \- manual page for obsidian-tx v1.3.0.0
.SH SYNOPSIS
.B obsidian-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded obsidian transaction\/\fR
.br
.B obsidian-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded obsidian transaction\/\fR
.SH DESCRIPTION
Obsidian Network obsidian\-tx utility version v1.2.2.1
Obsidian Network obsidian\-tx utility version v1.3.0.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/obsidian-wallet.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
.TH OBSIDIAN-WALLET "1" "February 2024" "obsidian-wallet v1.2.2.1" "User Commands"
.TH OBSIDIAN-WALLET "1" "April 2024" "obsidian-wallet v1.3.0.0" "User Commands"
.SH NAME
obsidian-wallet \- manual page for obsidian-wallet v1.2.2.1
obsidian-wallet \- manual page for obsidian-wallet v1.3.0.0
.SH DESCRIPTION
Obsidian Network obsidian\-wallet version v1.2.2.1
Obsidian Network obsidian\-wallet version v1.3.0.0
.PP
wallet\-tool is an offline tool for creating and interacting with Obsidian Network wallet files.
By default wallet\-tool will act on wallets in the default mainnet wallet directory in the datadir.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/obsidiand.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
.TH OBSIDIAND "1" "February 2024" "obsidiand v1.2.2.1" "User Commands"
.TH OBSIDIAND "1" "April 2024" "obsidiand v1.3.0.0" "User Commands"
.SH NAME
obsidiand \- manual page for obsidiand v1.2.2.1
obsidiand \- manual page for obsidiand v1.3.0.0
.SH SYNOPSIS
.B obsidiand
[\fI\,options\/\fR] \fI\,Start Obsidian Network Daemon\/\fR
.SH DESCRIPTION
Obsidian Network Daemon version v1.2.2.1
Obsidian Network Daemon version v1.3.0.0
.SH OPTIONS
.HP
\-?
Expand Down
2 changes: 1 addition & 1 deletion src/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static const CAmount COIN = 100000000;
* critical; in unusual circumstances like a(nother) overflow bug that allowed
* for the creation of coins out of thin air modification could lead to a fork.
* */
static const CAmount MAX_MONEY = 168000000 * COIN;
static const CAmount MAX_MONEY = 172000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

#endif // BITCOIN_AMOUNT_H
24 changes: 14 additions & 10 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ class CMainParams : public CChainParams {
consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 7 * 24 * 60 * 60;
consensus.nPowTargetSpacing = 1.2 * 60;
consensus.lwmaAveragingWindow = 118;
consensus.lwmaAveragingWindow = 118;
consensus.lwmaAveragingWindowV2 = 236;
consensus.DevCommunityFundHeight = 242942;
consensus.fPowAllowMinDifficultyBlocks = false;
consensus.fPowNoRetargeting = false;
consensus.nRuleChangeActivationThreshold = 180;
Expand All @@ -110,10 +112,10 @@ class CMainParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1700773000;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000eb302899c17fc49");
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000001e74cd836b2ddf03");

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x1c40941b689607071b06004a64179f54f58a3858f0c1edae3b03e9fc48f03269");
consensus.defaultAssumeValid = uint256S("0x23710fc4e0f72d480abb2b5312da66a6f022281642004cf2a4b035872634f1e4");

/**
* The message start string is designed to be unlikely to occur in normal data.
Expand Down Expand Up @@ -172,7 +174,7 @@ class CMainParams : public CChainParams {
{ 0, uint256S("0x119eb27cd47508416221a987205c1838288298d966c126d3b27643b16bc839c7")},
{ 1, uint256S("0x6c74d01c657edaac06d88aebdbe8f6dd37720cd333b67272ae4754ad05240be0")},
{ 16, uint256S("0x40ee070ab49c3503ea396af1895005c6636b4d6851900f57b03dfefe951014bf")},
{ 42, uint256S("0x08f94b8a81959139bda5e6afbef09227a4682acc1e8a1dfb146e3bda50c05142")},
{ 42, uint256S("0x08f94b8a81959139bda5e6afbef09227a4682acc1e8a1dfb146e3bda50c05142")},
{ 500, uint256S("0x601237c6c090b8bffad2defad4157227ae670370880a63285e1b1e33e1b20c45")},
{ 1014, uint256S("0x7f64546aacd66828a4db84cc48ce4e7e7cb6595125168894c91fdb4ed8f6d920")},
{ 1680, uint256S("0xebea1c2db842321d38095d3f534730c9f6ebb9f91ab6bbeb85c3034825abba81")}, // Softfork CSV and Segwit activation started
Expand All @@ -187,16 +189,18 @@ class CMainParams : public CChainParams {
{ 55256, uint256S("0x5d6a349985df19c40352a87a12fde3955c77036182adf5cac96b7a50e9f52e11")},
{ 83892, uint256S("0x56346ec538145357f158a4ebf6aa73d0d254ddb81863f744c374c934ee52664f")},
{ 118408, uint256S("0xbebc9d7669a3223d39cb6c149fb2ab0c0111b33cedf55af22d5daffbb350a9fc")},
{ 143569, uint256S("0xa1061f96ca2cad4568ebaff4f526904ebd45520a9e0d6c0af061923fdb54b722")},
{ 193428, uint256S("0x1c40941b689607071b06004a64179f54f58a3858f0c1edae3b03e9fc48f03269")},
{ 143569, uint256S("0xa1061f96ca2cad4568ebaff4f526904ebd45520a9e0d6c0af061923fdb54b722")},
{ 193428, uint256S("0x1c40941b689607071b06004a64179f54f58a3858f0c1edae3b03e9fc48f03269")},
{ 242853, uint256S("0x01f7ea65cfd0561e84d0deb8919ef33937ba2ab60daa263b2d1236911a072bf1")},
{ 242942, uint256S("0x23710fc4e0f72d480abb2b5312da66a6f022281642004cf2a4b035872634f1e4")},
}
};

chainTxData = ChainTxData{
// Data from rpc: getchaintxstats 143569
/* nTime */ 1707946835,
/* nTxCount */ 244559,
/* dTxRate */ 0.032775221316
// Data from rpc: getchaintxstats 242853
/* nTime */ 1712345089,
/* nTxCount */ 300342,
/* dTxRate */ 0.02532568637726791
};

/* disable fallback fee on mainnet */
Expand Down
17 changes: 7 additions & 10 deletions src/chainparamsseeds.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
* IPv4 as well as onion addresses are wrapped inside an IPv6 address accordingly.
*/
static SeedSpec6 pnSeed6_main[] = {


{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4d,0x99,0x37}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x95,0xb2}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xf6,0x5e,0x58}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x1c,0x34,0x81}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xee,0x81,0x93}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0xea,0x14,0x78}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0xea,0x14,0xa4}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0xe8,0x19,0x1a}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0xe8,0x19,0x39}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0xea,0x1c,0xd1}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0xe8,0x0d,0x41}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x1c,0xeb,0xaa}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8c,0x52,0x06,0x50}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0xb0,0xdb,0x89}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x1c,0x2d,0xbd}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x1c,0xe5,0x45}, 2333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0xca,0x0d,0x04}, 2333}
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x1c,0x2d,0xbd}, 2333}
};

static SeedSpec6 pnSeed6_test[] = {
Expand Down
2 changes: 2 additions & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ struct Params {
bool fPowNoRetargeting;
int64_t nPowTargetSpacing;
int64_t lwmaAveragingWindow;
int64_t lwmaAveragingWindowV2;
int64_t DevCommunityFundHeight;
int64_t nPowTargetTimespan;
int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
uint256 nMinimumChainWork;
Expand Down
53 changes: 53 additions & 0 deletions src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
if (pindexLast->nHeight >= 146000)
return LwmaCalculateNextWorkRequired(pindexLast, params);

if (pindexLast->nHeight >= params.DevCommunityFundHeight)
return LwmaCalculateNextWorkRequiredV2(pindexLast, params);

// Only change once per difficulty adjustment interval
if ((pindexLast->nHeight+1) % params.DifficultyAdjustmentInterval() != 0)
{
Expand Down Expand Up @@ -112,6 +115,56 @@ unsigned int LwmaCalculateNextWorkRequired(const CBlockIndex* pindexLast, const
}


unsigned int LwmaCalculateNextWorkRequiredV2(const CBlockIndex* pindexLast, const Consensus::Params& params)
{
const int64_t T = params.nPowTargetSpacing;
const int64_t N = params.lwmaAveragingWindowV2;
const int64_t k = N * (N + 1) * T / 2; // For T=120, 240, 600 use approx N=100, 75, 50
const int64_t height = pindexLast->nHeight;
const arith_uint256 powLimit = UintToArith256(params.powLimit);

if (height < N) { return powLimit.GetCompact(); }

arith_uint256 sumTarget, nextTarget;
int64_t thisTimestamp, previousTimestamp;
int64_t t = 0, j = 0;

// Uncomment next 2 lines to use LWMA-3 jump rule.
//arith_uint256 previousTarget = 0;
//int64_t sumLast3Solvetimes = 0;

const CBlockIndex* blockPreviousTimestamp = pindexLast->GetAncestor(height - N);
previousTimestamp = blockPreviousTimestamp->GetBlockTime();

// Loop through N most recent blocks.
for (int64_t i = height - N + 1; i <= height; i++) {
const CBlockIndex* block = pindexLast->GetAncestor(i);
thisTimestamp = (block->GetBlockTime() > previousTimestamp) ?
block->GetBlockTime() : previousTimestamp + 1;

int64_t solvetime = std::min(6 * T, thisTimestamp - previousTimestamp);
previousTimestamp = thisTimestamp;

j++;
t += solvetime * j; // Weighted solvetime sum.
arith_uint256 target;
target.SetCompact(block->nBits);
sumTarget += target / (k * N);

// Uncomment next 2 lines to use LWMA-3.
// if (i > height - 3) { sumLast3Solvetimes += solvetime; }
// if (i == height) { previousTarget = target.SetCompact(block->nBits); }
}
nextTarget = t * sumTarget;

// Uncomment the following to use LWMA-3.
// This is a "memory-less" jump in difficulty approximately 2x normal
// if (sumLast3Solvetimes < (8 * T) / 10) { nextTarget = (previousTarget*100)/(100+(N*26)/200); }

if (nextTarget > powLimit) { nextTarget = powLimit; }

return nextTarget.GetCompact();
}

unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)
{
Expand Down
1 change: 1 addition & 0 deletions src/pow.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class uint256;
unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params&);
unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params&);
unsigned int LwmaCalculateNextWorkRequired(const CBlockIndex* pindexLast, const Consensus::Params&);
unsigned int LwmaCalculateNextWorkRequiredV2(const CBlockIndex* pindexLast, const Consensus::Params&);

/** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params&);
Expand Down
13 changes: 12 additions & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,18 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
if (halvings >= 64)
return 0;

CAmount nSubsidy = 100 * COIN;
//CAmount nSubsidy = 100 * COIN;

CAmount nSubsidy;

if (nHeight == consensusParams.DevCommunityFundHeight) {
nSubsidy = 4000000 * COIN; // 2,012,649.4692013 dev fund - 1,987,350.5307987 for community
}
else {
nSubsidy = 100 * COIN;
}


// Subsidy is cut in half every 840,000 blocks which will occur approximately everys 700 days
nSubsidy >>= halvings;
return nSubsidy;
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* network protocol versioning
*/

static const int PROTOCOL_VERSION = 70015;
static const int PROTOCOL_VERSION = 70016;

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

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
static const int MIN_PEER_PROTO_VERSION = PROTOCOL_VERSION;

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

0 comments on commit ce1312b

Please sign in to comment.