Eip 7549 core (#14037)

* interfaces move

* build fix

* remove annoying warning

* more build fixes

* review

* core code

* tests part 1

* tests part 2

* TranslateParticipation doesn't need Electra

* remove unused function

* pending atts don't need Electra

* tests part 3

* build fixes

* review

* remove newline

* review

* fix test
This commit is contained in:
Radosław Kapka
2024-05-28 22:56:36 +09:00
committed by GitHub
parent 2f2152e039
commit 2d15e53dab
35 changed files with 924 additions and 236 deletions

View File

@@ -122,10 +122,18 @@ func generateMarshalledFullStateAndBlock() error {
var atts []*ethpb.Attestation
for i := slotOffset + 1; i < slotsPerEpoch+slotOffset; i++ {
attsForSlot, err := util.GenerateAttestations(beaconState, privs, attConfig.NumAttestations, i, false)
generatedAttsForSlot, err := util.GenerateAttestations(beaconState, privs, attConfig.NumAttestations, i, false)
if err != nil {
return err
}
attsForSlot := make([]*ethpb.Attestation, len(generatedAttsForSlot))
for j, att := range generatedAttsForSlot {
a, ok := att.(*ethpb.Attestation)
if !ok {
return errors.New("attestation is not of type *ethpb.Attestation")
}
attsForSlot[j] = a
}
atts = append(atts, attsForSlot...)
}