wrapper

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: GPL-3.0, Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Phase0BeaconBlock

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

Phase0BeaconBlock is the wrapper for the actual block.

func WrappedPhase0BeaconBlock

func WrappedPhase0BeaconBlock(b *eth.BeaconBlock) Phase0BeaconBlock

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

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) 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 *eth.BeaconBlockBody) Phase0BeaconBlockBody

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

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

func WrappedPhase0SignedBeaconBlock(b *eth.SignedBeaconBlock) Phase0SignedBeaconBlock

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

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

Jump to

Keyboard shortcuts

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