Documentation ¶
Index ¶
- Variables
- func BeaconBlockHeaderFromBlock(block *ethpb.BeaconBlock) (*ethpb.BeaconBlockHeader, error)
- func BeaconBlockHeaderFromBlockInterface(block ReadOnlyBeaconBlock) (*ethpb.BeaconBlockHeader, error)
- func SignedBeaconBlockHeaderFromBlock(block *ethpb.SignedBeaconBlock) (*ethpb.SignedBeaconBlockHeader, error)
- func SignedBeaconBlockHeaderFromBlockInterface(sb ReadOnlySignedBeaconBlock) (*ethpb.SignedBeaconBlockHeader, error)
- type ExecutionData
- type InvalidCastError
- type LightClientBootstrap
- type LightClientExecutionBranch
- type LightClientFinalityBranch
- type LightClientFinalityBranchElectra
- type LightClientFinalityUpdate
- type LightClientHeader
- type LightClientOptimisticUpdate
- type LightClientSyncCommitteeBranch
- type LightClientSyncCommitteeBranchElectra
- type LightClientUpdate
- type ReadOnlyBeaconBlock
- type ReadOnlyBeaconBlockBody
- type ReadOnlySignedBeaconBlock
- type SignedBeaconBlock
- type WithWithdrawalCredentials
Constants ¶
This section is empty.
Variables ¶
var ErrIncompatibleFork = errors.New("Can't convert to fork-specific interface")
var ErrInvalidCast = errors.New("unable to cast between types")
Functions ¶
func BeaconBlockHeaderFromBlock ¶
func BeaconBlockHeaderFromBlock(block *ethpb.BeaconBlock) (*ethpb.BeaconBlockHeader, error)
BeaconBlockHeaderFromBlock function to retrieve block header from block.
func BeaconBlockHeaderFromBlockInterface ¶
func BeaconBlockHeaderFromBlockInterface(block ReadOnlyBeaconBlock) (*ethpb.BeaconBlockHeader, error)
BeaconBlockHeaderFromBlockInterface function to retrieve block header from block.
func SignedBeaconBlockHeaderFromBlock ¶
func SignedBeaconBlockHeaderFromBlock(block *ethpb.SignedBeaconBlock) (*ethpb.SignedBeaconBlockHeader, error)
SignedBeaconBlockHeaderFromBlock function to retrieve signed block header from block.
func SignedBeaconBlockHeaderFromBlockInterface ¶
func SignedBeaconBlockHeaderFromBlockInterface(sb ReadOnlySignedBeaconBlock) (*ethpb.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) }
ExecutionData represents execution layer information that is contained within post-Bellatrix beacon block bodies.
type InvalidCastError ¶ added in v5.1.0
type InvalidCastError struct {
// contains filtered or unexported fields
}
func NewInvalidCastError ¶ added in v5.1.0
func NewInvalidCastError(from, to int) *InvalidCastError
func (*InvalidCastError) Error ¶ added in v5.1.0
func (e *InvalidCastError) Error() string
func (*InvalidCastError) Is ¶ added in v5.1.0
func (*InvalidCastError) Is(err error) bool
type LightClientBootstrap ¶ added in v5.1.1
type LightClientBootstrap interface { ssz.Marshaler Version() int Header() LightClientHeader SetHeader(header LightClientHeader) error CurrentSyncCommittee() *pb.SyncCommittee SetCurrentSyncCommittee(sc *pb.SyncCommittee) error CurrentSyncCommitteeBranch() (LightClientSyncCommitteeBranch, error) CurrentSyncCommitteeBranchElectra() (LightClientSyncCommitteeBranchElectra, error) SetCurrentSyncCommitteeBranch(branch [][]byte) error }
type LightClientExecutionBranch ¶ added in v5.1.1
type LightClientExecutionBranch = [fieldparams.ExecutionBranchDepth][fieldparams.RootLength]byte
type LightClientFinalityBranch ¶ added in v5.1.1
type LightClientFinalityBranch = [fieldparams.FinalityBranchDepth][fieldparams.RootLength]byte
type LightClientFinalityBranchElectra ¶ added in v5.2.0
type LightClientFinalityBranchElectra = [fieldparams.FinalityBranchDepthElectra][fieldparams.RootLength]byte
type LightClientFinalityUpdate ¶ added in v5.1.1
type LightClientFinalityUpdate interface { ssz.Marshaler ssz.Unmarshaler Proto() proto.Message Version() int AttestedHeader() LightClientHeader FinalizedHeader() LightClientHeader FinalityBranch() (LightClientFinalityBranch, error) FinalityBranchElectra() (LightClientFinalityBranchElectra, error) SyncAggregate() *pb.SyncAggregate SignatureSlot() primitives.Slot }
type LightClientHeader ¶ added in v5.1.1
type LightClientHeader interface { ssz.Marshaler Proto() proto.Message Version() int Beacon() *pb.BeaconBlockHeader Execution() (ExecutionData, error) ExecutionBranch() (LightClientExecutionBranch, error) }
type LightClientOptimisticUpdate ¶ added in v5.1.1
type LightClientOptimisticUpdate interface { ssz.Marshaler ssz.Unmarshaler Proto() proto.Message Version() int AttestedHeader() LightClientHeader SyncAggregate() *pb.SyncAggregate SignatureSlot() primitives.Slot }
type LightClientSyncCommitteeBranch ¶ added in v5.1.1
type LightClientSyncCommitteeBranch = [fieldparams.SyncCommitteeBranchDepth][fieldparams.RootLength]byte
type LightClientSyncCommitteeBranchElectra ¶ added in v5.2.0
type LightClientSyncCommitteeBranchElectra = [fieldparams.SyncCommitteeBranchDepthElectra][fieldparams.RootLength]byte
type LightClientUpdate ¶ added in v5.1.1
type LightClientUpdate interface { ssz.Marshaler Proto() proto.Message Version() int AttestedHeader() LightClientHeader SetAttestedHeader(header LightClientHeader) error NextSyncCommittee() *pb.SyncCommittee SetNextSyncCommittee(sc *pb.SyncCommittee) NextSyncCommitteeBranch() (LightClientSyncCommitteeBranch, error) SetNextSyncCommitteeBranch(branch [][]byte) error NextSyncCommitteeBranchElectra() (LightClientSyncCommitteeBranchElectra, error) FinalizedHeader() LightClientHeader SetFinalizedHeader(header LightClientHeader) error FinalityBranch() (LightClientFinalityBranch, error) FinalityBranchElectra() (LightClientFinalityBranchElectra, error) SetFinalityBranch(branch [][]byte) error SyncAggregate() *pb.SyncAggregate SetSyncAggregate(sa *pb.SyncAggregate) SignatureSlot() primitives.Slot SetSignatureSlot(slot primitives.Slot) }
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 { Version() int RandaoReveal() [field_params.BLSSignatureLength]byte Eth1Data() *ethpb.Eth1Data Graffiti() [field_params.RootLength]byte ProposerSlashings() []*ethpb.ProposerSlashing AttesterSlashings() []ethpb.AttSlashing Attestations() []ethpb.Att Deposits() []*ethpb.Deposit VoluntaryExits() []*ethpb.SignedVoluntaryExit SyncAggregate() (*ethpb.SyncAggregate, error) IsNil() bool HashTreeRoot() ([field_params.RootLength]byte, error) Proto() (proto.Message, error) Execution() (ExecutionData, error) BLSToExecutionChanges() ([]*ethpb.SignedBLSToExecutionChange, error) BlobKzgCommitments() ([][]byte, error) ExecutionRequests() (*enginev1.ExecutionRequests, error) }
ReadOnlyBeaconBlockBody describes the method set employed by an object that is a beacon block body.
type ReadOnlySignedBeaconBlock ¶
type ReadOnlySignedBeaconBlock interface { Block() ReadOnlyBeaconBlock Signature() [field_params.BLSSignatureLength]byte IsNil() bool Copy() (SignedBeaconBlock, error) Proto() (proto.Message, error) PbGenericBlock() (*ethpb.GenericSignedBeaconBlock, error) ToBlinded() (ReadOnlySignedBeaconBlock, error) ssz.Marshaler ssz.Unmarshaler Version() int IsBlinded() bool Header() (*ethpb.SignedBeaconBlockHeader, error) }
ReadOnlySignedBeaconBlock is an interface describing the method set of a signed beacon block.
type SignedBeaconBlock ¶
type SignedBeaconBlock interface { ReadOnlySignedBeaconBlock SetExecution(ExecutionData) error SetBLSToExecutionChanges([]*ethpb.SignedBLSToExecutionChange) error SetBlobKzgCommitments(c [][]byte) error SetSyncAggregate(*ethpb.SyncAggregate) error SetVoluntaryExits([]*ethpb.SignedVoluntaryExit) SetDeposits([]*ethpb.Deposit) SetAttestations([]ethpb.Att) error SetAttesterSlashings([]ethpb.AttSlashing) error SetProposerSlashings([]*ethpb.ProposerSlashing) SetGraffiti([]byte) SetEth1Data(*ethpb.Eth1Data) SetRandaoReveal([]byte) SetStateRoot([]byte) SetParentRoot([]byte) SetProposerIndex(idx primitives.ValidatorIndex) SetSlot(slot primitives.Slot) SetSignature(sig []byte) SetExecutionRequests(er *enginev1.ExecutionRequests) error Unblind(e ExecutionData) error }
type WithWithdrawalCredentials ¶ added in v5.1.0
type WithWithdrawalCredentials interface {
GetWithdrawalCredentials() []byte
}