@@ -13,6 +13,7 @@ import (
1313 "github.com/ethereum/go-ethereum/common"
1414 "github.com/goccy/go-json"
1515 "github.com/prysmaticlabs/prysm/v5/crypto/bls"
16+ ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1"
1617 eth2types "github.com/wealdtech/go-eth2-types/v2"
1718 "golang.org/x/sync/errgroup"
1819 "google.golang.org/protobuf/encoding/protojson"
@@ -519,36 +520,37 @@ func (c *StandardHttpClient) GetAttestationsRaw(blockId string) (*attestationsRe
519520}
520521
521522func (c * StandardHttpClient ) ParseAttestationsResponseRaw (resp * attestationsResponseRaw ) ([]beacon.AttestationInfo , error ) {
522- var attestations []* gec .Attestation
523+ var attestations []* ethpb .Attestation
523524
524- // Unmarshal block SSZ
525525 if strings .EqualFold (resp .version , "phase0" ) {
526- block := new (gec. SignedBeaconBlockPhase0 )
526+ block := new (ethpb. SignedBeaconBlock )
527527 if err := block .UnmarshalSSZ (resp .body ); err != nil {
528528 return nil , err
529529 }
530-
531530 attestations = block .Block .Body .Attestations
532531 } else if strings .EqualFold (resp .version , "altair" ) {
533- block := new (gec .SignedBeaconBlockAltair )
532+ block := new (ethpb .SignedBeaconBlockAltair )
534533 if err := block .UnmarshalSSZ (resp .body ); err != nil {
535534 return nil , err
536535 }
537-
538536 attestations = block .Block .Body .Attestations
539537 } else if strings .EqualFold (resp .version , "bellatrix" ) {
540- block := new (gec .SignedBeaconBlockBellatrix )
538+ block := new (ethpb .SignedBeaconBlockBellatrix )
541539 if err := block .UnmarshalSSZ (resp .body ); err != nil {
542540 return nil , err
543541 }
544-
545542 attestations = block .Block .Body .Attestations
546543 } else if strings .EqualFold (resp .version , "capella" ) {
547- block := new (gec.SignedBeaconBlockCapella )
544+ block := new (ethpb.SignedBeaconBlockCapella )
545+ if err := block .UnmarshalSSZ (resp .body ); err != nil {
546+ return nil , err
547+ }
548+ attestations = block .Block .Body .Attestations
549+ } else if strings .EqualFold (resp .version , "deneb" ) {
550+ block := new (ethpb.SignedBeaconBlockDeneb )
548551 if err := block .UnmarshalSSZ (resp .body ); err != nil {
549552 return nil , err
550553 }
551-
552554 attestations = block .Block .Body .Attestations
553555 } else {
554556 return nil , fmt .Errorf ("unknown consensus version header: %s" , resp .version )
@@ -557,8 +559,8 @@ func (c *StandardHttpClient) ParseAttestationsResponseRaw(resp *attestationsResp
557559 out := make ([]beacon.AttestationInfo , len (attestations ))
558560 for i := range attestations {
559561 out [i ].AggregationBits = attestations [i ].AggregationBits
560- out [i ].SlotIndex = attestations [i ].Data .Slot
561- out [i ].CommitteeIndex = attestations [i ].Data .Index
562+ out [i ].SlotIndex = uint64 ( attestations [i ].Data .Slot )
563+ out [i ].CommitteeIndex = uint64 ( attestations [i ].Data .CommitteeIndex )
562564 }
563565
564566 return out , nil
0 commit comments