Skip to content

Commit b14b766

Browse files
authored
Caplin: Inclusion of VoluntaryExits, AttesterSlashings, ProposerSlashings, BlsExecutionToChanges and Attestations into block production (#10071)
This PR add operations inclusion. ## Normal operations * BlsExecutionChange * VoluntaryExit * Slashings Each of these operations blacklist the index they work on so we do not have repeating indices for the same operations twice. we assume all signatures are pre-validated and just see if it is a good time to produce a block with them (by looking at their slot) ## Aggregated Attestations There is a lot of trash attestations on the network so we separate our algorithm in 3 steps: ### Eligibility We iterate over the entire pool of accumulated attestations and filter out all attestations who cannot be included at the current slot, and compute their expected reward. (filter out if 0). ### Ranking We rank the `Attestation`s by their expected reward (we just sort the array of candidates) by expected reward in ascending order. ### Filtering by superset We may have some supersets left-over, filter attestation which ends up being supersets of other. this process is done from highest reward down to lowest reward.
1 parent 00850e0 commit b14b766

File tree

4 files changed

+637
-106
lines changed

4 files changed

+637
-106
lines changed

cl/aggregation/pool_impl.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ func NewAggregationPool(
4747
}
4848

4949
func (p *aggregationPoolImpl) AddAttestation(inAtt *solid.Attestation) error {
50-
// check if it's single attestation
51-
if utils.BitsOnCount(inAtt.AggregationBits()) != 1 {
52-
return fmt.Errorf("exactly one aggregation bit should be set")
53-
}
54-
5550
// use hash of attestation data as key
5651
hashRoot, err := inAtt.AttestantionData().HashSSZ()
5752
if err != nil {

0 commit comments

Comments
 (0)