spec

package
v0.21.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuilderVersion added in v0.12.0

type BuilderVersion uint64

BuilderVersion defines the builder spec version.

const (
	// BuilderVersionV1 is applicable for the V1 release of the builder spec.
	BuilderVersionV1 BuilderVersion = iota
)

func (*BuilderVersion) MarshalJSON added in v0.12.0

func (d *BuilderVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (BuilderVersion) String added in v0.12.0

func (d BuilderVersion) String() string

String returns a string representation of the struct.

func (*BuilderVersion) UnmarshalJSON added in v0.12.0

func (d *BuilderVersion) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DataVersion

type DataVersion uint64

DataVersion defines the spec version of the data in a response.

const (
	// DataVersionUnknown is an unknown data version.
	DataVersionUnknown DataVersion = iota
	// DataVersionPhase0 is data applicable for the initial release of the beacon chain.
	DataVersionPhase0
	// DataVersionAltair is data applicable for the Altair release of the beacon chain.
	DataVersionAltair
	// DataVersionBellatrix is data applicable for the Bellatrix release of the beacon chain.
	DataVersionBellatrix
	// DataVersionCapella is data applicable for the Capella release of the beacon chain.
	DataVersionCapella
	// DataVersionDeneb is data applicable for the Deneb release of the beacon chain.
	DataVersionDeneb
)

func (*DataVersion) MarshalJSON

func (d *DataVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (DataVersion) String

func (d DataVersion) String() string

String returns a string representation of the struct.

func (*DataVersion) UnmarshalJSON

func (d *DataVersion) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VersionedBeaconBlock

type VersionedBeaconBlock struct {
	Version   DataVersion
	Phase0    *phase0.BeaconBlock
	Altair    *altair.BeaconBlock
	Bellatrix *bellatrix.BeaconBlock
	Capella   *capella.BeaconBlock
	Deneb     *deneb.BeaconBlock
}

VersionedBeaconBlock contains a versioned beacon block.

func (*VersionedBeaconBlock) Attestations

func (v *VersionedBeaconBlock) Attestations() ([]*phase0.Attestation, error)

Attestations returns the attestations of the beacon block.

func (*VersionedBeaconBlock) AttesterSlashings

func (v *VersionedBeaconBlock) AttesterSlashings() ([]*phase0.AttesterSlashing, error)

AttesterSlashings returns the attester slashings of the beacon block.

func (*VersionedBeaconBlock) BodyRoot

func (v *VersionedBeaconBlock) BodyRoot() (phase0.Root, error)

BodyRoot returns the body root of the beacon block.

func (*VersionedBeaconBlock) Graffiti added in v0.19.0

func (v *VersionedBeaconBlock) Graffiti() ([32]byte, error)

Graffiti returns the graffiti of the beacon block.

func (*VersionedBeaconBlock) IsEmpty

func (v *VersionedBeaconBlock) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedBeaconBlock) ParentRoot

func (v *VersionedBeaconBlock) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the beacon block.

func (*VersionedBeaconBlock) ProposerIndex added in v0.18.0

func (v *VersionedBeaconBlock) ProposerIndex() (phase0.ValidatorIndex, error)

ProposerIndex returns the proposer index of the beacon block.

func (*VersionedBeaconBlock) ProposerSlashings

func (v *VersionedBeaconBlock) ProposerSlashings() ([]*phase0.ProposerSlashing, error)

ProposerSlashings returns the proposer slashings of the beacon block.

func (*VersionedBeaconBlock) RandaoReveal added in v0.19.0

func (v *VersionedBeaconBlock) RandaoReveal() (phase0.BLSSignature, error)

RandaoReveal returns the RANDAO reveal of the beacon block.

func (*VersionedBeaconBlock) Root added in v0.9.6

func (v *VersionedBeaconBlock) Root() (phase0.Root, error)

Root returns the root of the beacon block.

func (*VersionedBeaconBlock) Slot

func (v *VersionedBeaconBlock) Slot() (phase0.Slot, error)

Slot returns the slot of the beacon block.

func (*VersionedBeaconBlock) StateRoot

func (v *VersionedBeaconBlock) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the beacon block.

func (*VersionedBeaconBlock) String added in v0.11.3

func (v *VersionedBeaconBlock) String() string

String returns a string version of the structure.

type VersionedBeaconBlockBody

type VersionedBeaconBlockBody struct {
	Version   DataVersion
	Phase0    *phase0.BeaconBlockBody
	Altair    *altair.BeaconBlockBody
	Bellatrix *bellatrix.BeaconBlockBody
	Capella   *capella.BeaconBlockBody
	Deneb     *deneb.BeaconBlockBody
}

VersionedBeaconBlockBody contains a versioned beacon block body.

func (*VersionedBeaconBlockBody) String added in v0.11.3

func (v *VersionedBeaconBlockBody) String() string

String returns a string version of the structure.

type VersionedBeaconState added in v0.8.0

type VersionedBeaconState struct {
	Version   DataVersion
	Phase0    *phase0.BeaconState
	Altair    *altair.BeaconState
	Bellatrix *bellatrix.BeaconState
	Capella   *capella.BeaconState
	Deneb     *deneb.BeaconState
}

VersionedBeaconState contains a versioned beacon state.

func (*VersionedBeaconState) IsEmpty added in v0.15.3

func (v *VersionedBeaconState) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedBeaconState) NextWithdrawalValidatorIndex added in v0.15.3

func (v *VersionedBeaconState) NextWithdrawalValidatorIndex() (phase0.ValidatorIndex, error)

NextWithdrawalValidatorIndex returns the next withdrawal validator index of the state.

func (*VersionedBeaconState) Slot added in v0.15.3

func (v *VersionedBeaconState) Slot() (phase0.Slot, error)

Slot returns the slot of the state.

func (*VersionedBeaconState) String added in v0.11.3

func (v *VersionedBeaconState) String() string

String returns a string version of the structure.

func (*VersionedBeaconState) ValidatorBalances added in v0.15.3

func (v *VersionedBeaconState) ValidatorBalances() ([]phase0.Gwei, error)

ValidatorBalances returns the validator balances of the state.

func (*VersionedBeaconState) Validators added in v0.15.3

func (v *VersionedBeaconState) Validators() ([]*phase0.Validator, error)

Validators returns the validators of the state.

type VersionedSignedBeaconBlock

type VersionedSignedBeaconBlock struct {
	Version   DataVersion
	Phase0    *phase0.SignedBeaconBlock
	Altair    *altair.SignedBeaconBlock
	Bellatrix *bellatrix.SignedBeaconBlock
	Capella   *capella.SignedBeaconBlock
	Deneb     *deneb.SignedBeaconBlock
}

VersionedSignedBeaconBlock contains a versioned signed beacon block.

func (*VersionedSignedBeaconBlock) Attestations

func (v *VersionedSignedBeaconBlock) Attestations() ([]*phase0.Attestation, error)

Attestations returns the attestations of the beacon block.

func (*VersionedSignedBeaconBlock) AttesterSlashings added in v0.10.2

func (v *VersionedSignedBeaconBlock) AttesterSlashings() ([]*phase0.AttesterSlashing, error)

AttesterSlashings returns the attester slashings of the beacon block.

func (*VersionedSignedBeaconBlock) BLSToExecutionChanges added in v0.19.0

func (v *VersionedSignedBeaconBlock) BLSToExecutionChanges() ([]*capella.SignedBLSToExecutionChange, error)

BLSToExecutionChanges returns the bls to execution changes of the beacon block.

func (*VersionedSignedBeaconBlock) BlobKZGCommitments added in v0.19.5

func (v *VersionedSignedBeaconBlock) BlobKZGCommitments() ([]deneb.KZGCommitment, error)

BlobKZGCommitments returns the blob KZG commitments of the beacon block.

func (*VersionedSignedBeaconBlock) BodyRoot added in v0.9.5

func (v *VersionedSignedBeaconBlock) BodyRoot() (phase0.Root, error)

BodyRoot returns the body root of the beacon block.

func (*VersionedSignedBeaconBlock) Deposits added in v0.19.0

func (v *VersionedSignedBeaconBlock) Deposits() ([]*phase0.Deposit, error)

Deposits returns the deposits of the beacon block.

func (*VersionedSignedBeaconBlock) ETH1Data added in v0.19.0

func (v *VersionedSignedBeaconBlock) ETH1Data() (*phase0.ETH1Data, error)

ETH1Data returns the eth1 data of the beacon block.

func (*VersionedSignedBeaconBlock) ExecutionBlockHash added in v0.18.1

func (v *VersionedSignedBeaconBlock) ExecutionBlockHash() (phase0.Hash32, error)

ExecutionBlockHash returns the block hash of the beacon block.

func (*VersionedSignedBeaconBlock) ExecutionBlockNumber added in v0.19.0

func (v *VersionedSignedBeaconBlock) ExecutionBlockNumber() (uint64, error)

ExecutionBlockNumber returns the block number of the beacon block.

func (*VersionedSignedBeaconBlock) ExecutionTransactions added in v0.19.0

func (v *VersionedSignedBeaconBlock) ExecutionTransactions() ([]bellatrix.Transaction, error)

ExecutionTransactions returs the execution payload transactions for the block.

func (*VersionedSignedBeaconBlock) Graffiti added in v0.19.0

func (v *VersionedSignedBeaconBlock) Graffiti() ([32]byte, error)

Graffiti returns the graffiti for the block.

func (*VersionedSignedBeaconBlock) ParentRoot added in v0.9.5

func (v *VersionedSignedBeaconBlock) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the beacon block.

func (*VersionedSignedBeaconBlock) ProposerIndex added in v0.19.0

func (v *VersionedSignedBeaconBlock) ProposerIndex() (phase0.ValidatorIndex, error)

ProposerIndex returns the proposer index of the beacon block.

func (*VersionedSignedBeaconBlock) ProposerSlashings added in v0.10.2

func (v *VersionedSignedBeaconBlock) ProposerSlashings() ([]*phase0.ProposerSlashing, error)

ProposerSlashings returns the proposer slashings of the beacon block.

func (*VersionedSignedBeaconBlock) RandaoReveal added in v0.19.0

func (v *VersionedSignedBeaconBlock) RandaoReveal() (phase0.BLSSignature, error)

RandaoReveal returns the randao reveal of the beacon block.

func (*VersionedSignedBeaconBlock) Root added in v0.9.6

Root returns the root of the beacon block.

func (*VersionedSignedBeaconBlock) Slot

Slot returns the slot of the signed beacon block.

func (*VersionedSignedBeaconBlock) StateRoot added in v0.9.5

func (v *VersionedSignedBeaconBlock) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the beacon block.

func (*VersionedSignedBeaconBlock) String added in v0.11.3

func (v *VersionedSignedBeaconBlock) String() string

String returns a string version of the structure.

func (*VersionedSignedBeaconBlock) SyncAggregate added in v0.18.1

func (v *VersionedSignedBeaconBlock) SyncAggregate() (*altair.SyncAggregate, error)

SyncAggregate returns the sync aggregate of the beacon block.

func (*VersionedSignedBeaconBlock) VoluntaryExits added in v0.19.0

func (v *VersionedSignedBeaconBlock) VoluntaryExits() ([]*phase0.SignedVoluntaryExit, error)

VoluntaryExits returns the voluntary exits of the beacon block.

func (*VersionedSignedBeaconBlock) Withdrawals added in v0.19.0

func (v *VersionedSignedBeaconBlock) Withdrawals() ([]*capella.Withdrawal, error)

Withdrawals returns the withdrawals of the beacon block.

Directories

Path Synopsis
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.

Jump to

Keyboard shortcuts

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