interfaces

package
v4.0.0-...-b8b0360 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeaconBlockHeaderFromBlock

func BeaconBlockHeaderFromBlock(block *zondpb.BeaconBlock) (*zondpb.BeaconBlockHeader, error)

BeaconBlockHeaderFromBlock function to retrieve block header from block.

func BeaconBlockHeaderFromBlockInterface

func BeaconBlockHeaderFromBlockInterface(block ReadOnlyBeaconBlock) (*zondpb.BeaconBlockHeader, error)

BeaconBlockHeaderFromBlockInterface function to retrieve block header from block.

func SignedBeaconBlockHeaderFromBlock

func SignedBeaconBlockHeaderFromBlock(block *zondpb.SignedBeaconBlock) (*zondpb.SignedBeaconBlockHeader, error)

SignedBeaconBlockHeaderFromBlock function to retrieve signed block header from block.

func SignedBeaconBlockHeaderFromBlockInterface

func SignedBeaconBlockHeaderFromBlockInterface(sb ReadOnlySignedBeaconBlock) (*zondpb.SignedBeaconBlockHeader, error)

SignedBeaconBlockHeaderFromBlockInterface function to retrieve signed block header from block.

Types

type ExecutionData

type ExecutionData interface {
	ssz.Marshaler
	ssz.Unmarshaler
	ssz.HashRoot
	IsNil() bool
	IsBlinded() bool
	Proto() proto.Message
	ParentHash() []byte
	FeeRecipient() []byte
	StateRoot() []byte
	ReceiptsRoot() []byte
	LogsBloom() []byte
	PrevRandao() []byte
	BlockNumber() uint64
	GasLimit() uint64
	GasUsed() uint64
	Timestamp() uint64
	ExtraData() []byte
	BaseFeePerGas() []byte
	BlobGasUsed() (uint64, error)
	ExcessBlobGas() (uint64, error)
	BlockHash() []byte
	Transactions() ([][]byte, error)
	TransactionsRoot() ([]byte, error)
	Withdrawals() ([]*enginev1.Withdrawal, error)
	WithdrawalsRoot() ([]byte, error)
	PbCapella() (*enginev1.ExecutionPayloadCapella, error)
	PbBellatrix() (*enginev1.ExecutionPayload, error)
	ValueInGwei() (uint64, error)
}

ExecutionData represents execution layer information that is contained within post-Bellatrix beacon block bodies.

type ReadOnlyBeaconBlock

type ReadOnlyBeaconBlock interface {
	Slot() primitives.Slot
	ProposerIndex() primitives.ValidatorIndex
	ParentRoot() [field_params.RootLength]byte
	StateRoot() [field_params.RootLength]byte
	Body() ReadOnlyBeaconBlockBody
	IsNil() bool
	IsBlinded() bool
	HashTreeRoot() ([field_params.RootLength]byte, error)
	Proto() (proto.Message, error)
	ssz.Marshaler
	ssz.Unmarshaler
	ssz.HashRoot
	Version() int
	AsSignRequestObject() (validatorpb.SignRequestObject, error)
	Copy() (ReadOnlyBeaconBlock, error)
}

ReadOnlyBeaconBlock describes an interface which states the methods employed by an object that is a beacon block.

type ReadOnlyBeaconBlockBody

type ReadOnlyBeaconBlockBody interface {
	RandaoReveal() [dilithium2.CryptoBytes]byte
	Eth1Data() *zondpb.Eth1Data
	Graffiti() [field_params.RootLength]byte
	ProposerSlashings() []*zondpb.ProposerSlashing
	AttesterSlashings() []*zondpb.AttesterSlashing
	Attestations() []*zondpb.Attestation
	Deposits() []*zondpb.Deposit
	VoluntaryExits() []*zondpb.SignedVoluntaryExit
	SyncAggregate() (*zondpb.SyncAggregate, error)
	IsNil() bool
	HashTreeRoot() ([field_params.RootLength]byte, error)
	Proto() (proto.Message, error)
	Execution() (ExecutionData, error)
	DilithiumToExecutionChanges() ([]*zondpb.SignedDilithiumToExecutionChange, error)
	BlobKzgCommitments() ([][]byte, error)
}

ReadOnlyBeaconBlockBody describes the method set employed by an object that is a beacon block body.

type ReadOnlySignedBeaconBlock

type ReadOnlySignedBeaconBlock interface {
	Block() ReadOnlyBeaconBlock
	Signature() [dilithium2.CryptoBytes]byte
	IsNil() bool
	Copy() (ReadOnlySignedBeaconBlock, error)
	Proto() (proto.Message, error)
	PbGenericBlock() (*zondpb.GenericSignedBeaconBlock, error)
	PbPhase0Block() (*zondpb.SignedBeaconBlock, error)
	PbAltairBlock() (*zondpb.SignedBeaconBlockAltair, error)
	ToBlinded() (ReadOnlySignedBeaconBlock, error)
	PbBellatrixBlock() (*zondpb.SignedBeaconBlockBellatrix, error)
	PbBlindedBellatrixBlock() (*zondpb.SignedBlindedBeaconBlockBellatrix, error)
	PbCapellaBlock() (*zondpb.SignedBeaconBlockCapella, error)
	PbDenebBlock() (*zondpb.SignedBeaconBlockDeneb, error)
	PbBlindedCapellaBlock() (*zondpb.SignedBlindedBeaconBlockCapella, error)
	PbBlindedDenebBlock() (*zondpb.SignedBlindedBeaconBlockDeneb, error)
	ssz.Marshaler
	ssz.Unmarshaler
	Version() int
	IsBlinded() bool
	ValueInGwei() uint64
	Header() (*zondpb.SignedBeaconBlockHeader, error)
}

ReadOnlySignedBeaconBlock is an interface describing the method set of a signed beacon block.

type SignedBeaconBlock

type SignedBeaconBlock interface {
	ReadOnlySignedBeaconBlock
	SetExecution(ExecutionData) error
	SetDilithiumToExecutionChanges([]*zondpb.SignedDilithiumToExecutionChange) error
	SetBlobKzgCommitments(c [][]byte) error
	SetSyncAggregate(*zondpb.SyncAggregate) error
	SetVoluntaryExits([]*zondpb.SignedVoluntaryExit)
	SetDeposits([]*zondpb.Deposit)
	SetAttestations([]*zondpb.Attestation)
	SetAttesterSlashings([]*zondpb.AttesterSlashing)
	SetProposerSlashings([]*zondpb.ProposerSlashing)
	SetGraffiti([]byte)
	SetEth1Data(*zondpb.Eth1Data)
	SetRandaoReveal([]byte)
	SetBlinded(bool)
	SetStateRoot([]byte)
	SetParentRoot([]byte)
	SetProposerIndex(idx primitives.ValidatorIndex)
	SetSlot(slot primitives.Slot)
	SetSignature(sig []byte)
}

Jump to

Keyboard shortcuts

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