Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attestation Processing Performance Bottleneck - [Phase0] #409

Open
EchoAlice opened this issue Nov 11, 2024 · 0 comments
Open

Attestation Processing Performance Bottleneck - [Phase0] #409

EchoAlice opened this issue Nov 11, 2024 · 0 comments

Comments

@EchoAlice
Copy link
Contributor

EchoAlice commented Nov 11, 2024

Description

epoch_processing::get_inclusion_delay_deltas() creates a significant performance bottleneck in state_transition(). At slot 3,200, processing takes ~3.92 days due to inefficient attestation iteration.

Impact

  • Blocks epoch boundary processing
  • Affects validator reward calculations
  • Prevents timely consensus

Current Implementation

// O(validators × pending_attestations)
for validator in unslashed_validators {
    for attestation in pending_attestations {
        // Process attestations
    }
}

Metrics

(at slot 3,200)

  • 20,488 validators
  • 225 pending attestations
  • 4.6M attestation batches
  • 73.5ms per batch

0.0735 x 4,600,000 = ~3.92 days

Proposed Solution

Restructure to single-pass attestation processing.

@EchoAlice EchoAlice changed the title Optimize attestation processing for rewards Attestation Processing Performance Bottleneck - [Phase0] Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant