Skip to content

Include SingleAttestation when producing block #8028

@twoeths

Description

@twoeths

Problem description

right now we have AttestationPool of SingleAttestation and AggregatedAttestationPool of aggregated Attestation. When producing block, we only query AggregatedAttestationPool. We should also scan through AttestationPool so that:

  • lodestar has more attestations in its produced block, that brings more consensus value produced
  • it's easier to identify lodestar block

cc @nflaig

Solution description

  • enhance AttestationPool so that it does not only preaggregate attestations but also store validated SingleAttestation instances
    • index by committeeValidatorIndex so that it's easier to query
  • when producing block:
    • loop through slots
    • for each slot, loop through att_data of both pools. Make sure all att_data pass validation in order not to include conflicted attestations
    • for each att_data, loop through committee index
    • merge data from both pools in getAttestationsForBlockElectra

Additional context

Note:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions