diff --git a/src/net.h b/src/net.h index 77649247d9..8e96b3f351 100644 --- a/src/net.h +++ b/src/net.h @@ -55,7 +55,7 @@ static const int FEELER_INTERVAL = 120; /** The maximum number of addresses from our addrman to return in response to a getaddr message. */ static constexpr size_t MAX_ADDR_TO_SEND = 1000; /** Maximum length of incoming protocol messages (no message over 4 MB is currently acceptable). */ -static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1000 * 1000; +static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 16 * 1000 * 1000; /** Maximum length of the user agent string in `version` message */ static const unsigned int MAX_SUBVERSION_LENGTH = 256; /** Maximum number of automatic outgoing nodes over which we'll relay everything (blocks, tx, addrs, etc) */ diff --git a/test/bitcoin_functional/functional/p2p_invalid_messages.py b/test/bitcoin_functional/functional/p2p_invalid_messages.py index 700fdf6e04..d30900eba3 100755 --- a/test/bitcoin_functional/functional/p2p_invalid_messages.py +++ b/test/bitcoin_functional/functional/p2p_invalid_messages.py @@ -52,7 +52,7 @@ class InvalidMessagesTest(BitcoinTestFramework): node.add_p2p_connection(P2PDataStore()) conn2 = node.add_p2p_connection(P2PDataStore()) - msg_limit = 4 * 1000 * 1000 # 4MB, per MAX_PROTOCOL_MESSAGE_LENGTH + msg_limit = 16 * 1000 * 1000 # 16MB, per MAX_PROTOCOL_MESSAGE_LENGTH valid_data_limit = msg_limit - 5 # Account for the 4-byte length prefix # diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 4f20a35af9..5ab764845c 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -46,7 +46,7 @@ MAX_MONEY = 21000000 * COIN BIP125_SEQUENCE_NUMBER = 0xfffffffd # Sequence number that is BIP 125 opt-in and BIP 68-opt-out -MAX_PROTOCOL_MESSAGE_LENGTH = 4000000 # Maximum length of incoming protocol messages +MAX_PROTOCOL_MESSAGE_LENGTH = 16 * 1000 * 1000 # Maximum length of incoming protocol messages MAX_HEADERS_RESULTS = 2000 # Number of headers sent in one getheaders result MAX_INV_SIZE = 50000 # Maximum number of entries in an 'inv' protocol message