mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Electra attestation interfaces (#13937)
* config values * block protos * get_committee_indices * proto and ssz * attestation interface * Revert "Auxiliary commit to revert individual files from deadb2183723511721b3288c7168808a4fa97c64" This reverts commit 32ad5009537bc5ec0e6caf9f52143d380d00be85. * todos * get_attesting_indices * Revert "Auxiliary commit to revert individual files from dd2789723f90b15eb1f874b561d88d11dcc9c0bf" This reverts commit f39644ed3cb6f3964fc6c86fdf4bd5de2a9668c8. * beacon spec changes * Fix pending attestation. Build ok * Electra: add electra version * Electra: consensus types * gocognit exclusion * @potuz's suggestion * build fix * interfaces for indexed att and slashing * indexed att usage * BuildSignedBeaconBlockFromExecutionPayload * slashing usage * grpc stubs * remove unused methods * Electra attestation interfaces * cleanup * tests * make linter happy * simple casting * test fixes * Fix spectest failures * Regen pb and ssz files * Handle "not ok" type assertion cases * Setters that check version should always return an error. SetAttesterSlashings and SetAttestations * gofmt * Fix TestMinSpanChunksSlice_CheckSlashable --------- Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: Preston Van Loon <preston@pvl.dev>
This commit is contained in:
@@ -414,8 +414,8 @@ func (*ChainService) HeadGenesisValidatorsRoot() [32]byte {
|
||||
}
|
||||
|
||||
// VerifyLmdFfgConsistency mocks VerifyLmdFfgConsistency and always returns nil.
|
||||
func (*ChainService) VerifyLmdFfgConsistency(_ context.Context, a *ethpb.Attestation) error {
|
||||
if !bytes.Equal(a.Data.BeaconBlockRoot, a.Data.Target.Root) {
|
||||
func (*ChainService) VerifyLmdFfgConsistency(_ context.Context, a interfaces.Attestation) error {
|
||||
if !bytes.Equal(a.GetData().BeaconBlockRoot, a.GetData().Target.Root) {
|
||||
return errors.New("LMD and FFG miss matched")
|
||||
}
|
||||
return nil
|
||||
@@ -495,7 +495,7 @@ func (s *ChainService) UpdateHead(ctx context.Context, slot primitives.Slot) {
|
||||
}
|
||||
|
||||
// ReceiveAttesterSlashing mocks the same method in the chain service.
|
||||
func (*ChainService) ReceiveAttesterSlashing(context.Context, *ethpb.AttesterSlashing) {}
|
||||
func (*ChainService) ReceiveAttesterSlashing(context.Context, interfaces.AttesterSlashing) {}
|
||||
|
||||
// IsFinalized mocks the same method in the chain service.
|
||||
func (s *ChainService) IsFinalized(_ context.Context, blockRoot [32]byte) bool {
|
||||
|
||||
Reference in New Issue
Block a user