mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
2d10bcf179
* move state protos * regen ssz * edit v1 code * fix imports * building * beacon chain builds * validator and shared builds * fuzz builds * changes * spectest builds * tools build * remove import cycle * generate ssz * pcli * gaz * kafka * gaz
58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
package interfaces
|
|
|
|
import (
|
|
ssz "github.com/ferranbt/fastssz"
|
|
types "github.com/prysmaticlabs/eth2-types"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
prysmv2 "github.com/prysmaticlabs/prysm/proto/prysm/v2"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// SignedBeaconBlock is an interface describing the method set of
|
|
// a signed beacon block.
|
|
type SignedBeaconBlock interface {
|
|
Block() BeaconBlock
|
|
Signature() []byte
|
|
IsNil() bool
|
|
Copy() SignedBeaconBlock
|
|
Proto() proto.Message
|
|
PbPhase0Block() (*ethpb.SignedBeaconBlock, error)
|
|
PbAltairBlock() (*prysmv2.SignedBeaconBlockAltair, error)
|
|
ssz.Marshaler
|
|
ssz.Unmarshaler
|
|
Version() int
|
|
}
|
|
|
|
// BeaconBlock describes an interface which states the methods
|
|
// employed by an object that is a beacon block.
|
|
type BeaconBlock interface {
|
|
Slot() types.Slot
|
|
ProposerIndex() types.ValidatorIndex
|
|
ParentRoot() []byte
|
|
StateRoot() []byte
|
|
Body() BeaconBlockBody
|
|
IsNil() bool
|
|
HashTreeRoot() ([32]byte, error)
|
|
Proto() proto.Message
|
|
ssz.Marshaler
|
|
ssz.Unmarshaler
|
|
Version() int
|
|
}
|
|
|
|
// BeaconBlockBody describes the method set employed by an object
|
|
// that is a beacon block body.
|
|
type BeaconBlockBody interface {
|
|
RandaoReveal() []byte
|
|
Eth1Data() *ethpb.Eth1Data
|
|
Graffiti() []byte
|
|
ProposerSlashings() []*ethpb.ProposerSlashing
|
|
AttesterSlashings() []*ethpb.AttesterSlashing
|
|
Attestations() []*ethpb.Attestation
|
|
Deposits() []*ethpb.Deposit
|
|
VoluntaryExits() []*ethpb.SignedVoluntaryExit
|
|
SyncAggregate() (*prysmv2.SyncAggregate, error)
|
|
IsNil() bool
|
|
HashTreeRoot() ([32]byte, error)
|
|
Proto() proto.Message
|
|
}
|