Committee-aware attestation packing (#14245)

* initial algorithm

* ready for review

* feature flag

* typo

* review

* comment fix

* fix TestProposer_sort_DifferentCommittees

* flag usage
This commit is contained in:
Radosław Kapka
2024-08-02 13:53:43 +02:00
committed by GitHub
parent 600ca08aa8
commit 13e09c58f6
6 changed files with 408 additions and 50 deletions

View File

@@ -663,6 +663,18 @@ func TestMaxCover_MaxCover(t *testing.T) {
}},
wantedErr: "empty bitlists: invalid max_cover problem",
},
{
name: "doesn't select bitlist which is a subset of another bitlist",
args: args{k: 3, allowOverlaps: true, candidates: []*bitfield.Bitlist64{
bitfield.NewBitlist64From([]uint64{0b00011100}),
bitfield.NewBitlist64From([]uint64{0b00011110}),
bitfield.NewBitlist64From([]uint64{0b00000001}),
}},
want: &BitSetAggregation{
Coverage: bitfield.NewBitlist64From([]uint64{0b00011111}),
Keys: []int{1, 2},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {