From d0a16a6cc0ff86bf163a6747619ff063560295aa Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Tue, 6 Sep 2016 22:42:48 -0700 Subject: [PATCH 01/16] Update magic numbers for Zcash Source: https://github.com/zcash/zcash/blob/zc.v0.11.2.latest/src/chainparams.cpp#L154 --- main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index d41f78c9..ee125469 100644 --- a/main.cpp +++ b/main.cpp @@ -450,10 +450,10 @@ int main(int argc, char **argv) { bool fDNS = true; if (opts.fUseTestNet) { printf("Using testnet.\n"); - pchMessageStart[0] = 0x0b; - pchMessageStart[1] = 0x11; - pchMessageStart[2] = 0x09; - pchMessageStart[3] = 0x07; + pchMessageStart[0] = 0x26; + pchMessageStart[1] = 0xA7; + pchMessageStart[2] = 0x24; + pchMessageStart[3] = 0xB6; seeds = testnet_seeds; fTestNet = true; } From 7d9ee04fcab91ec6877aad1d84a2000ed6dee584 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Tue, 6 Sep 2016 22:44:17 -0700 Subject: [PATCH 02/16] Update protocol version for Zcash Source: https://github.com/zcash/zcash/blob/zc.v0.11.2.latest/src/version.h#L12 --- serialize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serialize.h b/serialize.h index 4e677c3c..3987ccba 100644 --- a/serialize.h +++ b/serialize.h @@ -60,7 +60,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int PROTOCOL_VERSION = 60000; +static const int PROTOCOL_VERSION = 170002; // Used to bypass the rule against non-const reference to temporary // where it makes sense with wrappers such as CFlatData or CTxDB From 2e968b2bfd3aecbb3e8a78a10f35de94364506ae Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Tue, 6 Sep 2016 22:45:31 -0700 Subject: [PATCH 03/16] Update default ports for Zcash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8333 → 8233 18333 → 18233 --- protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.h b/protocol.h index e9be1c22..6b77fefb 100644 --- a/protocol.h +++ b/protocol.h @@ -18,7 +18,7 @@ extern bool fTestNet; static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) { - return testnet ? 18333 : 8333; + return testnet ? 18233 : 8233; } // From e43272777d2ec913d6f951c02403cd6ac452f443 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Tue, 6 Sep 2016 22:46:32 -0700 Subject: [PATCH 04/16] Update testnet seed addresses for Zcash Also removes Bitcoin mainnet seeds. --- main.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/main.cpp b/main.cpp index ee125469..b4cc9aa5 100644 --- a/main.cpp +++ b/main.cpp @@ -389,12 +389,8 @@ extern "C" void* ThreadStats(void*) { } while(1); } -static const string mainnet_seeds[] = {"dnsseed.bluematt.me", "bitseed.xf2.org", "dnsseed.bitcoin.dashjr.org", "seed.bitcoin.sipa.be", ""}; -static const string testnet_seeds[] = {"testnet-seed.alexykot.me", - "testnet-seed.bitcoin.petertodd.org", - "testnet-seed.bluematt.me", - "testnet-seed.bitcoin.schildbach.de", - ""}; +static const string mainnet_seeds[] = {""}; +static const string testnet_seeds[] = {"dnsseed.testnet.z.cash"}; static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { From 2532fe48c399bb6e6b141fdab65004e7f1e56002 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 23 Sep 2016 21:56:08 -0700 Subject: [PATCH 05/16] Updates REQUIRE_VERSION, GetRequireHeight and testnet_seeds --- db.h | 5 +++-- main.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/db.h b/db.h index 55e11496..2be52354 100644 --- a/db.h +++ b/db.h @@ -12,11 +12,12 @@ #define MIN_RETRY 1000 -#define REQUIRE_VERSION 70001 +#define REQUIRE_VERSION 170002 static inline int GetRequireHeight(const bool testnet = fTestNet) { - return testnet ? 500000 : 350000; + // return testnet ? 500000 : 350000; + return 0; } std::string static inline ToString(const CService &ip) { diff --git a/main.cpp b/main.cpp index b4cc9aa5..ecc3a9fb 100644 --- a/main.cpp +++ b/main.cpp @@ -390,7 +390,7 @@ extern "C" void* ThreadStats(void*) { } static const string mainnet_seeds[] = {""}; -static const string testnet_seeds[] = {"dnsseed.testnet.z.cash"}; +static const string testnet_seeds[] = {"dnsseed.testnet.z.cash", "explorer.testnet.z.cash"}; static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { From 9dec9aa89804e73a451a5f2fc17ae9b0be391217 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Wed, 7 Sep 2016 12:48:36 -0700 Subject: [PATCH 06/16] New random hexadecimal magic numbers for Zcash testnet --- main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index ecc3a9fb..25e32677 100644 --- a/main.cpp +++ b/main.cpp @@ -446,10 +446,10 @@ int main(int argc, char **argv) { bool fDNS = true; if (opts.fUseTestNet) { printf("Using testnet.\n"); - pchMessageStart[0] = 0x26; - pchMessageStart[1] = 0xA7; - pchMessageStart[2] = 0x24; - pchMessageStart[3] = 0xB6; + pchMessageStart[0] = 0xA5; + pchMessageStart[1] = 0xF1; + pchMessageStart[2] = 0xE7; + pchMessageStart[3] = 0x26; seeds = testnet_seeds; fTestNet = true; } From 60329cc14b0ea32a67a63cae64d31c41ebebd210 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 23 Sep 2016 21:57:36 -0700 Subject: [PATCH 07/16] Updates dnsseed.testnet.z.cash -> betatestnet.z.cash --- main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 25e32677..efae55cc 100644 --- a/main.cpp +++ b/main.cpp @@ -389,8 +389,7 @@ extern "C" void* ThreadStats(void*) { } while(1); } -static const string mainnet_seeds[] = {""}; -static const string testnet_seeds[] = {"dnsseed.testnet.z.cash", "explorer.testnet.z.cash"}; +static const string testnet_seeds[] = {"betatestnet.z.cash", "explorer.testnet.z.cash"}; static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { From bd0112acddb2e494b7204996257d6e891be75260 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 23 Sep 2016 22:02:03 -0700 Subject: [PATCH 08/16] Set mainnet_seeds to none. --- main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main.cpp b/main.cpp index efae55cc..07f0409f 100644 --- a/main.cpp +++ b/main.cpp @@ -389,6 +389,7 @@ extern "C" void* ThreadStats(void*) { } while(1); } +static const string mainnet_seeds[] = {}; static const string testnet_seeds[] = {"betatestnet.z.cash", "explorer.testnet.z.cash"}; static const string *seeds = mainnet_seeds; From f5d36a48687562d54c31ce68d5e307e2c13e7d16 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 23 Sep 2016 22:23:52 -0700 Subject: [PATCH 09/16] Updates version string, fixes segmentation fault The last element in testnet_seeds must be an empty string. --- bitcoin.cpp | 2 +- main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoin.cpp b/bitcoin.cpp index 9ccbabf9..f024f62c 100644 --- a/bitcoin.cpp +++ b/bitcoin.cpp @@ -80,7 +80,7 @@ class CNode { CAddress me(CService("0.0.0.0")); BeginMessage("version"); int nBestHeight = GetRequireHeight(); - string ver = "/bitcoin-seeder:0.01/"; + string ver = "/zcash-seeder:0.01/"; vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight; EndMessage(); } diff --git a/main.cpp b/main.cpp index 07f0409f..d9023523 100644 --- a/main.cpp +++ b/main.cpp @@ -390,7 +390,7 @@ extern "C" void* ThreadStats(void*) { } static const string mainnet_seeds[] = {}; -static const string testnet_seeds[] = {"betatestnet.z.cash", "explorer.testnet.z.cash"}; +static const string testnet_seeds[] = {"betatestnet.z.cash", "explorer.testnet.z.cash", ""}; static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { From 6cbd829d98f0a263115d324d0b30f1f9dda808e7 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Tue, 4 Oct 2016 20:10:00 -0700 Subject: [PATCH 10/16] Updates network magic numbers for beta2 release --- main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index d9023523..bb758661 100644 --- a/main.cpp +++ b/main.cpp @@ -81,17 +81,17 @@ class CDnsSeedOpts { host = optarg; break; } - + case 'm': { mbox = optarg; break; } - + case 'n': { ns = optarg; break; } - + case 't': { int n = strtol(optarg, NULL, 10); if (n > 0 && n < 1000) nThreads = n; @@ -446,10 +446,10 @@ int main(int argc, char **argv) { bool fDNS = true; if (opts.fUseTestNet) { printf("Using testnet.\n"); - pchMessageStart[0] = 0xA5; - pchMessageStart[1] = 0xF1; - pchMessageStart[2] = 0xE7; - pchMessageStart[3] = 0x26; + pchMessageStart[0] = 0x0C; + pchMessageStart[1] = 0x9E; + pchMessageStart[2] = 0xD7; + pchMessageStart[3] = 0xA2; seeds = testnet_seeds; fTestNet = true; } From 338d209c4a7130f15b28b3b774b5eb3f44cd298d Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Tue, 25 Oct 2016 15:12:08 -0700 Subject: [PATCH 11/16] Removes Bitcoin-related Tor hidden service seed --- main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index bb758661..20ae0594 100644 --- a/main.cpp +++ b/main.cpp @@ -394,9 +394,9 @@ static const string testnet_seeds[] = {"betatestnet.z.cash", "explorer.testnet.z static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { - if (!fTestNet){ - db.Add(CService("kjy2eqzk4zwi5zd3.onion", 8333), true); - } + //if (!fTestNet){ + // db.Add(CService("kjy2eqzk4zwi5zd3.onion", 8333), true); + //} do { for (int i=0; seeds[i] != ""; i++) { vector ips; From 13bc92f2061beac08f7abe34aa8fdb7a620546ac Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Thu, 27 Oct 2016 10:05:27 -0700 Subject: [PATCH 12/16] Updates pchMessageStart for rc4 --- main.cpp | 8 ++++---- protocol.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 20ae0594..031cb5ba 100644 --- a/main.cpp +++ b/main.cpp @@ -446,10 +446,10 @@ int main(int argc, char **argv) { bool fDNS = true; if (opts.fUseTestNet) { printf("Using testnet.\n"); - pchMessageStart[0] = 0x0C; - pchMessageStart[1] = 0x9E; - pchMessageStart[2] = 0xD7; - pchMessageStart[3] = 0xA2; + pchMessageStart[0] = 0xFA; + pchMessageStart[1] = 0x1A; + pchMessageStart[2] = 0x24; + pchMessageStart[3] = 0xB6; seeds = testnet_seeds; fTestNet = true; } diff --git a/protocol.cpp b/protocol.cpp index 3df8a187..599ec451 100644 --- a/protocol.cpp +++ b/protocol.cpp @@ -22,7 +22,7 @@ static const char* ppszTypeName[] = "block", }; -unsigned char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 }; +unsigned char pchMessageStart[4] = { 0xF9, 0xF3, 0xAC, 0xAB }; CMessageHeader::CMessageHeader() { From f1367ec6418bf855d97bbc3ba08803f632b5236c Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 28 Oct 2016 02:20:28 -0700 Subject: [PATCH 13/16] Sets mainnet and testnet seeds for Zcash 1.0.0 --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 031cb5ba..d8d1fac1 100644 --- a/main.cpp +++ b/main.cpp @@ -389,8 +389,8 @@ extern "C" void* ThreadStats(void*) { } while(1); } -static const string mainnet_seeds[] = {}; -static const string testnet_seeds[] = {"betatestnet.z.cash", "explorer.testnet.z.cash", ""}; +static const string mainnet_seeds[] = {"mainnet.z.cash", "dnsseed.str4d.xyz", "dnsseed.znodes.org", ""}; +static const string testnet_seeds[] = {"testnet.z.cash", "explorer.testnet.z.cash", ""}; static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { From 03e0de22614aafa2b7d4c46b2e07fc8c69a9e846 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 28 Oct 2016 08:54:58 -0700 Subject: [PATCH 14/16] Updates v1.0.0 mainnet network magic --- protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.cpp b/protocol.cpp index 599ec451..f4776679 100644 --- a/protocol.cpp +++ b/protocol.cpp @@ -22,7 +22,7 @@ static const char* ppszTypeName[] = "block", }; -unsigned char pchMessageStart[4] = { 0xF9, 0xF3, 0xAC, 0xAB }; +unsigned char pchMessageStart[4] = { 0x24, 0xE9, 0x27, 0x64 }; CMessageHeader::CMessageHeader() { From 795e43e920e6d94570ead03096c925cc6c1c274f Mon Sep 17 00:00:00 2001 From: "Ian A. M" Date: Thu, 15 Mar 2018 14:09:58 -0600 Subject: [PATCH 15/16] bump version 170002 to 170003 --- db.h | 2 +- serialize.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db.h b/db.h index 2be52354..dcfd1e13 100644 --- a/db.h +++ b/db.h @@ -12,7 +12,7 @@ #define MIN_RETRY 1000 -#define REQUIRE_VERSION 170002 +#define REQUIRE_VERSION 170003 static inline int GetRequireHeight(const bool testnet = fTestNet) { diff --git a/serialize.h b/serialize.h index 3987ccba..0a80ecb6 100644 --- a/serialize.h +++ b/serialize.h @@ -60,7 +60,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int PROTOCOL_VERSION = 170002; +static const int PROTOCOL_VERSION = 170003; // Used to bypass the rule against non-const reference to temporary // where it makes sense with wrappers such as CFlatData or CTxDB From 67801139b218eac357ab728ec8abeb12017b6004 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 22 Jun 2018 15:18:44 -0700 Subject: [PATCH 16/16] Bump protocol version to 170005 for mainnet Overwinter activation. --- db.h | 2 +- serialize.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db.h b/db.h index dcfd1e13..ede71e9e 100644 --- a/db.h +++ b/db.h @@ -12,7 +12,7 @@ #define MIN_RETRY 1000 -#define REQUIRE_VERSION 170003 +#define REQUIRE_VERSION 170005 static inline int GetRequireHeight(const bool testnet = fTestNet) { diff --git a/serialize.h b/serialize.h index 0a80ecb6..7916e6c5 100644 --- a/serialize.h +++ b/serialize.h @@ -60,7 +60,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int PROTOCOL_VERSION = 170003; +static const int PROTOCOL_VERSION = 170005; // Used to bypass the rule against non-const reference to temporary // where it makes sense with wrappers such as CFlatData or CTxDB