ethereum / trin

An Ethereum portal client: a json-rpc server with nearly instant sync, and low CPU & storage usage
356 stars 109 forks source link

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

Open carver opened 11 months ago

carver commented 11 months ago

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

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 180 days with no activity.