Skip to content

feat: make devp2p MAX_MESSAGE_SIZE configurable #22302

@rezzmah

Description

@rezzmah

Describe the feature

Problem

MAX_MESSAGE_SIZE is hardcoded to 10MB in reth-eth-wire-types

pub const MAX_MESSAGE_SIZE: usize = 10 * 1024 * 1024;

pub const MAX_MESSAGE_SIZE: usize = 10 * 1024 * 1024;

On custom chains with large blocks, the bodies downloader's GetBlockBodies requests produce responses that exceed this limit. The
receiving node rejects them with MessageTooBig, kills the session and results in the requester having no peers.

Our team observed this at ~2ggas / ~30k txs in a block

The downloader_request_limit in reth.toml can reduce batch size as a workaround but it doesn't work if individual blocks are larger than 10mb

LMK if it makes sense and I can make a PR

Additional context

We tested modifying the hardcoded 10mb value in place and that recovered the stalled node

Metadata

Metadata

Assignees

Labels

A-devp2pRelated to the Ethereum P2P protocolC-enhancementNew feature or request

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions