Skip to content

Commit

Permalink
hotfix: bump maximum handshake message size to 64MiB
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed Apr 20, 2023
1 parent d970c2f commit b8a0c9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/messages/src/helpers/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ use core::marker::PhantomData;
use tokio_util::codec::{Decoder, Encoder, LengthDelimitedCodec};

/// The maximum size of a message that can be transmitted during the handshake.
const MAXIMUM_HANDSHAKE_MESSAGE_SIZE: usize = 1024 * 1024; // 1 MiB
// TODO: this is large due to block locators sent by validators; restrict it.
const MAXIMUM_HANDSHAKE_MESSAGE_SIZE: usize = 64 * 1024 * 1024; // 64 MiB

/// The maximum size of a message that can be transmitted in the network.
const MAXIMUM_MESSAGE_SIZE: usize = 128 * 1024 * 1024; // 128 MiB
Expand Down

0 comments on commit b8a0c9b

Please sign in to comment.