Documentation ¶
Index ¶
- type BeaconBlock
- type BeaconBlockBody
- type Metadata
- type MetadataV0
- func (m MetadataV0) AttnetsBitfield() bitfield.Bitvector64
- func (m MetadataV0) Copy() Metadata
- func (m MetadataV0) InnerObject() interface{}
- func (m MetadataV0) IsNil() bool
- func (m MetadataV0) MetadataObjV0() *pb.MetaDataV0
- func (m MetadataV0) MetadataObjV1() *pb.MetaDataV1
- func (m MetadataV0) SequenceNumber() uint64
- type MetadataV1
- func (m MetadataV1) AttnetsBitfield() bitfield.Bitvector64
- func (m MetadataV1) Copy() Metadata
- func (m MetadataV1) InnerObject() interface{}
- func (m MetadataV1) IsNil() bool
- func (m MetadataV1) MetadataObjV0() *pb.MetaDataV0
- func (m MetadataV1) MetadataObjV1() *pb.MetaDataV1
- func (m MetadataV1) SequenceNumber() uint64
- type Phase0BeaconBlock
- func (w Phase0BeaconBlock) Body() BeaconBlockBody
- func (w Phase0BeaconBlock) HashTreeRoot() ([32]byte, error)
- func (w Phase0BeaconBlock) IsNil() bool
- func (w Phase0BeaconBlock) MarshalSSZ() ([]byte, error)
- func (w Phase0BeaconBlock) ParentRoot() []byte
- func (w Phase0BeaconBlock) ProposerIndex() types.ValidatorIndex
- func (w Phase0BeaconBlock) Proto() proto.Message
- func (w Phase0BeaconBlock) Slot() types.Slot
- func (w Phase0BeaconBlock) StateRoot() []byte
- type Phase0BeaconBlockBody
- func (w Phase0BeaconBlockBody) Attestations() []*ethpb.Attestation
- func (w Phase0BeaconBlockBody) AttesterSlashings() []*ethpb.AttesterSlashing
- func (w Phase0BeaconBlockBody) Deposits() []*ethpb.Deposit
- func (w Phase0BeaconBlockBody) Eth1Data() *ethpb.Eth1Data
- func (w Phase0BeaconBlockBody) Graffiti() []byte
- func (w Phase0BeaconBlockBody) HashTreeRoot() ([32]byte, error)
- func (w Phase0BeaconBlockBody) IsNil() bool
- func (w Phase0BeaconBlockBody) ProposerSlashings() []*ethpb.ProposerSlashing
- func (w Phase0BeaconBlockBody) Proto() proto.Message
- func (w Phase0BeaconBlockBody) RandaoReveal() []byte
- func (w Phase0BeaconBlockBody) VoluntaryExits() []*ethpb.SignedVoluntaryExit
- type Phase0SignedBeaconBlock
- func (w Phase0SignedBeaconBlock) Block() BeaconBlock
- func (w Phase0SignedBeaconBlock) Copy() SignedBeaconBlock
- func (w Phase0SignedBeaconBlock) IsNil() bool
- func (w Phase0SignedBeaconBlock) MarshalSSZ() ([]byte, error)
- func (w Phase0SignedBeaconBlock) PbPhase0Block() (*ethpb.SignedBeaconBlock, error)
- func (w Phase0SignedBeaconBlock) Proto() proto.Message
- func (w Phase0SignedBeaconBlock) Signature() []byte
- type SignedBeaconBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconBlock ¶
type BeaconBlock interface { Slot() types.Slot ProposerIndex() types.ValidatorIndex ParentRoot() []byte StateRoot() []byte Body() BeaconBlockBody IsNil() bool HashTreeRoot() ([32]byte, error) MarshalSSZ() ([]byte, error) Proto() proto.Message }
BeaconBlock describes an interface which states the methods employed by an object that is a beacon block.
type BeaconBlockBody ¶
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 IsNil() bool HashTreeRoot() ([32]byte, error) Proto() proto.Message }
BeaconBlockBody describes the method set employed by an object that is a beacon block body.
type Metadata ¶
type Metadata interface { SequenceNumber() uint64 AttnetsBitfield() bitfield.Bitvector64 InnerObject() interface{} IsNil() bool Copy() Metadata MetadataObjV0() *pb.MetaDataV0 MetadataObjV1() *pb.MetaDataV1 }
Metadata returns the interface of a p2p metadata type.
type MetadataV0 ¶
type MetadataV0 struct {
// contains filtered or unexported fields
}
MetadataV0 is a convenience wrapper around our metadata protobuf object.
func WrappedMetadataV0 ¶
func WrappedMetadataV0(md *pb.MetaDataV0) MetadataV0
WrappedMetadataV0 wrappers around the provided protobuf object.
func (MetadataV0) AttnetsBitfield ¶
func (m MetadataV0) AttnetsBitfield() bitfield.Bitvector64
AttnetsBitfield retruns the bitfield stored in the metadata.
func (MetadataV0) Copy ¶
func (m MetadataV0) Copy() Metadata
Copy performs a full copy of the underlying metadata object.
func (MetadataV0) InnerObject ¶
func (m MetadataV0) InnerObject() interface{}
InnerObject returns the underlying metadata protobuf structure.
func (MetadataV0) IsNil ¶
func (m MetadataV0) IsNil() bool
IsNil checks for the nilness of the underlying object.
func (MetadataV0) MetadataObjV0 ¶
func (m MetadataV0) MetadataObjV0() *pb.MetaDataV0
MetadataObjV0 returns the inner metadata object in its type specified form. If it doesn't exist then we return nothing.
func (MetadataV0) MetadataObjV1 ¶
func (m MetadataV0) MetadataObjV1() *pb.MetaDataV1
MetadataObjV1 returns the inner metatdata object in its type specified form. If it doesn't exist then we return nothing.
func (MetadataV0) SequenceNumber ¶
func (m MetadataV0) SequenceNumber() uint64
SequenceNumber returns the sequence number from the metadata.
type MetadataV1 ¶
type MetadataV1 struct {
// contains filtered or unexported fields
}
MetadataV1 is a convenience wrapper around our metadata v2 protobuf object.
func WrappedMetadataV1 ¶
func WrappedMetadataV1(md *pb.MetaDataV1) MetadataV1
WrappedMetadataV1 wrappers around the provided protobuf object.
func (MetadataV1) AttnetsBitfield ¶
func (m MetadataV1) AttnetsBitfield() bitfield.Bitvector64
AttnetsBitfield retruns the bitfield stored in the metadata.
func (MetadataV1) Copy ¶
func (m MetadataV1) Copy() Metadata
Copy performs a full copy of the underlying metadata object.
func (MetadataV1) InnerObject ¶
func (m MetadataV1) InnerObject() interface{}
InnerObject returns the underlying metadata protobuf structure.
func (MetadataV1) IsNil ¶
func (m MetadataV1) IsNil() bool
IsNil checks for the nilness of the underlying object.
func (MetadataV1) MetadataObjV0 ¶
func (m MetadataV1) MetadataObjV0() *pb.MetaDataV0
MetadataObjV0 returns the inner metadata object in its type specified form. If it doesn't exist then we return nothing.
func (MetadataV1) MetadataObjV1 ¶
func (m MetadataV1) MetadataObjV1() *pb.MetaDataV1
MetadataObjV1 returns the inner metatdata object in its type specified form. If it doesn't exist then we return nothing.
func (MetadataV1) SequenceNumber ¶
func (m MetadataV1) SequenceNumber() uint64
SequenceNumber returns the sequence number from the metadata.
type Phase0BeaconBlock ¶
type Phase0BeaconBlock struct {
// contains filtered or unexported fields
}
Phase0BeaconBlock is the wrapper for the actual block.
func WrappedPhase0BeaconBlock ¶
func WrappedPhase0BeaconBlock(b *ethpb.BeaconBlock) Phase0BeaconBlock
WrappedPhase0BeaconBlock is constructor which wraps a protobuf phase 0 object with the block wrapper.
func (Phase0BeaconBlock) Body ¶
func (w Phase0BeaconBlock) Body() BeaconBlockBody
Body returns the underlying block body.
func (Phase0BeaconBlock) HashTreeRoot ¶
func (w Phase0BeaconBlock) HashTreeRoot() ([32]byte, error)
HashTreeRoot returns the ssz root of the block.
func (Phase0BeaconBlock) IsNil ¶
func (w Phase0BeaconBlock) IsNil() bool
IsNil checks if the beacon block is nil.
func (Phase0BeaconBlock) MarshalSSZ ¶
func (w Phase0BeaconBlock) MarshalSSZ() ([]byte, error)
MarshalSSZ marshals the block into its respective ssz form.
func (Phase0BeaconBlock) ParentRoot ¶
func (w Phase0BeaconBlock) ParentRoot() []byte
ParentRoot returns the parent root of beacon block.
func (Phase0BeaconBlock) ProposerIndex ¶
func (w Phase0BeaconBlock) ProposerIndex() types.ValidatorIndex
ProposerIndex returns proposer index of the beacon block.
func (Phase0BeaconBlock) Proto ¶
func (w Phase0BeaconBlock) Proto() proto.Message
Proto returns the underlying block object in its proto form.
func (Phase0BeaconBlock) Slot ¶
func (w Phase0BeaconBlock) Slot() types.Slot
Slot returns the respective slot of the block.
func (Phase0BeaconBlock) StateRoot ¶
func (w Phase0BeaconBlock) StateRoot() []byte
StateRoot returns the state root of the beacon block.
type Phase0BeaconBlockBody ¶
type Phase0BeaconBlockBody struct {
// contains filtered or unexported fields
}
Phase0BeaconBlockBody is a wrapper of a beacon block body.
func WrappedPhase0BeaconBlockBody ¶
func WrappedPhase0BeaconBlockBody(b *ethpb.BeaconBlockBody) Phase0BeaconBlockBody
WrappedPhase0BeaconBlockBody is constructor which wraps a protobuf phase 0 object with the block wrapper.
func (Phase0BeaconBlockBody) Attestations ¶
func (w Phase0BeaconBlockBody) Attestations() []*ethpb.Attestation
Attestations returns the stored attestations in the block.
func (Phase0BeaconBlockBody) AttesterSlashings ¶
func (w Phase0BeaconBlockBody) AttesterSlashings() []*ethpb.AttesterSlashing
AttesterSlashings returns the attester slashings in the block.
func (Phase0BeaconBlockBody) Deposits ¶
func (w Phase0BeaconBlockBody) Deposits() []*ethpb.Deposit
Deposits returns the stored deposits in the block.
func (Phase0BeaconBlockBody) Eth1Data ¶
func (w Phase0BeaconBlockBody) Eth1Data() *ethpb.Eth1Data
Eth1Data returns the eth1 data in the block.
func (Phase0BeaconBlockBody) Graffiti ¶
func (w Phase0BeaconBlockBody) Graffiti() []byte
Graffiti returns the graffiti in the block.
func (Phase0BeaconBlockBody) HashTreeRoot ¶
func (w Phase0BeaconBlockBody) HashTreeRoot() ([32]byte, error)
HashTreeRoot returns the ssz root of the block body.
func (Phase0BeaconBlockBody) IsNil ¶
func (w Phase0BeaconBlockBody) IsNil() bool
IsNil checks if the block body is nil.
func (Phase0BeaconBlockBody) ProposerSlashings ¶
func (w Phase0BeaconBlockBody) ProposerSlashings() []*ethpb.ProposerSlashing
ProposerSlashings returns the proposer slashings in the block.
func (Phase0BeaconBlockBody) Proto ¶
func (w Phase0BeaconBlockBody) Proto() proto.Message
Proto returns the underlying proto form of the block body.
func (Phase0BeaconBlockBody) RandaoReveal ¶
func (w Phase0BeaconBlockBody) RandaoReveal() []byte
RandaoReveal returns the randao reveal from the block body.
func (Phase0BeaconBlockBody) VoluntaryExits ¶
func (w Phase0BeaconBlockBody) VoluntaryExits() []*ethpb.SignedVoluntaryExit
VoluntaryExits returns the voluntary exits in the block.
type Phase0SignedBeaconBlock ¶
type Phase0SignedBeaconBlock struct {
// contains filtered or unexported fields
}
Phase0SignedBeaconBlock is a convenience wrapper around a phase 0 beacon block object. This wrapper allows us to conform to a common interface so that beacon blocks for future forks can also be applied across prysm without issues.
func WrappedPhase0SignedBeaconBlock ¶
func WrappedPhase0SignedBeaconBlock(b *ethpb.SignedBeaconBlock) Phase0SignedBeaconBlock
WrappedPhase0SignedBeaconBlock is constructor which wraps a protobuf phase 0 block with the block wrapper.
func (Phase0SignedBeaconBlock) Block ¶
func (w Phase0SignedBeaconBlock) Block() BeaconBlock
Block returns the underlying beacon block object.
func (Phase0SignedBeaconBlock) Copy ¶
func (w Phase0SignedBeaconBlock) Copy() SignedBeaconBlock
Copy performs a deep copy of the signed beacon block object.
func (Phase0SignedBeaconBlock) IsNil ¶
func (w Phase0SignedBeaconBlock) IsNil() bool
IsNil checks if the underlying beacon block is nil.
func (Phase0SignedBeaconBlock) MarshalSSZ ¶
func (w Phase0SignedBeaconBlock) MarshalSSZ() ([]byte, error)
MarshalSSZ marshals the signed beacon block to its relevant ssz form.
func (Phase0SignedBeaconBlock) PbPhase0Block ¶
func (w Phase0SignedBeaconBlock) PbPhase0Block() (*ethpb.SignedBeaconBlock, error)
PbPhase0Block returns the underlying protobuf object.
func (Phase0SignedBeaconBlock) Proto ¶
func (w Phase0SignedBeaconBlock) Proto() proto.Message
Proto returns the block in its underlying protobuf interface.
func (Phase0SignedBeaconBlock) Signature ¶
func (w Phase0SignedBeaconBlock) Signature() []byte
Signature returns the respective block signature.
type SignedBeaconBlock ¶
type SignedBeaconBlock interface { Block() BeaconBlock Signature() []byte IsNil() bool Copy() SignedBeaconBlock MarshalSSZ() ([]byte, error) Proto() proto.Message PbPhase0Block() (*ethpb.SignedBeaconBlock, error) }
SignedBeaconBlock is an interface describing the method set of a signed beacon block.