Skip to content

Commit

Permalink
Merge pull request KomodoPlatform#404 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored May 1, 2022
2 parents c214394 + e20e5c0 commit bf5c5e9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 41 deletions.
28 changes: 14 additions & 14 deletions contrib/seeds/nodes_test.txt
Original file line number Diff line number Diff line change
@@ -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
[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
28 changes: 14 additions & 14 deletions src/chainparamsseeds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
2 changes: 1 addition & 1 deletion src/pbaas/crosschainrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ CCurrencyDefinition::CCurrencyDefinition(const std::string &currencyName, 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);

Expand Down
21 changes: 10 additions & 11 deletions src/pbaas/identity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bf5c5e9

Please sign in to comment.