From 072aa469e3cf02d7984cfa918117f37ffb1e333c Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 21 May 2023 15:21:04 +0100 Subject: [PATCH 1/5] Reduce default minBlockchainPeers to 3, ahead of the upcoming reshape. --- src/main/java/org/qortal/settings/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/settings/Settings.java b/src/main/java/org/qortal/settings/Settings.java index a87a72f4..564dfaf9 100644 --- a/src/main/java/org/qortal/settings/Settings.java +++ b/src/main/java/org/qortal/settings/Settings.java @@ -201,7 +201,7 @@ public class Settings { /** Whether to attempt to open the listen port via UPnP */ private boolean uPnPEnabled = true; /** Minimum number of peers to allow block minting / synchronization. */ - private int minBlockchainPeers = 5; + private int minBlockchainPeers = 3; /** Target number of outbound connections to peers we should make. */ private int minOutboundPeers = 16; /** Maximum number of peer connections we allow. */ From 648fa66f6a4ce0b8cc11ea22d95d11e76d966b3a Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 21 May 2023 15:22:00 +0100 Subject: [PATCH 2/5] Increased default maxPeers to 40. --- src/main/java/org/qortal/settings/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/settings/Settings.java b/src/main/java/org/qortal/settings/Settings.java index 564dfaf9..eec2aa80 100644 --- a/src/main/java/org/qortal/settings/Settings.java +++ b/src/main/java/org/qortal/settings/Settings.java @@ -205,7 +205,7 @@ public class Settings { /** Target number of outbound connections to peers we should make. */ private int minOutboundPeers = 16; /** Maximum number of peer connections we allow. */ - private int maxPeers = 36; + private int maxPeers = 40; /** Number of slots to reserve for short-lived QDN data transfers */ private int maxDataPeers = 4; /** Maximum number of threads for network engine. */ From 3c4c5a1457bd5e2a65d0c2554299869d12590e85 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 21 May 2023 15:22:24 +0100 Subject: [PATCH 3/5] Default minPeerVersion set to 4.0.0 --- src/main/java/org/qortal/settings/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/settings/Settings.java b/src/main/java/org/qortal/settings/Settings.java index eec2aa80..018c1e29 100644 --- a/src/main/java/org/qortal/settings/Settings.java +++ b/src/main/java/org/qortal/settings/Settings.java @@ -219,7 +219,7 @@ public class Settings { public long recoveryModeTimeout = 10 * 60 * 1000L; /** Minimum peer version number required in order to sync with them */ - private String minPeerVersion = "3.8.7"; + private String minPeerVersion = "4.0.0"; /** Whether to allow connections with peers below minPeerVersion * If true, we won't sync with them but they can still sync with us, and will show in the peers list * If false, sync will be blocked both ways, and they will not appear in the peers list */ From b1a904a3c7e359bdd64b30bd282002c7866f65d2 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 21 May 2023 15:26:49 +0100 Subject: [PATCH 4/5] MIN_PEER_VERSION set to 4.0.0 --- src/main/java/org/qortal/network/Handshake.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/network/Handshake.java b/src/main/java/org/qortal/network/Handshake.java index 47752767..4500cd59 100644 --- a/src/main/java/org/qortal/network/Handshake.java +++ b/src/main/java/org/qortal/network/Handshake.java @@ -265,7 +265,7 @@ public enum Handshake { private static final long PEER_VERSION_131 = 0x0100030001L; /** Minimum peer version that we are allowed to communicate with */ - private static final String MIN_PEER_VERSION = "3.8.2"; + private static final String MIN_PEER_VERSION = "4.0.0"; private static final int POW_BUFFER_SIZE_PRE_131 = 8 * 1024 * 1024; // bytes private static final int POW_DIFFICULTY_PRE_131 = 8; // leading zero bits From 3763035d4a0864b8b82c8cedb68bdb0ceaf178f9 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 21 May 2023 15:34:27 +0100 Subject: [PATCH 5/5] Default recoveryModeTimeout increased to 24 hours for now. It doesn't quite work as intended, so it's best that it doesn't interfere right away. 24 hours should be long enough for any issues to be manually resolved. --- src/main/java/org/qortal/settings/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/settings/Settings.java b/src/main/java/org/qortal/settings/Settings.java index 018c1e29..2449e34a 100644 --- a/src/main/java/org/qortal/settings/Settings.java +++ b/src/main/java/org/qortal/settings/Settings.java @@ -216,7 +216,7 @@ public class Settings { private int maxRetries = 2; /** The number of seconds of no activity before recovery mode begins */ - public long recoveryModeTimeout = 10 * 60 * 1000L; + public long recoveryModeTimeout = 24 * 60 * 60 * 1000L; /** Minimum peer version number required in order to sync with them */ private String minPeerVersion = "4.0.0";