Increase network limits (#2796)

Fix max packet sizes

Fix max_payload_size function

Add merge block test

Fix max size calculation; fix up test

Clear comments

Add a payload_size_function

Use safe arith for payload calculation

Return an error if block too big in block production

Separate test to check if block is over limit
This commit is contained in:
pawan
2021-11-09 10:42:02 -06:00
committed by Paul Hauner
parent afe59afacd
commit 44a7b37ce3
14 changed files with 268 additions and 46 deletions

View File

@@ -17,7 +17,7 @@ use std::time::Duration;
use types::{ForkContext, ForkName};
/// The maximum transmit size of gossip messages in bytes.
pub const GOSSIP_MAX_SIZE: usize = 1_048_576;
pub const GOSSIP_MAX_SIZE: usize = 10 * 1_048_576; // 10M
/// This is a constant to be used in discovery. The lower bound of the gossipsub mesh.
pub const MESH_N_LOW: usize = 6;