Skip to content

Commit 0f1509c

Browse files
committed
Correct time settings , Return support old protocol versions for old solutions from BTC. Fix setting test network. Fix testnetwork ports. pump version.
Correct time settings Return support old protocol versions for old solutions from BTC. Fix setting test network. Fix testnetwork ports. pump version. I recommend update to this version if you need old node for out dated software. Otherwise upgrade to the latest version based on 24.0.1
1 parent 7130ee7 commit 0f1509c

File tree

9 files changed

+43
-32
lines changed

9 files changed

+43
-32
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
AC_PREREQ([2.69])
22
define(_CLIENT_VERSION_MAJOR, 0)
33
define(_CLIENT_VERSION_MINOR, 21)
4-
define(_CLIENT_VERSION_REVISION, 3)
4+
define(_CLIENT_VERSION_REVISION, 4)
55
define(_CLIENT_VERSION_BUILD, 0)
66
define(_CLIENT_VERSION_RC, 0)
77
define(_CLIENT_VERSION_IS_RELEASE, true)

doc/man/bitweb-qt.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Relay non\-P2SH multisig (default: 1)
287287
\fB\-port=\fR<port>
288288
.IP
289289
Listen for connections on <port>. Nodes not using the default ports
290-
(default: 8333, testnet: 18333, signet: 38333, regtest: 18444)
290+
(default: 1604, testnet: 11604, signet: 31604, regtest: 18444)
291291
are unlikely to get incoming connections.
292292
.HP
293293
\fB\-proxy=\fR<ip:port>

doc/man/bitwebd.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Relay non\-P2SH multisig (default: 1)
287287
\fB\-port=\fR<port>
288288
.IP
289289
Listen for connections on <port>. Nodes not using the default ports
290-
(default: 8333, testnet: 18333, signet: 38333, regtest: 18444)
290+
(default: 1604, testnet: 11604, signet: 31604, regtest: 18444)
291291
are unlikely to get incoming connections.
292292
.HP
293293
\fB\-proxy=\fR<ip:port>

share/examples/bitcoin.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# Listening mode, enabled by default except when 'connect' is being used
6161
#listen=1
6262

63-
# Port on which to listen for connections (default: 1604, testnet: 18333, signet: 38333, regtest: 18444)
63+
# Port on which to listen for connections (default: 1604, testnet: 18333, signet: 31604, regtest: 18444)
6464
#port=
6565

6666
# Maximum number of inbound+outbound connections.

share/examples/bitweb.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# Listening mode, enabled by default except when 'connect' is being used
6161
#listen=1
6262

63-
# Port on which to listen for connections (default: 1604, testnet: 18333, signet: 38333, regtest: 18444)
63+
# Port on which to listen for connections (default: 1604, testnet: 18333, signet: 31604, regtest: 18444)
6464
#port=
6565

6666
# Maximum number of inbound+outbound connections.

src/chain.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* Maximum amount of time that a block timestamp is allowed to exceed the
2121
* current network-adjusted time before the block will be accepted.
2222
*/
23-
static constexpr int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60;
23+
static constexpr int64_t MAX_FUTURE_BLOCK_TIME = 60 * 5; // = ~ Block time * N param (90) / 20
2424

2525
/**
2626
* Timestamp window used as a grace period by code that compares external
@@ -36,7 +36,7 @@ static constexpr int64_t TIMESTAMP_WINDOW = MAX_FUTURE_BLOCK_TIME;
3636
*
3737
* Ref: https://github.com/bitcoin/bitcoin/pull/1026
3838
*/
39-
static constexpr int64_t MAX_BLOCK_TIME_GAP = 90 * 60;
39+
static constexpr int64_t MAX_BLOCK_TIME_GAP = 50 * 3; // = MAX_FUTURE_BLOCK_TIME / 2
4040

4141
class CBlockFileInfo
4242
{

src/chainparams.cpp

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CMainParams : public CChainParams {
8181
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].bit = 2;
8282
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nStartTime = 1621060007; // Saturday, 15 May 2021
8383
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1622356007; // Sunday, 30 May 2021
84-
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
84+
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 26208; // No activation delay
8585

8686
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000468939a4a704");
8787
consensus.defaultAssumeValid = uint256S("0x0000040a3e7b559aea417d3f886c0e8fe69f1f0530800424b9ea739b1f2c8498"); // 939796
@@ -129,7 +129,17 @@ class CMainParams : public CChainParams {
129129
checkpointData = {
130130
{
131131
{0, uint256S("0x00043e9c6bc54d9bd266c3767a83a7b9da435dd7f84e485a2bf2a869be62f1f3")},
132+
{1, uint256S("0x001d498cbcd92d9b36fee933caf1551dd457bf710ec988e033faca697aff6a90")},
133+
{15, uint256S("0x0013c1537f3c4984241c3c5b93d894dfef491eef0b82d87a5b7d0edf65961a41")},
134+
{31, uint256S("0x000c6f6a7e9478859051e24eaaa0aec508583bc1fc262108804479be5c557d74")},
135+
{47, uint256S("0x001c6020b3d984739d307fa9f2adb897339449c23dbe78bb50fc365daf41b704")},
136+
{63, uint256S("0x00015b10a4a824ad4751c64d4027c82219f312c40f1aff2e9248355a8707347f")},
137+
{79, uint256S("0x00001f6f577a1f232a117a8f16f4efb93fc1407fbec156ac1fea7d621db84ed8")},
138+
{89, uint256S("0x0001f2ee3cafa3a390d5f8f368e1296b4fbf55719c10d170223df30b9836cf5b")},
139+
{90, uint256S("0x00023c2933e8069729e6d568038ea070f5c50a07145ca960e8e21a53e0640e26")},
140+
{97, uint256S("0x00046f205cad5e5085a939194e308d9569553d435f0fe1e3a13c99b0d34f76b1")},
132141
{662, uint256S("0x00021b08ddf59cd9d9e396ef46c6d57644b3aac7977d271c966f66b63df45dd1")},
142+
{2000, uint256S("0x000002bf997a02b3e403c8ce9a87699127864e344ed966b03be16e14e5662cf5")},
133143
{9074, uint256S("0x0000007e1d70d529752b87fe47f979ae5f8f27bbc987dd0c8b21c9c5a6f3099b")},
134144
{12167, uint256S("0x0000006fa4023de2a1d4bd712e7d7aafa15a273f6c78b32bd87185846e0cc903")},
135145
{606942, uint256S("0x0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a")},
@@ -157,15 +167,15 @@ class CTestNetParams : public CChainParams {
157167
consensus.signet_challenge.clear();
158168
consensus.nSubsidyHalvingInterval = 840000;
159169
consensus.BIP16Exception = uint256S("0x00002a542f15e4f95e6256e5fc37532ad965e5874b4f5c4aaab75c792f184f63");
160-
consensus.BIP34Height = 0;
170+
consensus.BIP34Height = 17;
161171
consensus.BIP34Hash = uint256S("0x00002a542f15e4f95e6256e5fc37532ad965e5874b4f5c4aaab75c792f184f63");
162-
consensus.BIP65Height = 0; // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6
163-
consensus.BIP66Height = 0; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
164-
consensus.CSVHeight = 0; // 00000000025e930139bac5c6c31a403776da130831ab85be56578f3fa75369bb
165-
consensus.SegwitHeight = 0; // 00000000002b980fcd729daaa248fd9316a5200e9b367f4ff2c42453e84201ca
166-
consensus.MinBIP9WarningHeight = 0; // segwit activation height + miner confirmation window
172+
consensus.BIP65Height = 1; // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6
173+
consensus.BIP66Height = 1; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
174+
consensus.CSVHeight = 1; // 00000000025e930139bac5c6c31a403776da130831ab85be56578f3fa75369bb
175+
consensus.SegwitHeight = 1; // 00000000002b980fcd729daaa248fd9316a5200e9b367f4ff2c42453e84201ca
176+
consensus.MinBIP9WarningHeight = 1441; // segwit activation height + miner confirmation window
167177
consensus.powLimit = uint256S("3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
168-
consensus.nPowTargetTimespan = 24 * 60 * 60; // two weeks
178+
consensus.nPowTargetTimespan = 60 * 60; // two weeks
169179
consensus.nPowTargetSpacing = 60;
170180
consensus.nZawyLwmaAveragingWindow = 90;
171181
consensus.fPowAllowMinDifficultyBlocks = true;
@@ -190,7 +200,7 @@ class CTestNetParams : public CChainParams {
190200
pchMessageStart[1] = 0xbe;
191201
pchMessageStart[2] = 0xdc;
192202
pchMessageStart[3] = 0xfe;
193-
nDefaultPort = 29706;
203+
nDefaultPort = 11604;
194204
nPruneAfterHeight = 1000;
195205
m_assumed_blockchain_size = 10;
196206
m_assumed_chain_state_size = 2;
@@ -203,7 +213,7 @@ class CTestNetParams : public CChainParams {
203213
vFixedSeeds.clear();
204214
vSeeds.clear();
205215
// nodes with support for servicebits filtering should be at the top
206-
vSeeds.emplace_back("seed1.bitwebcore.net");
216+
vSeeds.emplace_back("seedtestnet.bitwebcore.net");
207217

208218
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,66);
209219
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
@@ -246,9 +256,10 @@ class SigNetParams : public CChainParams {
246256

247257
if (!args.IsArgSet("-signetchallenge")) {
248258
bin = ParseHex("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae");
249-
vSeeds.emplace_back("seed.bitwebcore.net");
250-
vSeeds.emplace_back("seed2.bitwebcore.net");
251-
vSeeds.emplace_back("seed3.bitwebcore.net");
259+
vSeeds.emplace_back("signet.bitwebcore.net");
260+
vSeeds.emplace_back("seedsig.bitwebcore.net");
261+
vSeeds.emplace_back("seedsig1.bitwebcore.net");
262+
vSeeds.emplace_back("seedsig2.bitwebcore.net");
252263

253264
consensus.nMinimumChainWork = uint256S("0x00");
254265
consensus.defaultAssumeValid = uint256S("0x00");
@@ -294,7 +305,7 @@ class SigNetParams : public CChainParams {
294305
consensus.BIP66Height = 1;
295306
consensus.CSVHeight = 1;
296307
consensus.SegwitHeight = 1;
297-
consensus.nPowTargetTimespan = 24 * 60 * 60; // two weeks
308+
consensus.nPowTargetTimespan = 60 * 60; // two weeks
298309
consensus.nPowTargetSpacing = 60;
299310
consensus.nZawyLwmaAveragingWindow = 90;
300311
consensus.fPowAllowMinDifficultyBlocks = false;
@@ -320,7 +331,7 @@ class SigNetParams : public CChainParams {
320331
uint256 hash = h.GetHash();
321332
memcpy(pchMessageStart, hash.begin(), 4);
322333

323-
nDefaultPort = 38333;
334+
nDefaultPort = 31604;
324335
nPruneAfterHeight = 1000;
325336

326337
genesis = CreateGenesisBlock(1619971765, 18156, 0x1e3fffff, 1, 50 * COIN);
@@ -356,15 +367,15 @@ class CRegTestParams : public CChainParams {
356367
consensus.signet_challenge.clear();
357368
consensus.nSubsidyHalvingInterval = 150;
358369
consensus.BIP16Exception = uint256();
359-
consensus.BIP34Height = 0; // BIP34 activated on regtest (Used in functional tests)
370+
consensus.BIP34Height = 1; // BIP34 activated on regtest (Used in functional tests)
360371
consensus.BIP34Hash = uint256();
361-
consensus.BIP65Height = 0; // BIP65 activated on regtest (Used in functional tests)
362-
consensus.BIP66Height = 0; // BIP66 activated on regtest (Used in functional tests)
372+
consensus.BIP65Height = 1; // BIP65 activated on regtest (Used in functional tests)
373+
consensus.BIP66Height = 1; // BIP66 activated on regtest (Used in functional tests)
363374
consensus.CSVHeight = 1; // CSV activated on regtest (Used in rpc activation tests)
364-
consensus.SegwitHeight = 1; // SEGWIT is always activated on regtest unless overridden
365-
consensus.MinBIP9WarningHeight = 1;
375+
consensus.SegwitHeight = 0; // SEGWIT is always activated on regtest unless overridden
376+
consensus.MinBIP9WarningHeight = 0;
366377
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
367-
consensus.nPowTargetTimespan = 24 * 60 * 60; // two weeks
378+
consensus.nPowTargetTimespan = 60 * 60; // two weeks
368379
consensus.nPowTargetSpacing = 60;
369380
consensus.nZawyLwmaAveragingWindow = 90;
370381
consensus.fPowAllowMinDifficultyBlocks = true;
@@ -389,7 +400,7 @@ class CRegTestParams : public CChainParams {
389400
pchMessageStart[1] = 0xce;
390401
pchMessageStart[2] = 0xba;
391402
pchMessageStart[3] = 0xde;
392-
nDefaultPort = 39706;
403+
nDefaultPort = 18444;
393404
nPruneAfterHeight = 1000;
394405
m_assumed_blockchain_size = 0;
395406
m_assumed_chain_state_size = 0;

src/timedata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <stdint.h>
1111
#include <vector>
1212

13-
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60;
13+
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 60 * 12; // Block time * 12
1414

1515
class CNetAddr;
1616

src/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
* network protocol versioning
1010
*/
1111

12-
static const int PROTOCOL_VERSION = 70019;
12+
static const int PROTOCOL_VERSION = 70020;
1313

1414
//! initial proto version, to be increased after version/verack negotiation
1515
static const int INIT_PROTO_VERSION = 209;
1616

1717
//! disconnect from peers older than this proto version
18-
static const int MIN_PEER_PROTO_VERSION = 70018;
18+
static const int MIN_PEER_PROTO_VERSION = 31800;
1919

2020
//! BIP 0031, pong message, is enabled for all versions AFTER this one
2121
static const int BIP0031_VERSION = 60000;

0 commit comments

Comments
 (0)