From f122abfe3d86f46c0636b5d820e7b48184bca44d Mon Sep 17 00:00:00 2001 From: nzsquirrell Date: Sun, 5 Jun 2016 20:49:01 +1200 Subject: [PATCH 1/3] fix bug in initial-block-headers download saves several gigabytes of bandwidth thanks to Cryptoslave of Anoncoin for this fix. --- src/main.cpp | 5 ++++- src/main.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a3109c0f..41a29d6b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4477,7 +4477,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (inv.type == MSG_BLOCK) { UpdateBlockAvailability(pfrom->GetId(), inv.hash); - if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) { + if (!fAlreadyHave && !fImporting && !fReindex && IsInitialBlockDownload() && !mapBlocksInFlight.count(inv.hash)) { + // !IsInitialBlockDownload() is needed otherwise it start to download the same headers + // several time per peer and from all peers, wasting a lot of computing time and bandwidth + // First request the headers preceding the announced block. In the normal fully-synced // case where a new block is announced that succeeds the current tip (no reorganization), // there are no such headers. diff --git a/src/main.h b/src/main.h index f5603992..2ee60269 100644 --- a/src/main.h +++ b/src/main.h @@ -73,7 +73,7 @@ static const int MAX_SCRIPTCHECK_THREADS = 16; /** -par default (number of script-checking threads, 0 = auto) */ static const int DEFAULT_SCRIPTCHECK_THREADS = 0; /** Number of blocks that can be requested at any given time from a single peer. */ -static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16; +static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 32; /** Timeout in seconds during which a peer must stall block download progress before being disconnected. */ static const unsigned int BLOCK_STALLING_TIMEOUT = 2; /** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends From bed93967cd65acb0ccc104984b2b16d6d29e0c36 Mon Sep 17 00:00:00 2001 From: nzsquirrell Date: Sun, 5 Jun 2016 20:55:12 +1200 Subject: [PATCH 2/3] checkpoint --- src/chainparams.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 0a93e922..064cf235 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -159,9 +159,10 @@ public: (1177283, uint256S("0x000000000000359b1fb371d92db45de64b449ea72863a51fa78fea6b7ff3989f")) (1336174, uint256S("0x00000000000001eafb1051fda69eb842577a0e48e4f0682bd7f33677373d0807")) (1402167, uint256S("0x8215cd9feb2db9bf74514361a9d4b4440f054101079df8bb6bf629065db3ab29")) - (1449500, uint256S("0xef19939e314f239999b9959ac908b20a43b165719d1c35dcfe38ba2566d20765")), - 1446851338, // * UNIX timestamp of last checkpoint block - 4117140, // * total number of transactions between genesis and last checkpoint + (1449500, uint256S("0xef19939e314f239999b9959ac908b20a43b165719d1c35dcfe38ba2566d20765")) + (1681927, uint256S("0x9be88de17bccfa3ceb43d158652189af2c3038460dcf91732320a73557fe6a2e")), + 1465113607, // * UNIX timestamp of last checkpoint block + 4409414, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 2880 // * estimated number of transactions per day after checkpoint }; From 20bcc4d7ba985fffe458835277d01538f31bc61c Mon Sep 17 00:00:00 2001 From: nzsquirrell Date: Sun, 5 Jun 2016 20:56:59 +1200 Subject: [PATCH 3/3] Myriad 0.11.2.1 --- configure.ac | 2 +- src/clientversion.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index bf095eed..72d67e52 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 11) define(_CLIENT_VERSION_REVISION, 2) -define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 1) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2016) AC_INIT([Myriad Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin]) diff --git a/src/clientversion.h b/src/clientversion.h index 688c6755..cd91c504 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,10 +17,10 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 11 #define CLIENT_VERSION_REVISION 2 -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 1 //! Set to true for release, false for prerelease or test build -#define CLIENT_VERSION_IS_RELEASE false +#define CLIENT_VERSION_IS_RELEASE true /** * Copyright year (2009-this)