Skip to content

Maximum clique enumeration for attestation aggregation in op pool #3733

@michaelsproul

Description

@michaelsproul

Description

Presently Lighthouse uses an opportunistic strategy for aggregating attestations added to the op pool. Any new attestation which can be aggregated with an existing one will be aggregated here:

// Greedily aggregate the attestation with all existing attestations.
// NOTE: this is sub-optimal and in future we will remove this in favour of max-clique
// aggregation.
let mut aggregated = false;
for existing_attestation in attestations.iter_mut() {
if existing_attestation.signers_disjoint_from(&indexed) {
existing_attestation.aggregate(&indexed);
aggregated = true;
} else if *existing_attestation == indexed {
aggregated = true;
}
}

In our collaboration with Satalia they prototyped a maximum clique enumeration algorithm for doing optimal aggregation. This issue is about adopting that optimal aggregation algorithm, while keeping our greedy algorithm for max coverage.

If you're interested in working on this issue DM me and I can provide a copy of the code written by Satalia. They wrote a pure Rust implementation of the Bron-Kerbosch algorithm which showed good performance during testing.

We would need to overhaul how we handle unaggregated attestations in the naive_aggregation_pool so that we keep single attestations unaggregated. This might be somewhat delicate.

Version

Lighthouse v3.2.1

Metadata

Metadata

Labels

backlogPR is not currently prioritizedoptimizationSomething to make Lighthouse run more efficiently.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions