diff --git a/contrib/seeds/nodes_test.txt b/contrib/seeds/nodes_test.txt index 8e8d0487a49..f0fb05947f0 100644 --- a/contrib/seeds/nodes_test.txt +++ b/contrib/seeds/nodes_test.txt @@ -1,17 +1,17 @@ # List of fixed seed nodes for testnet -116.203.95.63:27741 -159.69.55.214:27741 -95.216.207.181:27741 -192.46.230.10:27741 -45.33.4.79:27741 -185.25.48.236:27741 -185.64.105.111:27741 +116.203.95.63:42911 +159.69.55.214:42911 +95.216.207.181:42911 +192.46.230.10:42911 +45.33.4.79:42911 +185.25.48.236:42911 +185.64.105.111:42911 -[2a01:4f8:c0c:f42e::1]:27741 -[2a01:4f8:c010:2555::1]:27741 -[2a01:4f9:c010:bbad::1]:27741 -[2400:8901::f03c:92ff:fe44:9542]:27741 -[2600:3c00::f03c:92ff:fe44:95b3]:27741 -[2a04:2180:0:2::149]:27741 -[2a04:2180:0:2::29]:27741 \ No newline at end of file +[2a01:4f8:c0c:f42e::1]:42911 +[2a01:4f8:c010:2555::1]:42911 +[2a01:4f9:c010:bbad::1]:42911 +[2400:8901::f03c:92ff:fe44:9542]:42911 +[2600:3c00::f03c:92ff:fe44:95b3]:42911 +[2a04:2180:0:2::149]:42911 +[2a04:2180:0:2::29]:42911 \ No newline at end of file diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index 22c885e6885..2720d040739 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -33,19 +33,19 @@ static SeedSpec6 pnSeed6_main[] = { }; static SeedSpec6 pnSeed6_test[] = { - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0x5f,0x3f}, 27741}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0x37,0xd6}, 27741}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0xcf,0xb5}, 27741}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x2e,0xe6,0x0a}, 27741}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x21,0x04,0x4f}, 27741}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0xec}, 27741}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x69,0x6f}, 27741}, - {{0x2a,0x01,0x04,0xf8,0x0c,0x0c,0xf4,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 27741}, - {{0x2a,0x01,0x04,0xf8,0xc0,0x10,0x25,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 27741}, - {{0x2a,0x01,0x04,0xf9,0xc0,0x10,0xbb,0xad,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 27741}, - {{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0x42}, 27741}, - {{0x26,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0xb3}, 27741}, - {{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x49}, 27741}, - {{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29}, 27741} + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0x5f,0x3f}, 42911}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0x37,0xd6}, 42911}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0xcf,0xb5}, 42911}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x2e,0xe6,0x0a}, 42911}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x21,0x04,0x4f}, 42911}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0xec}, 42911}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x69,0x6f}, 42911}, + {{0x2a,0x01,0x04,0xf8,0x0c,0x0c,0xf4,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 42911}, + {{0x2a,0x01,0x04,0xf8,0xc0,0x10,0x25,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 42911}, + {{0x2a,0x01,0x04,0xf9,0xc0,0x10,0xbb,0xad,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 42911}, + {{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0x42}, 42911}, + {{0x26,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0xb3}, 42911}, + {{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x49}, 42911}, + {{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29}, 42911} }; #endif // BITCOIN_CHAINPARAMSSEEDS_H diff --git a/src/main.cpp b/src/main.cpp index 0a28924258e..3ace8fa0744 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6119,7 +6119,7 @@ bool ContextualCheckBlock( // all other cases are covered via mempool and pre-registered check, doing this would require a malicious // client, so immediate ban score // - // TODO: HARDENING for PBaaS - add id/currency import/export verification + // TODO: HARDENING for PBaaS - we should be able to remove this section, as it should be properly handled just above CNameReservation nameRes(tx); if (nameRes.IsValid()) { diff --git a/src/pbaas/crosschainrpc.cpp b/src/pbaas/crosschainrpc.cpp index 6292ab93874..09490e4a4cd 100644 --- a/src/pbaas/crosschainrpc.cpp +++ b/src/pbaas/crosschainrpc.cpp @@ -1024,7 +1024,7 @@ CCurrencyDefinition::CCurrencyDefinition(const std::string ¤cyName, bool t UniValue uniEra1(UniValue::VOBJ); uniEra1.pushKV("reward", 1200000000); uniEra1.pushKV("decay", 0); - uniEra1.pushKV("halving", 1044011); + uniEra1.pushKV("halving", 1044022); uniEra1.pushKV("eraend", 0); uniEras.push_back(uniEra1); diff --git a/src/pbaas/identity.cpp b/src/pbaas/identity.cpp index 8e2239c3208..39a1b0a78ad 100644 --- a/src/pbaas/identity.cpp +++ b/src/pbaas/identity.cpp @@ -910,7 +910,13 @@ bool ValidateSpendingIdentityReservation(const CTransaction &tx, int32_t outNum, // CHECK #3d - check referrer validity, if there is one CIdentityID referralID = advNewName.IsValid() ? advNewName.referral : newName.referral; - if (!referralID.IsNull() && issuingCurrency.IDReferralLevels() && !(CIdentity::LookupIdentity(referralID, commitmentHeight).IsValid())) + uint32_t heightOut = 0; + CTransaction referralTx; + + CIdentity firstReferralIdentity; + + if (!referralID.IsNull() && issuingCurrency.IDReferralLevels() && + !((firstReferralIdentity = CIdentity::LookupFirstIdentity(referralID, &heightOut, &idTxIn, &referralTx)).IsValid() && heightOut < commitmentHeight)) { // invalid referral identity return state.Error("Invalid referral identity specified"); @@ -945,19 +951,12 @@ bool ValidateSpendingIdentityReservation(const CTransaction &tx, int32_t outNum, return true; } - // CHECK #5 - ensure that the first referring output goes to the referring identity followed by up - // to two identities that come from the original definition transaction of the referring identity. account for all outputs between - // identity out and reservation out and ensure that they are correct and pay 20% of the price of an identity - uint32_t heightOut = 0; - CTransaction referralTx; - - CIdentity firstReferralIdentity = CIdentity::LookupFirstIdentity(referralID, &heightOut, &idTxIn, &referralTx); - + // CHECK #5 - ensure that the first referring output goes to the referring identity followed by additional referrers // referrer must be mined in when this transaction is put into the mem pool - if (heightOut >= height || !firstReferralIdentity.IsValid() || firstReferralIdentity.parent != parentID) + if (firstReferralIdentity.parent != parentID && firstReferralIdentity.GetID() != parentID) { //printf("%s: cannot find first instance of: %s\n", __func__, EncodeDestination(CIdentityID(newName.referral)).c_str()); - return state.Error("Invalid identity registration referral"); + return state.Error("Invalid identity registration referral - different parent"); } bool isReferral = false;