Skip to content

Commit 42cf6fb

Browse files
authored
Merge pull request #348 from duality-solutions/v2.4.20-Last
v2.4.20 Last Changes Before New Privatenet
2 parents 357a55c + 08d04a4 commit 42cf6fb

5 files changed

Lines changed: 9 additions & 13 deletions

File tree

src/bdap/bdap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static constexpr unsigned int MAX_BDAP_SIGNATURE_PROOF = 90; // TODO (bdap):
5555
static constexpr unsigned int MAX_BDAP_LINK_DATA_SIZE = 1592;
5656
static constexpr uint64_t DEFAULT_LINK_EXPIRE_TIME = 1861920000;
5757
static constexpr int32_t DEFAULT_REGISTRATION_MONTHS = 24; // 2 years
58-
static constexpr bool ENFORCE_BDAP_FEES = false; // ********** TODO (BDAP): Update to true after a new testnet.
58+
static constexpr bool ENFORCE_BDAP_FEES = true;
5959
static const std::string DEFAULT_PUBLIC_DOMAIN = "bdap.io";
6060
static const std::string DEFAULT_PUBLIC_OU = "public";
6161
static const std::string DEFAULT_ADMIN_OU = "admin";

src/bdap/vgpmessage.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,7 @@ bool CVGPMessage::IsNull() const
283283

284284
uint256 CVGPMessage::GetHash() const
285285
{
286-
CUnsignedVGPMessage unsignedMessage(vchMsg);
287-
if (unsignedMessage.nVersion == 1)
288-
return Hash(this->vchMsg.begin(), this->vchMsg.end());
289-
290-
return unsignedMessage.GetHash();
286+
return CUnsignedVGPMessage(vchMsg).GetHash();
291287
}
292288

293289
bool CVGPMessage::IsInEffect() const
@@ -391,9 +387,9 @@ int CVGPMessage::ProcessMessage(std::string& strErrorMessage) const
391387
strErrorMessage = "VGP message has an invalid signature. Adding 100 to ban score.";
392388
return 100; // this will add 100 to the peer's ban score
393389
}
394-
if (unsignedMessage.nVersion > 1 && UintToArith256(unsignedMessage.GetHash()) > UintToArith256(VGP_MESSAGE_MIN_HASH_TARGET))
390+
if (UintToArith256(unsignedMessage.GetHash()) > UintToArith256(VGP_MESSAGE_MIN_HASH_TARGET))
395391
{
396-
LogPrintf("%s -- message %s\n", __func__, unsignedMessage.ToString());
392+
LogPrintf("%s -- message proof hash failed to meet target %s\n", __func__, unsignedMessage.ToString());
397393
strErrorMessage = "Message proof of work is invalid and under the target.";
398394
return 100; // this will add 100 to the peer's ban score
399395
}

src/bdap/vgpmessage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static const uint256 VGP_MESSAGE_MIN_HASH_TARGET = uint256S("00fffffffffffffffff
4141
class CUnsignedVGPMessage
4242
{
4343
public:
44-
static const int CURRENT_VERSION = 2;
44+
static const int CURRENT_VERSION = 1;
4545
int nVersion;
4646
uint256 SubjectID;
4747
uint256 MessageID; // derived by hashing the public key + nTimestamp

src/chainparams.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,15 +614,15 @@ class CPrivateNetParams : public CChainParams
614614
nPruneAfterHeight = 100;
615615
startNewChain = false;
616616

617-
genesis = CreateGenesisBlock(1549926519, 32244, UintToArith256(consensus.powLimit).GetCompact(), 1, (1 * COIN));
617+
genesis = CreateGenesisBlock(1559867972, 60883, UintToArith256(consensus.powLimit).GetCompact(), 1, (1 * COIN));
618618
if (startNewChain == true) {
619619
MineGenesis(genesis, consensus.powLimit, true);
620620
}
621621

622622
consensus.hashGenesisBlock = genesis.GetHash();
623623

624624
if (!startNewChain) {
625-
assert(consensus.hashGenesisBlock == uint256S("0x0000f8b156a85be050a1304d3101bcc7018c1b32909a81abd6ab1d17c5090d63"));
625+
assert(consensus.hashGenesisBlock == uint256S("0x000055a9348d53bed51996102ad11d129207e85dc197d01a5a69d5fd10af0e8a"));
626626
assert(genesis.hashMerkleRoot == uint256S("0xfa0e753db5a853ebbc52594eb62fa8219155547b426fba8789fa96dbf07e6ed5"));
627627
}
628628
vFixedSeeds.clear();

src/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* network protocol versioning
1313
*/
1414

15-
static const int PROTOCOL_VERSION = 71200;
15+
static const int PROTOCOL_VERSION = 71300; // TODO (BDAP): ***** Revert to 71000
1616

1717
//! initial proto version, to be increased after version/verack negotiation
1818
static const int INIT_PROTO_VERSION = 209;
@@ -21,7 +21,7 @@ static const int INIT_PROTO_VERSION = 209;
2121
static const int GETHEADERS_VERSION = 60800;
2222

2323
//! disconnect from peers older than this proto version
24-
static const int MIN_PEER_PROTO_VERSION = 70900; // Only connect to v2.3 Nodes and newer
24+
static const int MIN_PEER_PROTO_VERSION = 71300; // TODO (BDAP): ***** Revert to 70900 Only connect to v2.3 Nodes and newer
2525

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

0 commit comments

Comments
 (0)