spec

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 237

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
	// DataVersionElectra is data applicable for the Electra release of the beacon chain.
	DataVersionElectra
	// DataVersionFulu is data applicable for the Fulu release of the beacon chain.
	DataVersionFulu
	// DataVersionGloas is data applicable for the Gloas release of the beacon chain.
	DataVersionGloas
)

func DataVersionFromString added in v0.25.1

func DataVersionFromString(fork string) (DataVersion, error)

DataVersionFromString turns a fork string into a DataVersion returns an error if the fork is not recognized.

func (*DataVersion) MarshalJSON

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

MarshalJSON implements json.Marshaler. The string comes from String() so the bounds check lives in one place; indexing dataVersionStrings here would panic on a version it has no entry for.

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 VersionedAggregateAndProof added in v0.24.0

type VersionedAggregateAndProof struct {
	Version   DataVersion
	Phase0    *phase0.AggregateAndProof
	Altair    *phase0.AggregateAndProof
	Bellatrix *phase0.AggregateAndProof
	Capella   *phase0.AggregateAndProof
	Deneb     *phase0.AggregateAndProof
	Electra   *electra.AggregateAndProof
	Fulu      *electra.AggregateAndProof
	// Gloas has its own container because gloas.Attestation merkleizes its aggregation bits as a
	// progressive bitlist, giving a different hash tree root (and so a different signing root)
	// from the electra container.
	Gloas *gloas.AggregateAndProof
}

VersionedAggregateAndProof contains a versioned aggregate and proof.

func (*VersionedAggregateAndProof) AggregatorIndex added in v0.24.0

func (v *VersionedAggregateAndProof) AggregatorIndex() (phase0.ValidatorIndex, error)

AggregatorIndex returns the aggregator index of the aggregate.

func (*VersionedAggregateAndProof) HashTreeRoot added in v0.24.0

func (v *VersionedAggregateAndProof) HashTreeRoot() ([32]byte, error)

HashTreeRoot returns the hash tree root of the aggregate and proof.

func (*VersionedAggregateAndProof) IsEmpty added in v0.24.0

func (v *VersionedAggregateAndProof) IsEmpty() bool

IsEmpty returns true if there is no aggregate and proof.

func (*VersionedAggregateAndProof) SelectionProof added in v0.24.0

func (v *VersionedAggregateAndProof) SelectionProof() (phase0.BLSSignature, error)

SelectionProof returns the selection proof of the aggregate.

func (*VersionedAggregateAndProof) String added in v0.24.0

func (v *VersionedAggregateAndProof) String() string

String returns a string version of the structure.

type VersionedAttestation added in v0.24.0

type VersionedAttestation struct {
	Version        DataVersion
	ValidatorIndex *phase0.ValidatorIndex
	Phase0         *phase0.Attestation
	Altair         *phase0.Attestation
	Bellatrix      *phase0.Attestation
	Capella        *phase0.Attestation
	Deneb          *phase0.Attestation
	Electra        *electra.Attestation
	Fulu           *electra.Attestation
	Gloas          *gloas.Attestation
}

VersionedAttestation contains a versioned attestation.

It has an UnmarshalJSON that reads the attestation as a node sends it, but intentionally no MarshalJSON: json.Marshal emits the struct layout, which carries no fork and no ValidatorIndex, and does not decode back to the same value.

func (*VersionedAttestation) AggregationBits added in v0.24.0

func (v *VersionedAttestation) AggregationBits() (bitfield.Bitlist, error)

AggregationBits returns the aggregation bits of the attestation.

func (*VersionedAttestation) CommitteeBits added in v0.24.0

func (v *VersionedAttestation) CommitteeBits() (bitfield.Bitvector64, error)

CommitteeBits returns the committee bits of the attestation.

func (*VersionedAttestation) CommitteeIndex added in v0.24.0

func (v *VersionedAttestation) CommitteeIndex() (phase0.CommitteeIndex, error)

CommitteeIndex returns the index if only one bit is set, otherwise error.

func (*VersionedAttestation) Data added in v0.24.0

Data returns the data of the attestation.

func (*VersionedAttestation) HashTreeRoot added in v0.24.0

func (v *VersionedAttestation) HashTreeRoot() ([32]byte, error)

func (*VersionedAttestation) IsEmpty added in v0.24.0

func (v *VersionedAttestation) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedAttestation) Signature added in v0.24.0

func (v *VersionedAttestation) Signature() (phase0.BLSSignature, error)

Signature returns the signature of the attestation.

func (*VersionedAttestation) String added in v0.24.0

func (v *VersionedAttestation) String() string

String returns a string version of the structure.

func (*VersionedAttestation) UnmarshalJSON added in v0.24.1

func (v *VersionedAttestation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type VersionedAttesterSlashing added in v0.24.0

type VersionedAttesterSlashing struct {
	Version   DataVersion
	Phase0    *phase0.AttesterSlashing
	Altair    *phase0.AttesterSlashing
	Bellatrix *phase0.AttesterSlashing
	Capella   *phase0.AttesterSlashing
	Deneb     *phase0.AttesterSlashing
	Electra   *electra.AttesterSlashing
	Fulu      *electra.AttesterSlashing
	Gloas     *gloas.AttesterSlashing
}

VersionedAttesterSlashing contains a versioned attestation.

func (*VersionedAttesterSlashing) Attestation1 added in v0.24.0

Attestation1 returns the first indexed attestation.

func (*VersionedAttesterSlashing) Attestation2 added in v0.24.0

Attestation2 returns the second indexed attestation.

func (*VersionedAttesterSlashing) IsEmpty added in v0.24.0

func (v *VersionedAttesterSlashing) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedAttesterSlashing) String added in v0.24.0

func (v *VersionedAttesterSlashing) String() string

String returns a string version of the structure.

type VersionedBeaconBlock

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

VersionedBeaconBlock contains a versioned beacon block.

func (*VersionedBeaconBlock) Attestations

func (v *VersionedBeaconBlock) Attestations() ([]VersionedAttestation, error)

Attestations returns the attestations of the beacon block.

func (*VersionedBeaconBlock) AttesterSlashings

func (v *VersionedBeaconBlock) AttesterSlashings() ([]VersionedAttesterSlashing, 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) ExecutionPayload added in v0.27.0

func (v *VersionedBeaconBlock) ExecutionPayload() (*VersionedExecutionPayload, error)

ExecutionPayload returns the execution payload 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) SignedExecutionPayloadBid added in v0.30.0

func (v *VersionedBeaconBlock) SignedExecutionPayloadBid() (*VersionedSignedExecutionPayloadBid, error)

SignedExecutionPayloadBid returns the execution payload bid 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
	Electra   *electra.BeaconBlockBody
	Fulu      *electra.BeaconBlockBody
	Gloas     *gloas.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
	Electra   *electra.BeaconState
	Fulu      *fulu.BeaconState
	Gloas     *gloas.BeaconState
}

VersionedBeaconState contains a versioned beacon state.

func (*VersionedBeaconState) Builders added in v0.30.0

func (v *VersionedBeaconState) Builders() ([]*gloas.Builder, error)

Builders returns the builders of the state.

func (*VersionedBeaconState) ConsolidationBalanceToConsume added in v0.24.0

func (v *VersionedBeaconState) ConsolidationBalanceToConsume() (phase0.Gwei, error)

ConsolidationBalanceToConsume returns the consolidation balance to consume of the state.

func (*VersionedBeaconState) DepositBalanceToConsume added in v0.24.0

func (v *VersionedBeaconState) DepositBalanceToConsume() (phase0.Gwei, error)

DepositBalanceToConsume returns the deposit balance to consume of the state.

func (*VersionedBeaconState) DepositRequestsStartIndex added in v0.24.0

func (v *VersionedBeaconState) DepositRequestsStartIndex() (uint64, error)

DepositRequestsStartIndex returns the deposit requests start index of the state.

func (*VersionedBeaconState) EarliestConsolidationEpoch added in v0.24.0

func (v *VersionedBeaconState) EarliestConsolidationEpoch() (phase0.Epoch, error)

EarliestConsolidationEpoch returns the earliest consolidation epoch of the state.

func (*VersionedBeaconState) EarliestExitEpoch added in v0.24.0

func (v *VersionedBeaconState) EarliestExitEpoch() (phase0.Epoch, error)

EarliestExitEpoch returns the earliest exit epoch of the state.

func (*VersionedBeaconState) ExecutionPayloadAvailability added in v0.30.0

func (v *VersionedBeaconState) ExecutionPayloadAvailability() ([]uint8, error)

ExecutionPayloadAvailability returns the execution payload availability of the state.

func (*VersionedBeaconState) ExitBalanceToConsume added in v0.24.0

func (v *VersionedBeaconState) ExitBalanceToConsume() (phase0.Gwei, error)

ExitBalanceToConsume returns the deposit balance to consume of the state.

func (*VersionedBeaconState) FieldGeneralizedIndex added in v0.25.1

func (v *VersionedBeaconState) FieldGeneralizedIndex(name string) (int, error)

FieldGeneralizedIndex returns the generalized index for a given field name. The generalized index represents the field's absolute position in the Merkle tree. This is used for generating and verifying Merkle proofs. Returns an error if the field doesn't exist or the state is empty.

func (*VersionedBeaconState) FieldIndex added in v0.25.1

func (v *VersionedBeaconState) FieldIndex(name string) (int, error)

FieldIndex returns the struct field index for a given field name. The index represents the field's position in the struct's memory layout. Returns an error if the field doesn't exist or the state is empty.

func (*VersionedBeaconState) FieldRoot added in v0.25.1

func (v *VersionedBeaconState) FieldRoot(name string) (phase0.Hash32, error)

FieldRoot returns the SSZ hash root of a specific field in the beacon state. Parameters:

  • name: The name of the field to get the root for

Returns:

  • phase0.Hash32: The SSZ hash root of the field
  • error: If the field doesn't exist, the state is empty, or the field is not hash tree rootable

func (*VersionedBeaconState) FieldTree added in v0.25.1

func (v *VersionedBeaconState) FieldTree(name string) (*treeproof.Node, error)

FieldTree returns the Merkle subtree for a specific field in the beacon state.

func (*VersionedBeaconState) GetTree added in v0.25.1

func (v *VersionedBeaconState) GetTree() (*treeproof.Node, error)

GetTree returns the GetTree of the specific beacon state version.

func (*VersionedBeaconState) HashTreeRoot added in v0.25.1

func (v *VersionedBeaconState) HashTreeRoot() (phase0.Hash32, error)

HashTreeRoot returns the HashTreeRoot of the specific beacon state version.

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) PendingConsolidations added in v0.24.0

func (v *VersionedBeaconState) PendingConsolidations() ([]*electra.PendingConsolidation, error)

PendingConsolidations returns the pending consolidations of the state.

func (*VersionedBeaconState) PendingDeposits added in v0.24.0

func (v *VersionedBeaconState) PendingDeposits() ([]*electra.PendingDeposit, error)

PendingDeposits returns the pending deposits of the state.

func (*VersionedBeaconState) PendingPartialWithdrawals added in v0.24.0

func (v *VersionedBeaconState) PendingPartialWithdrawals() ([]*electra.PendingPartialWithdrawal, error)

PendingPartialWithdrawals returns the pending partial withdrawals of the state.

func (*VersionedBeaconState) ProveField added in v0.25.1

func (v *VersionedBeaconState) ProveField(name string) ([]phase0.Hash32, error)

ProveField generates a Merkle proof for a specific field against the beacon state root. Parameters:

  • name: The name of the field to generate a proof for

Returns:

  • []phase0.Hash32: The Merkle proof as a sequence of 32-byte hashes
  • error: If the field doesn't exist or there's an error generating the proof

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) ValidatorAtIndex added in v0.25.1

func (v *VersionedBeaconState) ValidatorAtIndex(index phase0.ValidatorIndex) (*phase0.Validator, error)

ValidatorAtIndex returns the validator at the given index. This is a convenience method that handles accessing the validators array. Parameters:

  • index: The index of the validator to retrieve

Returns:

  • *phase0.Validator: The validator at the given index
  • error: If the index is invalid or there's an error accessing the validators

func (*VersionedBeaconState) ValidatorBalance added in v0.25.1

func (v *VersionedBeaconState) ValidatorBalance(index phase0.ValidatorIndex) (phase0.Gwei, error)

ValidatorBalance returns the balance of the validator at the given index. This is a convenience method that handles accessing the balances array. Parameters:

  • index: The index of the validator whose balance to retrieve

Returns:

  • phase0.Gwei: The balance in Gwei
  • error: If the index is invalid or there's an error accessing the balances

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.

func (*VersionedBeaconState) VerifyFieldProof added in v0.25.1

func (v *VersionedBeaconState) VerifyFieldProof(proof []phase0.Hash32, name string) (bool, error)

VerifyFieldProof verifies a Merkle proof for a field against the beacon state root. Parameters:

  • proof: The Merkle proof as a sequence of 32-byte hashes
  • name: The name of the field the proof is for

Returns:

  • bool: True if the proof is valid, false otherwise
  • error: If there's an error during verification

type VersionedExecutionPayload added in v0.27.0

type VersionedExecutionPayload struct {
	Version   DataVersion
	Bellatrix *bellatrix.ExecutionPayload
	Capella   *capella.ExecutionPayload
	Deneb     *deneb.ExecutionPayload
	Electra   *deneb.ExecutionPayload
	Fulu      *deneb.ExecutionPayload
	Gloas     *gloas.ExecutionPayload
}

VersionedExecutionPayload contains a versioned execution payload.

func (*VersionedExecutionPayload) BaseFeePerGas added in v0.27.0

func (v *VersionedExecutionPayload) BaseFeePerGas() (*uint256.Int, error)

BaseFeePerGas returns the base fee per gas of the execution payload.

func (*VersionedExecutionPayload) BlobGasUsed added in v0.27.0

func (v *VersionedExecutionPayload) BlobGasUsed() (uint64, error)

BlobGasUsed returns the blob gas used of the execution payload.

func (*VersionedExecutionPayload) BlockHash added in v0.27.0

func (v *VersionedExecutionPayload) BlockHash() (phase0.Hash32, error)

BlockHash returns the block hash of the execution payload.

func (*VersionedExecutionPayload) BlockNumber added in v0.27.0

func (v *VersionedExecutionPayload) BlockNumber() (uint64, error)

BlockNumber returns the block number of the execution payload.

func (*VersionedExecutionPayload) ExcessBlobGas added in v0.27.0

func (v *VersionedExecutionPayload) ExcessBlobGas() (uint64, error)

ExcessBlobGas returns the excess blob gas of the execution payload.

func (*VersionedExecutionPayload) ExtraData added in v0.27.0

func (v *VersionedExecutionPayload) ExtraData() ([]byte, error)

ExtraData returns the extra data of the execution payload.

func (*VersionedExecutionPayload) FeeRecipient added in v0.27.0

FeeRecipient returns the fee recipient of the execution payload.

func (*VersionedExecutionPayload) GasLimit added in v0.27.0

func (v *VersionedExecutionPayload) GasLimit() (uint64, error)

GasLimit returns the gas limit of the execution payload.

func (*VersionedExecutionPayload) GasUsed added in v0.27.0

func (v *VersionedExecutionPayload) GasUsed() (uint64, error)

GasUsed returns the gas used of the execution payload.

func (*VersionedExecutionPayload) IsEmpty added in v0.27.0

func (v *VersionedExecutionPayload) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedExecutionPayload) LogsBloom added in v0.27.0

func (v *VersionedExecutionPayload) LogsBloom() ([256]byte, error)

LogsBloom returns the logs bloom of the execution payload.

func (*VersionedExecutionPayload) ParentHash added in v0.27.0

func (v *VersionedExecutionPayload) ParentHash() (phase0.Hash32, error)

ParentHash returns the parent hash of the execution payload.

func (*VersionedExecutionPayload) PrevRandao added in v0.27.0

func (v *VersionedExecutionPayload) PrevRandao() ([32]byte, error)

PrevRandao returns the prev randao of the execution payload.

func (*VersionedExecutionPayload) ReceiptsRoot added in v0.27.0

func (v *VersionedExecutionPayload) ReceiptsRoot() (phase0.Root, error)

ReceiptsRoot returns the receipts root of the execution payload.

func (*VersionedExecutionPayload) StateRoot added in v0.27.0

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

StateRoot returns the state root of the execution payload.

func (*VersionedExecutionPayload) String added in v0.27.0

func (v *VersionedExecutionPayload) String() string

String returns a string version of the structure.

func (*VersionedExecutionPayload) Timestamp added in v0.27.0

func (v *VersionedExecutionPayload) Timestamp() (uint64, error)

Timestamp returns the timestamp of the execution payload.

func (*VersionedExecutionPayload) Transactions added in v0.27.0

func (v *VersionedExecutionPayload) Transactions() ([]bellatrix.Transaction, error)

Transactions returns the transactions of the execution payload.

func (*VersionedExecutionPayload) Withdrawals added in v0.27.0

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

Withdrawals returns the withdrawals of the execution payload.

type VersionedExecutionPayloadEnvelope added in v0.30.0

type VersionedExecutionPayloadEnvelope struct {
	Version DataVersion
	Gloas   *gloas.ExecutionPayloadEnvelope
}

VersionedExecutionPayloadEnvelope contains a versioned execution payload envelope (EIP-7732). The envelope is a gloas-onwards container; this wrapper exists so callers can treat it uniformly with other versioned types.

func (*VersionedExecutionPayloadEnvelope) BeaconBlockRoot added in v0.30.0

func (v *VersionedExecutionPayloadEnvelope) BeaconBlockRoot() (phase0.Root, error)

BeaconBlockRoot returns the beacon block root of the envelope.

func (*VersionedExecutionPayloadEnvelope) BuilderIndex added in v0.30.0

BuilderIndex returns the builder index of the envelope.

func (*VersionedExecutionPayloadEnvelope) ExecutionRequests added in v0.30.0

ExecutionRequests returns the execution requests of the envelope.

func (*VersionedExecutionPayloadEnvelope) IsEmpty added in v0.30.0

IsEmpty returns true if no fork-specific envelope is populated.

func (*VersionedExecutionPayloadEnvelope) ParentBeaconBlockRoot added in v0.30.0

func (v *VersionedExecutionPayloadEnvelope) ParentBeaconBlockRoot() (phase0.Root, error)

ParentBeaconBlockRoot returns the parent beacon block root of the envelope.

func (*VersionedExecutionPayloadEnvelope) Payload added in v0.30.0

Payload returns the execution payload of the envelope.

func (*VersionedExecutionPayloadEnvelope) String added in v0.30.0

String returns a string version of the structure.

type VersionedExecutionRequests added in v0.30.0

type VersionedExecutionRequests struct {
	Version DataVersion
	Electra *electra.ExecutionRequests
	Fulu    *electra.ExecutionRequests
	Gloas   *gloas.ExecutionRequests
}

VersionedExecutionRequests contains versioned execution layer triggered requests. The container is introduced in Electra; builder requests are added in Gloas (EIP-8282).

func (*VersionedExecutionRequests) BuilderDeposits added in v0.30.0

func (v *VersionedExecutionRequests) BuilderDeposits() ([]*gloas.BuilderDepositRequest, error)

BuilderDeposits returns the builder deposit requests (EIP-8282, gloas onwards).

func (*VersionedExecutionRequests) BuilderExits added in v0.30.0

func (v *VersionedExecutionRequests) BuilderExits() ([]*gloas.BuilderExitRequest, error)

BuilderExits returns the builder exit requests (EIP-8282, gloas onwards).

func (*VersionedExecutionRequests) Consolidations added in v0.30.0

Consolidations returns the consolidation requests.

func (*VersionedExecutionRequests) Deposits added in v0.30.0

Deposits returns the deposit requests.

func (*VersionedExecutionRequests) IsEmpty added in v0.30.0

func (v *VersionedExecutionRequests) IsEmpty() bool

IsEmpty returns true if no fork-specific execution requests are populated.

func (*VersionedExecutionRequests) String added in v0.30.0

func (v *VersionedExecutionRequests) String() string

String returns a string version of the structure.

func (*VersionedExecutionRequests) Withdrawals added in v0.30.0

Withdrawals returns the withdrawal requests.

type VersionedIndexedAttestation added in v0.24.0

VersionedIndexedAttestation contains a versioned indexed attestation.

func (*VersionedIndexedAttestation) AttestingIndices added in v0.24.0

func (v *VersionedIndexedAttestation) AttestingIndices() ([]uint64, error)

AttestingIndices returns the attesting indices of the indexed attestation.

func (*VersionedIndexedAttestation) Data added in v0.24.0

Data returns the data of the indexed attestation.

func (*VersionedIndexedAttestation) IsEmpty added in v0.24.0

func (v *VersionedIndexedAttestation) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedIndexedAttestation) Signature added in v0.24.0

Signature returns the signature of the indexed attestation.

func (*VersionedIndexedAttestation) String added in v0.24.0

func (v *VersionedIndexedAttestation) String() string

String returns a string version of the structure.

type VersionedPayloadAttestation added in v0.30.0

type VersionedPayloadAttestation struct {
	Version DataVersion
	Gloas   *gloas.PayloadAttestation
}

VersionedPayloadAttestation contains a versioned payload attestation (EIP-7732): the aggregate form held in the operations pool, in which a single signature covers the payload timeliness committee members named by the aggregation bits. It is a gloas-onwards container; the wrapper exists so callers can branch on Version uniformly with the other versioned types.

func (*VersionedPayloadAttestation) AggregationBits added in v0.30.0

func (v *VersionedPayloadAttestation) AggregationBits() (bitfield.Bitvector512, error)

AggregationBits returns the bits of the payload timeliness committee covered by the attestation's signature.

The returned value's own BitAt, SetBitAt, Len and Shift methods are mainnet-only and must not be used; read and write participation through gloas.PayloadAttestation's AttestedAt, SetAttestedAt and PTCSize instead, which hold at any preset width. Note that width is the producing node's claim rather than a verified fact; see PTCSize.

func (*VersionedPayloadAttestation) Data added in v0.30.0

Data returns the data being attested to.

func (*VersionedPayloadAttestation) IsEmpty added in v0.30.0

func (v *VersionedPayloadAttestation) IsEmpty() bool

IsEmpty returns true if no fork-specific payload attestation is populated.

func (*VersionedPayloadAttestation) Signature added in v0.30.0

Signature returns the aggregate signature of the payload attestation.

func (*VersionedPayloadAttestation) String added in v0.30.0

func (v *VersionedPayloadAttestation) String() string

String returns a string version of the structure.

type VersionedPayloadAttestationData added in v0.30.0

type VersionedPayloadAttestationData struct {
	Version DataVersion
	Gloas   *gloas.PayloadAttestationData
}

VersionedPayloadAttestationData contains a versioned payload attestation data (EIP-7732). This is the datum a payload timeliness committee member signs, and is a gloas-onwards container; the wrapper exists so callers can branch on Version uniformly with the other versioned types.

func (*VersionedPayloadAttestationData) BeaconBlockRoot added in v0.30.0

func (v *VersionedPayloadAttestationData) BeaconBlockRoot() (phase0.Root, error)

BeaconBlockRoot returns the root of the beacon block being attested to.

func (*VersionedPayloadAttestationData) BlobDataAvailable added in v0.30.0

func (v *VersionedPayloadAttestationData) BlobDataAvailable() (bool, error)

BlobDataAvailable returns true if the blob data for the payload was available.

func (*VersionedPayloadAttestationData) IsEmpty added in v0.30.0

IsEmpty returns true if no fork-specific payload attestation data is populated.

func (*VersionedPayloadAttestationData) PayloadPresent added in v0.30.0

func (v *VersionedPayloadAttestationData) PayloadPresent() (bool, error)

PayloadPresent returns true if the execution payload was revealed on time.

func (*VersionedPayloadAttestationData) Slot added in v0.30.0

Slot returns the slot of the payload attestation data.

func (*VersionedPayloadAttestationData) String added in v0.30.0

String returns a string version of the structure.

type VersionedPayloadAttestationMessage added in v0.30.0

type VersionedPayloadAttestationMessage struct {
	Version DataVersion
	Gloas   *gloas.PayloadAttestationMessage
}

VersionedPayloadAttestationMessage contains a versioned payload attestation message (EIP-7732): the unaggregated form a single payload timeliness committee member broadcasts. It is a gloas-onwards container; the wrapper exists so that the Eth-Consensus-Version header required when submitting one is derived from the caller's data rather than hard-coded.

func (*VersionedPayloadAttestationMessage) Data added in v0.30.0

Data returns the data being attested to.

func (*VersionedPayloadAttestationMessage) IsEmpty added in v0.30.0

IsEmpty returns true if no fork-specific message is populated.

func (*VersionedPayloadAttestationMessage) Signature added in v0.30.0

Signature returns the signature of the message.

func (*VersionedPayloadAttestationMessage) String added in v0.30.0

String returns a string version of the structure.

func (*VersionedPayloadAttestationMessage) ValidatorIndex added in v0.30.0

ValidatorIndex returns the index of the attesting validator.

type VersionedSignedAggregateAndProof added in v0.24.0

type VersionedSignedAggregateAndProof struct {
	Version   DataVersion
	Phase0    *phase0.SignedAggregateAndProof
	Altair    *phase0.SignedAggregateAndProof
	Bellatrix *phase0.SignedAggregateAndProof
	Capella   *phase0.SignedAggregateAndProof
	Deneb     *phase0.SignedAggregateAndProof
	Electra   *electra.SignedAggregateAndProof
	Fulu      *electra.SignedAggregateAndProof
	// Gloas has its own container because gloas.Attestation merkleizes its aggregation bits as a
	// progressive bitlist, giving a different hash tree root (and so a different signing root)
	// from the electra container.
	Gloas *gloas.SignedAggregateAndProof
}

VersionedSignedAggregateAndProof contains a versioned signed aggregate and proof.

func (*VersionedSignedAggregateAndProof) AggregatorIndex added in v0.24.0

AggregatorIndex returns the aggregator index of the aggregate.

func (*VersionedSignedAggregateAndProof) IsEmpty added in v0.24.0

IsEmpty returns true if there is no aggregate and proof.

func (*VersionedSignedAggregateAndProof) SelectionProof added in v0.24.0

SelectionProof returns the selection proof of the signed aggregate.

func (*VersionedSignedAggregateAndProof) Signature added in v0.24.0

Signature returns the signature of the signed aggregate and proof.

func (*VersionedSignedAggregateAndProof) Slot added in v0.24.0

Slot returns the slot of the signed aggregate and proof.

func (*VersionedSignedAggregateAndProof) String added in v0.24.0

String returns a string version of the structure.

type VersionedSignedBeaconBlock

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

VersionedSignedBeaconBlock contains a versioned signed beacon block.

func (*VersionedSignedBeaconBlock) Attestations

func (v *VersionedSignedBeaconBlock) Attestations() ([]*VersionedAttestation, error)

Attestations returns the attestations of the beacon block.

func (*VersionedSignedBeaconBlock) AttesterSlashings added in v0.10.2

func (v *VersionedSignedBeaconBlock) AttesterSlashings() ([]VersionedAttesterSlashing, 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) ExecutionPayload added in v0.27.0

ExecutionPayload returns the execution payload of the signed beacon block.

func (*VersionedSignedBeaconBlock) ExecutionRequests added in v0.24.0

func (v *VersionedSignedBeaconBlock) ExecutionRequests() (*electra.ExecutionRequests, error)

ExecutionRequests returs the execution requests for the block.

func (*VersionedSignedBeaconBlock) ExecutionTransactions added in v0.19.0

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

ExecutionTransactions returns 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) SignedExecutionPayloadBid added in v0.30.0

func (v *VersionedSignedBeaconBlock) SignedExecutionPayloadBid() (*VersionedSignedExecutionPayloadBid, error)

SignedExecutionPayloadBid returns the execution payload bid 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.

type VersionedSignedExecutionPayloadBid added in v0.30.0

type VersionedSignedExecutionPayloadBid struct {
	Version DataVersion
	Gloas   *gloas.SignedExecutionPayloadBid
}

VersionedSignedExecutionPayloadBid contains a versioned signed execution payload bid.

func (*VersionedSignedExecutionPayloadBid) BlobKZGCommitments added in v0.30.0

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

BlobKZGCommitments returns the blob kzg commitments of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) BlockHash added in v0.30.0

BlockHash returns the block hash of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) BuilderIndex added in v0.30.0

BuilderIndex returns the builder index of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) ExecutionPayment added in v0.30.0

func (v *VersionedSignedExecutionPayloadBid) ExecutionPayment() (phase0.Gwei, error)

ExecutionPayment returns the execution payment of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) FeeRecipient added in v0.30.0

FeeRecipient returns the fee recipient of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) GasLimit added in v0.30.0

GasLimit returns the gas limit of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) ParentBlockHash added in v0.30.0

func (v *VersionedSignedExecutionPayloadBid) ParentBlockHash() (phase0.Hash32, error)

ParentBlockHash returns the parent block hash of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) ParentBlockRoot added in v0.30.0

func (v *VersionedSignedExecutionPayloadBid) ParentBlockRoot() (phase0.Root, error)

ParentBlockRoot returns the parent block root of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) Signature added in v0.30.0

Signature returns the signature of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) Slot added in v0.30.0

Slot returns the slot of the execution payload bid.

func (*VersionedSignedExecutionPayloadBid) String added in v0.30.0

String returns a string version of the structure.

func (*VersionedSignedExecutionPayloadBid) Value added in v0.30.0

Value returns the value of the execution payload bid.

type VersionedSignedExecutionPayloadEnvelope added in v0.30.0

type VersionedSignedExecutionPayloadEnvelope struct {
	Version DataVersion
	Gloas   *gloas.SignedExecutionPayloadEnvelope
}

VersionedSignedExecutionPayloadEnvelope contains a versioned signed execution payload envelope (EIP-7732). The envelope is a gloas-onwards container; this wrapper exists so callers can treat it uniformly with other versioned types.

func (*VersionedSignedExecutionPayloadEnvelope) BeaconBlockRoot added in v0.30.0

func (v *VersionedSignedExecutionPayloadEnvelope) BeaconBlockRoot() (phase0.Root, error)

BeaconBlockRoot returns the beacon block root of the signed envelope.

func (*VersionedSignedExecutionPayloadEnvelope) BuilderIndex added in v0.30.0

BuilderIndex returns the builder index of the signed envelope.

func (*VersionedSignedExecutionPayloadEnvelope) ExecutionRequests added in v0.30.0

ExecutionRequests returns the execution requests contained in the signed envelope.

func (*VersionedSignedExecutionPayloadEnvelope) IsEmpty added in v0.30.0

IsEmpty returns true if no fork-specific envelope is populated.

func (*VersionedSignedExecutionPayloadEnvelope) Message added in v0.30.0

Message returns the inner ExecutionPayloadEnvelope.

func (*VersionedSignedExecutionPayloadEnvelope) ParentBeaconBlockRoot added in v0.30.0

func (v *VersionedSignedExecutionPayloadEnvelope) ParentBeaconBlockRoot() (phase0.Root, error)

ParentBeaconBlockRoot returns the parent beacon block root of the signed envelope.

func (*VersionedSignedExecutionPayloadEnvelope) Payload added in v0.30.0

Payload returns the execution payload contained in the signed envelope.

func (*VersionedSignedExecutionPayloadEnvelope) Signature added in v0.30.0

Signature returns the signature on the envelope.

func (*VersionedSignedExecutionPayloadEnvelope) String added in v0.30.0

String returns a string version of the structure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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