Skip to content

Commit

Permalink
remove aggregator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka committed Jun 18, 2024
1 parent f6ae202 commit fd4d7f4
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions beacon-chain/rpc/prysm/v1alpha1/validator/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,57 +451,3 @@ func TestSubmitSignedAggregateSelectionProof_InvalidSlot(t *testing.T) {
_, err := aggregatorServer.SubmitSignedAggregateSelectionProof(context.Background(), req)
require.ErrorContains(t, "attestation slot is no longer valid from current time", err)
}

func TestSubmitSignedAggregateSelectionProofElectra_ZeroHashesSignatures(t *testing.T) {
aggregatorServer := &Server{
TimeFetcher: &mock.ChainService{Genesis: time.Now()},
}
req := &ethpb.SignedAggregateSubmitElectraRequest{
SignedAggregateAndProof: &ethpb.SignedAggregateAttestationAndProofElectra{
Signature: make([]byte, fieldparams.BLSSignatureLength),
Message: &ethpb.AggregateAttestationAndProofElectra{
Aggregate: &ethpb.AttestationElectra{
Data: &ethpb.AttestationData{},
},
},
},
}
_, err := aggregatorServer.SubmitSignedAggregateSelectionProofElectra(context.Background(), req)
require.ErrorContains(t, "signed signatures can't be zero hashes", err)

req = &ethpb.SignedAggregateSubmitElectraRequest{
SignedAggregateAndProof: &ethpb.SignedAggregateAttestationAndProofElectra{
Signature: []byte{'a'},
Message: &ethpb.AggregateAttestationAndProofElectra{
Aggregate: &ethpb.AttestationElectra{
Data: &ethpb.AttestationData{},
},
SelectionProof: make([]byte, fieldparams.BLSSignatureLength),
},
},
}
_, err = aggregatorServer.SubmitSignedAggregateSelectionProofElectra(context.Background(), req)
require.ErrorContains(t, "signed signatures can't be zero hashes", err)
}

func TestSubmitSignedAggregateSelectionProofElectra_InvalidSlot(t *testing.T) {
c := &mock.ChainService{Genesis: time.Now()}
aggregatorServer := &Server{
CoreService: &core.Service{
GenesisTimeFetcher: c,
},
}
req := &ethpb.SignedAggregateSubmitElectraRequest{
SignedAggregateAndProof: &ethpb.SignedAggregateAttestationAndProofElectra{
Signature: []byte{'a'},
Message: &ethpb.AggregateAttestationAndProofElectra{
SelectionProof: []byte{'a'},
Aggregate: &ethpb.AttestationElectra{
Data: &ethpb.AttestationData{Slot: 1000},
},
},
},
}
_, err := aggregatorServer.SubmitSignedAggregateSelectionProofElectra(context.Background(), req)
require.ErrorContains(t, "attestation slot is no longer valid from current time", err)
}

0 comments on commit fd4d7f4

Please sign in to comment.