Skip to content

Commit

Permalink
Increase the P2P message limits (#2705)
Browse files Browse the repository at this point in the history
## Description

Increase the P2P limits to allow to sync correctly. Previously the
default number of blocks in a batch could have been higher than the
default maximum size. Now the default values for each parameters are
aligned.

(We discovered it with big blocks on various networks)

## Checklist
- [x] Breaking changes are clearly marked as such in the PR description
and changelog
- [x] New behavior is reflected in tests
- [x] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [x] I have reviewed the code myself
- [x] I have created follow-up issues caused by this PR and linked them
here
  • Loading branch information
AurelienFT authored Feb 12, 2025
1 parent c206507 commit a80e427
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

- [2653](https://github.com/FuelLabs/fuel-core/pull/2653): Added cleaner error for wasm-executor upon failed deserialization.
- [2705](https://github.com/FuelLabs/fuel-core/pull/2705): Update the default value for `--max-block-size` and `--max-transmit-size` to 50 MB


## [Version 0.41.6]
Expand Down
2 changes: 1 addition & 1 deletion bin/fuel-core/src/cli/run/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub struct P2PArgs {
#[clap(long = "gossip-heartbeat-interval", default_value = "500ms", env)]
pub gossip_heartbeat_interval: humantime::Duration,

/// The maximum byte size for each gossip (default is 18 MiB)
/// The maximum byte size for each gossip (default is 50 MiB)
#[clap(long = "max-transmit-size", default_value = MAX_RESPONSE_SIZE_STR, env)]
pub max_transmit_size: usize,

Expand Down
2 changes: 1 addition & 1 deletion crates/services/p2p/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const REQ_RES_TIMEOUT: Duration = Duration::from_secs(20);
/// The configuration of the ingress should be the same:
/// - `nginx.org/client-max-body-size`
/// - `nginx.ingress.kubernetes.io/proxy-body-size`
pub const MAX_RESPONSE_SIZE: usize = 18 * 1024 * 1024;
pub const MAX_RESPONSE_SIZE: usize = 50 * 1024 * 1024;

/// Maximum number of blocks per request.
pub const MAX_HEADERS_PER_REQUEST: usize = 100;
Expand Down

0 comments on commit a80e427

Please sign in to comment.