Commit c97bd2f
committed
eth/protocols/eth: increase maxTxPacketSize from 100 KB to 1 MB for Polygon throughput
Polygon mainnet processes 120M gas/block at 2s block times. At high
utilization (90-100% gas), blocks carry 430-520 KB of transaction data,
with full blocks reaching ~520 KB. The previous 100 KB limit required
5+ sequential p2p messages per peer per full block.
This affected both paths:
- Direct broadcast (full txs to sqrt(peers)): many sequential messages
- GetPooledTransactions responses: peers fetching txs after announcement
could not receive a full block's worth in one response, increasing
round trips for mempool convergence across the wider peer set
1 MB is chosen to:
- Fit any block at current gas limits in a single message
- Provide ~2x headroom over the current full-block maximum (~520 KB),
absorbing a gas limit increase to ~200M without another bump
- Stay at 6.3% of the 16 MB p2p message size limit
- Remain well below the ~15 MB witness messages already exchanged on
this network, keeping head-of-line blocking risk negligible
Note: 512 KB was considered but rejected — full blocks already reach
520 KB, leaving essentially no margin.1 parent 0d6ee4b commit c97bd2f
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
0 commit comments