-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SubmitAttestations in the beacon API (#8563)
* update ethereumapis deps * V1AttToV1Alpha1 migration * Implementation plus happy path test * fix root variable names * Invalid attestation test * gzl * mod tidy * use a single append to concatenate two slices * remove outdated comment from attestation processing * invoke ProcessAttestationNoVerifySignature when validating attestations * implement missing PoolMock members * use new VerifyAttestationNoVerifySignature function
- Loading branch information
Showing
12 changed files
with
430 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
package attestations | ||
|
||
import ( | ||
"context" | ||
|
||
types "github.com/prysmaticlabs/eth2-types" | ||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" | ||
) | ||
|
||
type PoolMock struct { | ||
AggregatedAtts []*ethpb.Attestation | ||
} | ||
|
||
func (*PoolMock) AggregateUnaggregatedAttestations(_ context.Context) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) AggregateUnaggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveAggregatedAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (m *PoolMock) SaveAggregatedAttestations(atts []*ethpb.Attestation) error { | ||
m.AggregatedAtts = append(m.AggregatedAtts, atts...) | ||
return nil | ||
} | ||
|
||
func (m *PoolMock) AggregatedAttestations() []*ethpb.Attestation { | ||
return m.AggregatedAtts | ||
} | ||
|
||
func (*PoolMock) AggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) []*ethpb.Attestation { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) DeleteAggregatedAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) HasAggregatedAttestation(_ *ethpb.Attestation) (bool, error) { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) AggregatedAttestationCount() int { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveUnaggregatedAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveUnaggregatedAttestations(_ []*ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) UnaggregatedAttestations() ([]*ethpb.Attestation, error) { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) UnaggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) []*ethpb.Attestation { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) DeleteUnaggregatedAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) DeleteSeenUnaggregatedAttestations() (int, error) { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) UnaggregatedAttestationCount() int { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveBlockAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveBlockAttestations(_ []*ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) BlockAttestations() []*ethpb.Attestation { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) DeleteBlockAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveForkchoiceAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) SaveForkchoiceAttestations(_ []*ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) ForkchoiceAttestations() []*ethpb.Attestation { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) DeleteForkchoiceAttestation(_ *ethpb.Attestation) error { | ||
panic("implement me") | ||
} | ||
|
||
func (*PoolMock) ForkchoiceAttestationCount() int { | ||
panic("implement me") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.