Skip to content

[r3.8] cl/phase1/network/registry: let one peer forward a slot's aggregates at once - #25250

Merged
AskAlexSharov merged 1 commit into
release/3.8from
feature/lystopad/r38-aggregate-gossip-rate-limit
Oct 23, 2026
Merged

AskAlexSharov merged 1 commit into
release/3.8from
feature/lystopad/r38-aggregate-gossip-rate-limit

Conversation

@lystopad

Copy link
Copy Markdown
Member

Cherry-pick of #25236 to release/3.8.

The beacon_aggregate_and_proof topic allowed 8 messages per second per peer, with a burst of 16. Aggregates for a slot arrive in a burst, and an aggregate the limiter ignored was also dropped from every other peer because gossipsub had already marked it as seen, so the node lost whole committees. One peer may now forward a whole slot's expected aggregates in one burst (MaxCommitteesPerSlot * TargetAggregatorsPerCommittee), refilled over the slot. Fixes #25235 on release/3.8.

Clean cherry-pick of 2cedbab. go test -race ./cl/phase1/network/registry/ passes; make lint is clean twice; make erigon integration builds. The same change has run on a release/3.8-based mainnet node since 2026-10-22 (see #25236).

…at once (#25236)

Fixes #25235.

The `beacon_aggregate_and_proof` topic allowed 8 messages per second per
peer, with a burst of 16. Aggregates for a slot are published at the
same point in the slot, so peers forward them in bursts. Gossipsub marks
a message as seen before Caplin validates it, so an aggregate the
limiter ignored was also dropped when other peers sent it, and the node
lost whole committees.

One peer may now forward a whole slot's expected aggregates in one burst
(`MaxCommitteesPerSlot * TargetAggregatorsPerCommittee`, 1,024 on
mainnet), refilled over the slot. The other topics' limits are
unchanged.

## Measurement

Mainnet node, pool read 1.4 s into the next slot, 40 slots each:

| | before | after |
|---|---:|---:|
| committees with no aggregate (vs a Lighthouse reference: 0) | 24 | 0 |
| votes in the pool vs finally included | 98.8–99.0% | 99.87% |

## Tests

`TestAggregateAndProofRateLimiterAdmitsSlotBurstFromOnePeer` covers the
mainnet and minimal presets; it fails on the old limit. `make lint` is
clean twice; `make erigon integration` builds.

(cherry picked from commit 2cedbab)
Copilot AI balanced review requested due to automatic review settings October 22, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@lystopad
lystopad requested review from awskii and yperbasis October 22, 2026 19:20
@lystopad lystopad self-assigned this Oct 22, 2026
@lystopad lystopad added the Caplin Caplin: Consensus Layer, Beacon API label Oct 22, 2026

@domiwei domiwei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I compared this branch with 2cedbab (#25236). The added and removed lines are identical. On release/3.8, register.go and register_test.go matched the parent of 2cedbab before the cherry-pick, so the change has the same context there. CI is green (130 passed, 4 skipped).

@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Oct 23, 2026
Merged via the queue into release/3.8 with commit 73e600a Oct 23, 2026
135 checks passed
@AskAlexSharov
AskAlexSharov deleted the feature/lystopad/r38-aggregate-gossip-rate-limit branch October 23, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Caplin Caplin: Consensus Layer, Beacon API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants