Skip to content

The DevP2P spec implementation of client MemPool related messages is inconsistent #32836

@1033309821

Description

@1033309821

We conducted additional testing on the NewPooledTransactionHashes and GetPooledTransactions messages, following the DevP2P spec's design in detail.
NewPooledTransactionHashes: The Ethereum P2P protocol specifies a soft limit of 4096 items for the NewPooledTransactionHashes message. If 5000 transaction hashes are sent, a compliant node should only request the first 4096, not all 5000. We compared the "number sent" with the "number requested" to determine whether the node correctly enforced the soft limit.

The recommended soft limit for this message is 4096 items (~150 KiB).

Client 4096 items 5000 items 8192 items Status
geth 256 (100%) 256 ( 5%) 256 ( 3%) ⚠ Partial (limit=256)
nethermind 0 (100%) 904 ( 18%) 1078 ( 13%) ⚠ Partial (limit=1078)
reth 1380 (100%) 1380 ( 28%) 1379 ( 17%) ⚠ Partial (limit=1379)
erigon 4096 (100%) 5000 (100%) 8192 (100%) ❌ Not enforced
besu 256 (100%) 256 ( 5%) 256 ( 3%) ⚠ Partial (limit=256)

GetPooledTransactions: Geth and Reth do not implement the soft limit of 256 messages per transaction in GetPooledTransactions.
Besu and Erigon implement this soft limit.
Nethermind will not enter the mempool due to non-compliant nonce. Currently, there is no better way to test the preconditions to verify that this soft limit is met.

The recommended soft limit for GetPooledTransactions requests is 256 hashes (8 KiB).

Env
We use kurtosis's ethereum-package for testing, and the relevant configuration is as follows:

// The ethereum-package network-para.yaml
participants:
  - el_type: geth V1.16.2
    cl_type: lighthouse V7.0.1
  - el_type: nethermind V1.33.0
    cl_type: lighthouse V7.0.1
  - el_type: reth V1.6.0
    cl_type: lighthouse V7.0.1
  - el_type: besu V25.8.0
    cl_type: lighthouse V7.0.1
  - el_type: erigon V3.0.15
    cl_type: lighthouse V7.0.1
additional_services:
  - dora

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions