ethereum / ethereum/trin

perf: fit ~20% more data into each utp packet

Open
#910 1 comment 0 reactions 0 assignees View on GitHub
shelf-stable
Dominant language
Rust
Stars
441
Forks
149
PR merge metrics
No merged PRs in 30d

Description

See a discussion of how high the `max_packet_size` could go:
https://github.com/ethereum/trin/pull/767#discussion_r1220177297

Here is some discussion internal to discv5, with an example of calculating a max packet size:
https://github.com/sigp/discv5/blob/d2e30e04ee62418b9e57278cee907c02b99d5bd1/src/service.rs#L1054-L1067

Another fairly reasonable approach to this would be to set the packet size too high on a local build, and look out for this warning log:
https://github.com/sigp/discv5/blob/d2e30e04ee62418b9e57278cee907c02b99d5bd1/src/socket/send.rs#L67-L68

Then we can reduce the max size to not trigger that warning.

---

All of this work will probably have a limited lifetime, since we plan to switch to use this at some point: https://github.com/ethereum/devp2p/issues/229

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the current max_packet_size setting and read the linked trin discussion, discv5 calculation, and send.rs warning. Test a higher local packet size, then reduce it until the warning no longer appears; done means fitting more data without triggering that warning, while noting the planned future switch described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.