wrapper

package
v0.0.0-...-9d8ac53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrappedPhase0BeaconBlock

func WrappedPhase0BeaconBlock(b *eth.BeaconBlock) interfaces.BeaconBlock

WrappedPhase0BeaconBlock is constructor which wraps a protobuf phase 0 object with the block wrapper.

func WrappedPhase0BeaconBlockBody

func WrappedPhase0BeaconBlockBody(b *eth.BeaconBlockBody) interfaces.BeaconBlockBody

WrappedPhase0BeaconBlockBody is constructor which wraps a protobuf phase 0 object with the block wrapper.

func WrappedPhase0SignedBeaconBlock

func WrappedPhase0SignedBeaconBlock(b *eth.SignedBeaconBlock) interfaces.SignedBeaconBlock

WrappedPhase0SignedBeaconBlock is constructor which wraps a protobuf phase 0 block with the block wrapper.

Types

type Phase0BeaconBlock

type Phase0BeaconBlock struct {
	// contains filtered or unexported fields
}

Phase0BeaconBlock is the wrapper for the actual block.

func (Phase0BeaconBlock) Body

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) MarshalSSZTo

func (w Phase0BeaconBlock) MarshalSSZTo(dst []byte) ([]byte, error)

MarshalSSZTo marshals the beacon block to its relevant ssz form to the provided byte buffer.

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) SizeSSZ

func (w Phase0BeaconBlock) SizeSSZ() int

SizeSSZ returns the size of serialized block.

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.

func (Phase0BeaconBlock) UnmarshalSSZ

func (w Phase0BeaconBlock) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ unmarshalls the beacon block from its relevant ssz form.

func (Phase0BeaconBlock) Version

func (w Phase0BeaconBlock) Version() int

Version of the underlying protobuf object.

type Phase0BeaconBlockBody

type Phase0BeaconBlockBody struct {
	// contains filtered or unexported fields
}

Phase0BeaconBlockBody is a wrapper of a beacon block body.

func (Phase0BeaconBlockBody) Attestations

func (w Phase0BeaconBlockBody) Attestations() []*eth.Attestation

Attestations returns the stored attestations in the block.

func (Phase0BeaconBlockBody) AttesterSlashings

func (w Phase0BeaconBlockBody) AttesterSlashings() []*eth.AttesterSlashing

AttesterSlashings returns the attester slashings in the block.

func (Phase0BeaconBlockBody) Deposits

func (w Phase0BeaconBlockBody) Deposits() []*eth.Deposit

Deposits returns the stored deposits in the block.

func (Phase0BeaconBlockBody) Eth1Data

func (w Phase0BeaconBlockBody) Eth1Data() *eth.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() []*eth.ProposerSlashing

ProposerSlashings returns the proposer slashings in the block.

func (Phase0BeaconBlockBody) Proto

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) SyncAggregate

func (w Phase0BeaconBlockBody) SyncAggregate() (*prysmv2.SyncAggregate, error)

SyncAggregate returns the sync aggregate in the block.

func (Phase0BeaconBlockBody) VoluntaryExits

func (w Phase0BeaconBlockBody) VoluntaryExits() []*eth.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 (Phase0SignedBeaconBlock) Block

Block returns the underlying beacon block object.

func (Phase0SignedBeaconBlock) Copy

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) MarshalSSZTo

func (w Phase0SignedBeaconBlock) MarshalSSZTo(dst []byte) ([]byte, error)

MarshalSSZTo marshals the signed beacon block to its relevant ssz form to the provided byte buffer.

func (Phase0SignedBeaconBlock) PbAltairBlock

AltairBlock returns the underlying protobuf object.

func (Phase0SignedBeaconBlock) PbPhase0Block

func (w Phase0SignedBeaconBlock) PbPhase0Block() (*eth.SignedBeaconBlock, error)

PbPhase0Block returns the underlying protobuf object.

func (Phase0SignedBeaconBlock) Proto

Proto returns the block in its underlying protobuf interface.

func (Phase0SignedBeaconBlock) Signature

func (w Phase0SignedBeaconBlock) Signature() []byte

Signature returns the respective block signature.

func (Phase0SignedBeaconBlock) SizeSSZ

func (w Phase0SignedBeaconBlock) SizeSSZ() int

SizeSSZ returns the size of serialized signed block

func (Phase0SignedBeaconBlock) UnmarshalSSZ

func (w Phase0SignedBeaconBlock) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ unmarshalls the signed beacon block from its relevant ssz form.

func (Phase0SignedBeaconBlock) Version

func (w Phase0SignedBeaconBlock) Version() int

Version of the underlying protobuf object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL