Repository navigation
fix(p2p): bound envelopes-by-range answers by bytes and read them as they are sent - #968
Conversation
…they are sent Backport of #956 to release/v2.0.0, taken from the PR's head (36232dc) before it merged on main: its ten commits as one, with #958's by-root counterpart, which was merged into its branch. - An envelopes-by-range answer stops once 16 MiB of SSZ has gone out. It always carries the first envelope its window has, and what it sends is a prefix of the window in slot order. - Envelopes are read as they are sent. The store plans the window without touching the envelope table, and the codec reads each row just before writing its chunk, so the answer is never in memory whole. A row that fails to read or decode ends the answer where it is. - The requester asks the same peer again after an answer that stops short, for up to 30 s from the batch's first request. - Envelopes-by-root answers are bounded and read the same way.
|
Review of Antigravity:
• Exact patch match: git patch-id --stable between #956 (36232dc, currently in main's merge queue) and #968 (10e9dd5) is identical ──────
Neither blocks #968 for v2.0.0-rc.2 — #968 is ready to merge once #956 lands on main. |
🗒️ Description / Motivation
Backport of #956 to
release/v2.0.0, forv2.0.0-rc.2.#956 is approved and not merged on
mainyet, so this is taken from its head (36232dcf) and not from a squash commit onmain. If #956 changes before it merges, this branch has to be refreshed from the new head.What Changed
The ten commits of #956 as one commit on top of
release/v2.0.0(3ed99c86): the diff from its branch point onmain(e48246f8) to its head (36232dcf), applied withgit apply --3way. It applied without conflicts and nothing was edited by hand. That includes #958, the by-root counterpart, which was merged into #956's branch.What it does, from #956:
execution_payload_envelopes_by_rangeanswer stops once 16 MiB of SSZ has gone out, always carrying the first envelope its window has. Before, one request could make the node load and send about 1 GiB.execution_payload_envelopes_by_rootanswers are bounded and read the same way (fix(p2p): bound envelopes-by-root answers by bytes and read them as they are sent #958).Tests Added / Run
On this branch:
cargo fmt --all -- --checkandmake lint: clean.cargo test -p ethlambda-p2p --profile release-fast --lib: 587 passed, 0 failed, 1 ignored.cargo test -p ethlambda-storage --profile release-fast --features rocksdb: 256 passed, 0 failed, 2 ignored.Not run locally: the rest of
make test.Related Issues / PRs
main), with fix(p2p): bound envelopes-by-root answers by bytes and read them as they are sent #958.git merge-tree), though it sharescrates/net/p2p/src/lib.rs,CLAUDE.mdanddocs/beacon_wire.mdwith some of them.