From 770341a2532baa10ebc7e0f6b785d9ee8ce45366 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 7 Jul 2025 15:47:12 +0000 Subject: [PATCH] interface: increase default config.NETWORK_MAX_INCOMING_MSG_SIZE ref https://github.com/spesmilo/electrumx/commit/2969ab110412bebddc3f3e815467fb59538b613d ref https://github.com/spesmilo/electrumx/commit/a704a68f7fbc43de777356c9e4f74964e0e8af1d --- electrum/simple_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/simple_config.py b/electrum/simple_config.py index 4f83abfc3..971f17ab4 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -643,7 +643,11 @@ class SimpleConfig(Logger): NETWORK_OFFLINE = ConfigVar('offline', default=False, type_=bool) NETWORK_SKIPMERKLECHECK = ConfigVar('skipmerklecheck', default=False, type_=bool) NETWORK_SERVERFINGERPRINT = ConfigVar('serverfingerprint', default=None, type_=str) - NETWORK_MAX_INCOMING_MSG_SIZE = ConfigVar('network_max_incoming_msg_size', default=1_000_000, type_=int) # in bytes + NETWORK_MAX_INCOMING_MSG_SIZE = ConfigVar('network_max_incoming_msg_size', default=8_100_000, type_=int) # in bytes + # ^ the default is chosen so that the largest consensus-valid tx fits in a JSON-RPC message. + # (so that if we request a tx from the server, we won't reject the response) + # For Bitcoin, that is 4 M weight units, i.e. 4 MB on the p2p wire. + # Double that due to our JSON-RPC hex-encoding, plus overhead, that's 8+ MB. NETWORK_TIMEOUT = ConfigVar('network_timeout', default=None, type_=int) NETWORK_BOOKMARKED_SERVERS = ConfigVar('network_bookmarked_servers', default=None)