Skip to content

Attestation processing optimization with batching#8285

Open
hopinheimer wants to merge 20 commits intosigp:unstablefrom
hopinheimer:attestation-optimisation
Open

Attestation processing optimization with batching#8285
hopinheimer wants to merge 20 commits intosigp:unstablefrom
hopinheimer:attestation-optimisation

Conversation

@hopinheimer
Copy link
Member

#8208
Current the implementation follows a naive approach of batching every 50ms, but I do have an idea for greedy batcher which I'll be implementing in following commits.

@michaelsproul michaelsproul added optimization Something to make Lighthouse run more efficiently. beacon-processor Glorious beacon processor, guardian against chaos yet chaotic itself labels Oct 27, 2025
@hopinheimer hopinheimer changed the title Attestation processing optimization with greedy batching Attestation processing optimization with batching Nov 2, 2025
@hopinheimer hopinheimer marked this pull request as ready for review November 2, 2025 22:45
@hopinheimer hopinheimer requested a review from jxs as a code owner November 2, 2025 22:45
@hopinheimer hopinheimer requested a review from eserilev November 2, 2025 22:45
let mut attestations = GossipAttestationBatch::new();
let mut iter = batch_attestation.0.into_iter();

if let Some(first) = iter.next() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it easier to read to do if !is_empty() { let first = batch_attestation.first().expect("not empty") }?

@hopinheimer hopinheimer added the ready-for-review The code is ready for review label Dec 18, 2025
@mergify
Copy link

mergify bot commented Jan 20, 2026

Some required checks have failed. Could you please take a look @hopinheimer? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beacon-processor Glorious beacon processor, guardian against chaos yet chaotic itself optimization Something to make Lighthouse run more efficiently. waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants