builder

package
v4.2.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 29 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.Wrap(ErrNotOK, "recv 400 BadRequest response from API")

ErrBadRequest specifically means that a '400 - BAD REQUEST' response was received from the API.

View Source
var ErrNoContent = errors.New("recv 204 no content response from API, No header is available")

ErrNoContent specifically means that a '204 - No Content' response was received from the API. Typically, a 204 is a success but in this case for the Header API means No header is available

View Source
var ErrNotFound = errors.Wrap(ErrNotOK, "recv 404 NotFound response from API")

ErrNotFound specifically means that a '404 - NOT FOUND' response was received from the API.

View Source
var ErrNotOK = errors.New("did not receive 200 response from API")

ErrNotOK is used to indicate when an HTTP request to the Beacon Node API failed with any non-2xx response code. More specific errors may be returned, but an error in reaction to a non-2xx response will always wrap ErrNotOK.

Functions

This section is empty.

Types

type Attestation

type Attestation struct {
	*eth.Attestation
}

Attestation is a field of Beacon Block Body.

func (*Attestation) MarshalJSON

func (a *Attestation) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of Attestation.

type AttestationData

type AttestationData struct {
	*eth.AttestationData
}

AttestationData is a field of IndexedAttestation.

func (*AttestationData) MarshalJSON

func (a *AttestationData) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of AttestationData.

type AttesterSlashing

type AttesterSlashing struct {
	*eth.AttesterSlashing
}

AttesterSlashing is a field of a Beacon Block Body.

func (*AttesterSlashing) MarshalJSON

func (s *AttesterSlashing) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of AttesterSlashing.

type BLSToExecutionChange

type BLSToExecutionChange struct {
	*eth.BLSToExecutionChange
}

BLSToExecutionChange is a field in SignedBLSToExecutionChange.

func (*BLSToExecutionChange) MarshalJSON

func (ch *BLSToExecutionChange) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of BLSToExecutionChange.

type BeaconBlockHeader

type BeaconBlockHeader struct {
	*eth.BeaconBlockHeader
}

BeaconBlockHeader is a field of SignedBeaconBlockHeader.

func (*BeaconBlockHeader) MarshalJSON

func (h *BeaconBlockHeader) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of BeaconBlockHeader.

type Bid

type Bid interface {
	Header() (interfaces.ExecutionData, error)
	BlobKzgCommitments() ([][]byte, error)
	Value() []byte
	Pubkey() []byte
	Version() int
	IsNil() bool
	HashTreeRoot() ([32]byte, error)
	HashTreeRootWith(hh *ssz.Hasher) error
}

Bid is an interface describing the method set of a builder bid.

func WrappedBuilderBid

func WrappedBuilderBid(p *ethpb.BuilderBid) (Bid, error)

WrappedBuilderBid is a constructor which wraps a protobuf bid into an interface.

func WrappedBuilderBidCapella

func WrappedBuilderBidCapella(p *ethpb.BuilderBidCapella) (Bid, error)

WrappedBuilderBidCapella is a constructor which wraps a protobuf bid into an interface.

func WrappedBuilderBidDeneb added in v4.1.0

func WrappedBuilderBidDeneb(p *ethpb.BuilderBidDeneb) (Bid, error)

WrappedBuilderBidDeneb is a constructor which wraps a protobuf bid into an interface.

type BlobsBundle added in v4.1.0

type BlobsBundle struct {
	Commitments []hexutil.Bytes `json:"commitments"`
	Proofs      []hexutil.Bytes `json:"proofs"`
	Blobs       []hexutil.Bytes `json:"blobs"`
}

BlobsBundle is a field in ExecutionPayloadDenebAndBlobsBundle.

func FromBundleProto added in v4.2.0

func FromBundleProto(bundle *v1.BlobsBundle) *BlobsBundle

FromBundleProto converts the proto bundle type to the builder type.

func (BlobsBundle) ToProto added in v4.1.0

func (b BlobsBundle) ToProto() (*v1.BlobsBundle, error)

ToProto returns a BlobsBundle Proto.

type BuilderBid

type BuilderBid struct {
	Header *ExecutionPayloadHeader `json:"header"`
	Value  Uint256                 `json:"value"`
	Pubkey hexutil.Bytes           `json:"pubkey"`
}

BuilderBid is part of ExecHeaderResponse for Bellatrix.

func (*BuilderBid) ToProto

func (bb *BuilderBid) ToProto() (*eth.BuilderBid, error)

ToProto returns a BuilderBid Proto for Bellatrix.

type BuilderBidCapella

type BuilderBidCapella struct {
	Header *ExecutionPayloadHeaderCapella `json:"header"`
	Value  Uint256                        `json:"value"`
	Pubkey hexutil.Bytes                  `json:"pubkey"`
}

BuilderBidCapella is field of ExecHeaderResponseCapella.

func (*BuilderBidCapella) ToProto

func (bb *BuilderBidCapella) ToProto() (*eth.BuilderBidCapella, error)

ToProto returns a BuilderBidCapella Proto.

type BuilderBidDeneb added in v4.1.0

type BuilderBidDeneb struct {
	Header             *ExecutionPayloadHeaderDeneb `json:"header"`
	BlobKzgCommitments []hexutil.Bytes              `json:"blob_kzg_commitments"`
	Value              Uint256                      `json:"value"`
	Pubkey             hexutil.Bytes                `json:"pubkey"`
}

BuilderBidDeneb is a field of ExecHeaderResponseDeneb.

func (*BuilderBidDeneb) ToProto added in v4.1.0

func (bb *BuilderBidDeneb) ToProto() (*eth.BuilderBidDeneb, error)

ToProto creates a BuilderBidDeneb Proto from BuilderBidDeneb.

type BuilderClient

type BuilderClient interface {
	NodeURL() string
	GetHeader(ctx context.Context, slot primitives.Slot, parentHash [32]byte, pubkey [48]byte) (SignedBid, error)
	RegisterValidator(ctx context.Context, svr []*ethpb.SignedValidatorRegistrationV1) error
	SubmitBlindedBlock(ctx context.Context, sb interfaces.ReadOnlySignedBeaconBlock) (interfaces.ExecutionData, *v1.BlobsBundle, error)
	Status(ctx context.Context) error
}

BuilderClient provides a collection of helper methods for calling Builder API endpoints.

type Checkpoint

type Checkpoint struct {
	*eth.Checkpoint
}

Checkpoint is a field of AttestationData.

func (*Checkpoint) MarshalJSON

func (c *Checkpoint) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of Checkpoint.

type Client

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

Client provides a collection of helper methods for calling Builder API endpoints.

func NewClient

func NewClient(host string, opts ...ClientOpt) (*Client, error)

NewClient constructs a new client with the provided options (ex WithTimeout). `host` is the base host + port used to construct request urls. This value can be a URL string, or NewClient will assume an http endpoint if just `host:port` is used.

func (*Client) GetHeader

func (c *Client) GetHeader(ctx context.Context, slot primitives.Slot, parentHash [32]byte, pubkey [48]byte) (SignedBid, error)

GetHeader is used by a proposing validator to request an execution payload header from the Builder node.

func (*Client) NodeURL

func (c *Client) NodeURL() string

NodeURL returns a human-readable string representation of the beacon node base url.

func (*Client) RegisterValidator

func (c *Client) RegisterValidator(ctx context.Context, svr []*ethpb.SignedValidatorRegistrationV1) error

RegisterValidator encodes the SignedValidatorRegistrationV1 message to json (including hex-encoding the byte fields with 0x prefixes) and posts to the builder validator registration endpoint.

func (*Client) Status

func (c *Client) Status(ctx context.Context) error

Status asks the remote builder server for a health check. A response of 200 with an empty body is the success/healthy response, and an error response may have an error message. This method will return a nil value for error in the happy path, and an error with information about the server response body for a non-200 response.

func (*Client) SubmitBlindedBlock

SubmitBlindedBlock calls the builder API endpoint that binds the validator to the builder and submits the block. The response is the full execution payload used to create the blinded block.

type ClientOpt

type ClientOpt func(*Client)

ClientOpt is a functional option for the Client type (http.Client wrapper)

func WithObserver

func WithObserver(m observer) ClientOpt

type Deposit

type Deposit struct {
	*eth.Deposit
}

Deposit is a field of Beacon Block Body.

func (*Deposit) MarshalJSON

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

MarshalJSON returns a JSON byte array representation of Deposit.

type DepositData

type DepositData struct {
	*eth.Deposit_Data
}

DepositData is a field of Deposit.

func (*DepositData) MarshalJSON

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

MarshalJSON returns a JSON byte array representation of DepositData.

type ErrorMessage

type ErrorMessage struct {
	Code        int      `json:"code"`
	Message     string   `json:"message"`
	Stacktraces []string `json:"stacktraces,omitempty"`
}

ErrorMessage is a JSON representation of the builder API's returned error message.

type Eth1Data

type Eth1Data struct {
	*eth.Eth1Data
}

Eth1Data is a field of Beacon Block Body.

func (*Eth1Data) MarshalJSON

func (e *Eth1Data) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of Eth1Data.

type ExecHeaderResponse

type ExecHeaderResponse struct {
	Version string `json:"version"`
	Data    struct {
		Signature hexutil.Bytes `json:"signature"`
		Message   *BuilderBid   `json:"message"`
	} `json:"data"`
}

ExecHeaderResponse is a JSON representation of the builder API header response for Bellatrix.

func (*ExecHeaderResponse) ToProto

func (ehr *ExecHeaderResponse) ToProto() (*eth.SignedBuilderBid, error)

ToProto returns a SignedBuilderBid from ExecHeaderResponse for Bellatrix.

type ExecHeaderResponseCapella

type ExecHeaderResponseCapella struct {
	Data struct {
		Signature hexutil.Bytes      `json:"signature"`
		Message   *BuilderBidCapella `json:"message"`
	} `json:"data"`
}

ExecHeaderResponseCapella is the response of builder API /eth/v1/builder/header/{slot}/{parent_hash}/{pubkey} for Capella.

func (*ExecHeaderResponseCapella) ToProto

ToProto returns a SignedBuilderBidCapella Proto from ExecHeaderResponseCapella.

type ExecHeaderResponseDeneb added in v4.1.0

type ExecHeaderResponseDeneb struct {
	Data struct {
		Signature hexutil.Bytes    `json:"signature"`
		Message   *BuilderBidDeneb `json:"message"`
	} `json:"data"`
}

ExecHeaderResponseDeneb is the header response for builder API /eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}.

func (*ExecHeaderResponseDeneb) ToProto added in v4.1.0

ToProto creates a SignedBuilderBidDeneb Proto from ExecHeaderResponseDeneb.

type ExecPayloadResponse

type ExecPayloadResponse struct {
	Version string           `json:"version"`
	Data    ExecutionPayload `json:"data"`
}

ExecPayloadResponse is the builder API /eth/v1/builder/blinded_blocks for Bellatrix.

func (*ExecPayloadResponse) ToProto

func (r *ExecPayloadResponse) ToProto() (*v1.ExecutionPayload, error)

ToProto returns a ExecutionPayload Proto from ExecPayloadResponse

type ExecPayloadResponseCapella

type ExecPayloadResponseCapella struct {
	Version string                  `json:"version"`
	Data    ExecutionPayloadCapella `json:"data"`
}

ExecPayloadResponseCapella is the builder API /eth/v1/builder/blinded_blocks for Capella.

func (*ExecPayloadResponseCapella) ToProto

ToProto returns a ExecutionPayloadCapella Proto.

type ExecPayloadResponseDeneb added in v4.1.0

type ExecPayloadResponseDeneb struct {
	Version string                               `json:"version"`
	Data    *ExecutionPayloadDenebAndBlobsBundle `json:"data"`
}

ExecPayloadResponseDeneb the response to the build API /eth/v1/builder/blinded_blocks that includes the version, execution payload object , and blobs bundle object.

func (*ExecPayloadResponseDeneb) ToProto added in v4.1.0

ToProto returns ExecutionPayloadDeneb Proto and BlobsBundle Proto separately.

type ExecutionPayload

type ExecutionPayload struct {
	ParentHash    hexutil.Bytes   `json:"parent_hash"`
	FeeRecipient  hexutil.Bytes   `json:"fee_recipient"`
	StateRoot     hexutil.Bytes   `json:"state_root"`
	ReceiptsRoot  hexutil.Bytes   `json:"receipts_root"`
	LogsBloom     hexutil.Bytes   `json:"logs_bloom"`
	PrevRandao    hexutil.Bytes   `json:"prev_randao"`
	BlockNumber   Uint64String    `json:"block_number"`
	GasLimit      Uint64String    `json:"gas_limit"`
	GasUsed       Uint64String    `json:"gas_used"`
	Timestamp     Uint64String    `json:"timestamp"`
	ExtraData     hexutil.Bytes   `json:"extra_data"`
	BaseFeePerGas Uint256         `json:"base_fee_per_gas"`
	BlockHash     hexutil.Bytes   `json:"block_hash"`
	Transactions  []hexutil.Bytes `json:"transactions"`
}

ExecutionPayload is a field of ExecPayloadResponse

func FromProto added in v4.0.4

func FromProto(payload *v1.ExecutionPayload) (ExecutionPayload, error)

FromProto converts a proto execution payload type to our builder compatible payload type.

func (*ExecutionPayload) ToProto

func (p *ExecutionPayload) ToProto() (*v1.ExecutionPayload, error)

ToProto returns a ExecutionPayload Proto

type ExecutionPayloadCapella

type ExecutionPayloadCapella struct {
	ParentHash    hexutil.Bytes   `json:"parent_hash"`
	FeeRecipient  hexutil.Bytes   `json:"fee_recipient"`
	StateRoot     hexutil.Bytes   `json:"state_root"`
	ReceiptsRoot  hexutil.Bytes   `json:"receipts_root"`
	LogsBloom     hexutil.Bytes   `json:"logs_bloom"`
	PrevRandao    hexutil.Bytes   `json:"prev_randao"`
	BlockNumber   Uint64String    `json:"block_number"`
	GasLimit      Uint64String    `json:"gas_limit"`
	GasUsed       Uint64String    `json:"gas_used"`
	Timestamp     Uint64String    `json:"timestamp"`
	ExtraData     hexutil.Bytes   `json:"extra_data"`
	BaseFeePerGas Uint256         `json:"base_fee_per_gas"`
	BlockHash     hexutil.Bytes   `json:"block_hash"`
	Transactions  []hexutil.Bytes `json:"transactions"`
	Withdrawals   []Withdrawal    `json:"withdrawals"`
}

ExecutionPayloadCapella is a field of ExecPayloadResponseCapella.

func FromProtoCapella added in v4.0.4

func FromProtoCapella(payload *v1.ExecutionPayloadCapella) (ExecutionPayloadCapella, error)

FromProtoCapella converts a proto execution payload type for capella to our builder compatible payload type.

func (*ExecutionPayloadCapella) ToProto

ToProto returns a ExecutionPayloadCapella Proto.

type ExecutionPayloadDeneb added in v4.1.0

type ExecutionPayloadDeneb struct {
	ParentHash    hexutil.Bytes   `json:"parent_hash"`
	FeeRecipient  hexutil.Bytes   `json:"fee_recipient"`
	StateRoot     hexutil.Bytes   `json:"state_root"`
	ReceiptsRoot  hexutil.Bytes   `json:"receipts_root"`
	LogsBloom     hexutil.Bytes   `json:"logs_bloom"`
	PrevRandao    hexutil.Bytes   `json:"prev_randao"`
	BlockNumber   Uint64String    `json:"block_number"`
	GasLimit      Uint64String    `json:"gas_limit"`
	GasUsed       Uint64String    `json:"gas_used"`
	Timestamp     Uint64String    `json:"timestamp"`
	ExtraData     hexutil.Bytes   `json:"extra_data"`
	BaseFeePerGas Uint256         `json:"base_fee_per_gas"`
	BlockHash     hexutil.Bytes   `json:"block_hash"`
	Transactions  []hexutil.Bytes `json:"transactions"`
	Withdrawals   []Withdrawal    `json:"withdrawals"`
	BlobGasUsed   Uint64String    `json:"blob_gas_used"`   // new in deneb
	ExcessBlobGas Uint64String    `json:"excess_blob_gas"` // new in deneb
}

ExecutionPayloadDeneb is a field used in ExecutionPayloadDenebAndBlobsBundle.

func FromProtoDeneb added in v4.2.0

func FromProtoDeneb(payload *v1.ExecutionPayloadDeneb) (ExecutionPayloadDeneb, error)

func (*ExecutionPayloadDeneb) ToProto added in v4.1.0

ToProto returns the ExecutionPayloadDeneb Proto.

type ExecutionPayloadDenebAndBlobsBundle added in v4.1.0

type ExecutionPayloadDenebAndBlobsBundle struct {
	ExecutionPayload *ExecutionPayloadDeneb `json:"execution_payload"`
	BlobsBundle      *BlobsBundle           `json:"blobs_bundle"`
}

ExecutionPayloadDenebAndBlobsBundle the main field used in ExecPayloadResponseDeneb.

type ExecutionPayloadHeader

type ExecutionPayloadHeader struct {
	ParentHash       hexutil.Bytes `json:"parent_hash"`
	FeeRecipient     hexutil.Bytes `json:"fee_recipient"`
	StateRoot        hexutil.Bytes `json:"state_root"`
	ReceiptsRoot     hexutil.Bytes `json:"receipts_root"`
	LogsBloom        hexutil.Bytes `json:"logs_bloom"`
	PrevRandao       hexutil.Bytes `json:"prev_randao"`
	BlockNumber      Uint64String  `json:"block_number"`
	GasLimit         Uint64String  `json:"gas_limit"`
	GasUsed          Uint64String  `json:"gas_used"`
	Timestamp        Uint64String  `json:"timestamp"`
	ExtraData        hexutil.Bytes `json:"extra_data"`
	BaseFeePerGas    Uint256       `json:"base_fee_per_gas"`
	BlockHash        hexutil.Bytes `json:"block_hash"`
	TransactionsRoot hexutil.Bytes `json:"transactions_root"`
	*v1.ExecutionPayloadHeader
}

ExecutionPayloadHeader is a field in BuilderBid.

func (*ExecutionPayloadHeader) MarshalJSON

func (h *ExecutionPayloadHeader) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON bytes representation of ExecutionPayloadHeader.

func (*ExecutionPayloadHeader) ToProto

ToProto returns a ExecutionPayloadHeader for Bellatrix.

func (*ExecutionPayloadHeader) UnmarshalJSON

func (h *ExecutionPayloadHeader) UnmarshalJSON(b []byte) error

UnmarshalJSON takes in a JSON byte array and sets ExecutionPayloadHeader.

type ExecutionPayloadHeaderCapella

type ExecutionPayloadHeaderCapella struct {
	ParentHash       hexutil.Bytes `json:"parent_hash"`
	FeeRecipient     hexutil.Bytes `json:"fee_recipient"`
	StateRoot        hexutil.Bytes `json:"state_root"`
	ReceiptsRoot     hexutil.Bytes `json:"receipts_root"`
	LogsBloom        hexutil.Bytes `json:"logs_bloom"`
	PrevRandao       hexutil.Bytes `json:"prev_randao"`
	BlockNumber      Uint64String  `json:"block_number"`
	GasLimit         Uint64String  `json:"gas_limit"`
	GasUsed          Uint64String  `json:"gas_used"`
	Timestamp        Uint64String  `json:"timestamp"`
	ExtraData        hexutil.Bytes `json:"extra_data"`
	BaseFeePerGas    Uint256       `json:"base_fee_per_gas"`
	BlockHash        hexutil.Bytes `json:"block_hash"`
	TransactionsRoot hexutil.Bytes `json:"transactions_root"`
	WithdrawalsRoot  hexutil.Bytes `json:"withdrawals_root"`
	*v1.ExecutionPayloadHeaderCapella
}

ExecutionPayloadHeaderCapella is a field in BuilderBidCapella.

func (*ExecutionPayloadHeaderCapella) MarshalJSON

func (h *ExecutionPayloadHeaderCapella) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte representation of ExecutionPayloadHeaderCapella.

func (*ExecutionPayloadHeaderCapella) ToProto

ToProto returns a ExecutionPayloadHeaderCapella Proto

func (*ExecutionPayloadHeaderCapella) UnmarshalJSON

func (h *ExecutionPayloadHeaderCapella) UnmarshalJSON(b []byte) error

UnmarshalJSON takes a JSON byte array and sets ExecutionPayloadHeaderCapella.

type ExecutionPayloadHeaderDeneb added in v4.1.0

type ExecutionPayloadHeaderDeneb struct {
	ParentHash       hexutil.Bytes `json:"parent_hash"`
	FeeRecipient     hexutil.Bytes `json:"fee_recipient"`
	StateRoot        hexutil.Bytes `json:"state_root"`
	ReceiptsRoot     hexutil.Bytes `json:"receipts_root"`
	LogsBloom        hexutil.Bytes `json:"logs_bloom"`
	PrevRandao       hexutil.Bytes `json:"prev_randao"`
	BlockNumber      Uint64String  `json:"block_number"`
	GasLimit         Uint64String  `json:"gas_limit"`
	GasUsed          Uint64String  `json:"gas_used"`
	Timestamp        Uint64String  `json:"timestamp"`
	ExtraData        hexutil.Bytes `json:"extra_data"`
	BaseFeePerGas    Uint256       `json:"base_fee_per_gas"`
	BlockHash        hexutil.Bytes `json:"block_hash"`
	TransactionsRoot hexutil.Bytes `json:"transactions_root"`
	WithdrawalsRoot  hexutil.Bytes `json:"withdrawals_root"`
	BlobGasUsed      Uint64String  `json:"blob_gas_used"`   // new in deneb
	ExcessBlobGas    Uint64String  `json:"excess_blob_gas"` // new in deneb
	*v1.ExecutionPayloadHeaderDeneb
}

ExecutionPayloadHeaderDeneb a field part of the BuilderBidDeneb.

func (*ExecutionPayloadHeaderDeneb) MarshalJSON added in v4.1.0

func (h *ExecutionPayloadHeaderDeneb) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representing the ExecutionPayloadHeaderDeneb struct.

func (*ExecutionPayloadHeaderDeneb) ToProto added in v4.1.0

ToProto returns a ExecutionPayloadHeaderDeneb Proto object.

func (*ExecutionPayloadHeaderDeneb) UnmarshalJSON added in v4.1.0

func (h *ExecutionPayloadHeaderDeneb) UnmarshalJSON(b []byte) error

UnmarshalJSON takes in a byte array and unmarshals the value into ExecutionPayloadHeaderDeneb.

type IndexedAttestation

type IndexedAttestation struct {
	*eth.IndexedAttestation
}

IndexedAttestation is a field of AttesterSlashing.

func (*IndexedAttestation) MarshalJSON

func (a *IndexedAttestation) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of IndexedAttestation.

type ProposerSlashing

type ProposerSlashing struct {
	*eth.ProposerSlashing
}

ProposerSlashing is a field in BlindedBeaconBlockBodyCapella.

func (*ProposerSlashing) MarshalJSON

func (s *ProposerSlashing) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of ProposerSlashing.

type SignedBLSToExecutionChange

type SignedBLSToExecutionChange struct {
	*eth.SignedBLSToExecutionChange
}

SignedBLSToExecutionChange is a field in Beacon Block Body for capella and above.

func (*SignedBLSToExecutionChange) MarshalJSON

func (ch *SignedBLSToExecutionChange) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of SignedBLSToExecutionChange.

type SignedBeaconBlockHeader

type SignedBeaconBlockHeader struct {
	*eth.SignedBeaconBlockHeader
}

SignedBeaconBlockHeader is a field of ProposerSlashing.

func (*SignedBeaconBlockHeader) MarshalJSON

func (h *SignedBeaconBlockHeader) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of SignedBeaconBlockHeader.

type SignedBid

type SignedBid interface {
	Message() (Bid, error)
	Signature() []byte
	Version() int
	IsNil() bool
}

SignedBid is an interface describing the method set of a signed builder bid.

func WrappedSignedBuilderBid

func WrappedSignedBuilderBid(p *ethpb.SignedBuilderBid) (SignedBid, error)

WrappedSignedBuilderBid is a constructor which wraps a protobuf signed bit into an interface.

func WrappedSignedBuilderBidCapella

func WrappedSignedBuilderBidCapella(p *ethpb.SignedBuilderBidCapella) (SignedBid, error)

WrappedSignedBuilderBidCapella is a constructor which wraps a protobuf signed bit into an interface.

func WrappedSignedBuilderBidDeneb added in v4.1.0

func WrappedSignedBuilderBidDeneb(p *ethpb.SignedBuilderBidDeneb) (SignedBid, error)

WrappedSignedBuilderBidDeneb is a constructor which wraps a protobuf signed bit into an interface.

type SignedBlindedBeaconBlockBellatrix

type SignedBlindedBeaconBlockBellatrix struct {
	*eth.SignedBlindedBeaconBlockBellatrix
}

SignedBlindedBeaconBlockBellatrix is the request object for builder API /eth/v1/builder/blinded_blocks.

type SignedVoluntaryExit

type SignedVoluntaryExit struct {
	*eth.SignedVoluntaryExit
}

SignedVoluntaryExit is a field of Beacon Block Body.

func (*SignedVoluntaryExit) MarshalJSON

func (sve *SignedVoluntaryExit) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of SignedVoluntaryExit.

type SyncAggregate

type SyncAggregate struct {
	*eth.SyncAggregate
}

SyncAggregate is a field of Beacon Block Body.

func (*SyncAggregate) MarshalJSON

func (s *SyncAggregate) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of SyncAggregate.

type Uint256

type Uint256 struct {
	*big.Int
}

Uint256 a wrapper representation of big.Int

func (Uint256) MarshalJSON

func (s Uint256) MarshalJSON() ([]byte, error)

MarshalJSON returns a json byte representation of Uint256.

func (Uint256) MarshalText

func (s Uint256) MarshalText() ([]byte, error)

MarshalText returns a text byte representation of Uint256.

func (Uint256) SSZBytes

func (s Uint256) SSZBytes() []byte

SSZBytes creates an ssz-style (little-endian byte slice) representation of the Uint256.

func (*Uint256) UnmarshalJSON

func (s *Uint256) UnmarshalJSON(t []byte) error

UnmarshalJSON takes in a byte array and unmarshals the value in Uint256

func (*Uint256) UnmarshalText

func (s *Uint256) UnmarshalText(t []byte) error

UnmarshalText takes in a byte array and unmarshals the text in Uint256

type Uint64String

type Uint64String uint64

Uint64String is a custom type that allows marshalling from text to uint64 and vice versa.

func (Uint64String) MarshalText

func (s Uint64String) MarshalText() ([]byte, error)

MarshalText returns a byte representation of the text from Uint64String.

func (*Uint64String) UnmarshalText

func (s *Uint64String) UnmarshalText(t []byte) error

UnmarshalText takes a byte array and unmarshals the text in Uint64String.

type VersionResponse

type VersionResponse struct {
	Version string `json:"version"`
}

VersionResponse is a JSON representation of a field in the builder API header response.

type VoluntaryExit

type VoluntaryExit struct {
	*eth.VoluntaryExit
}

VoluntaryExit is a field in SignedVoluntaryExit

func (*VoluntaryExit) MarshalJSON

func (ve *VoluntaryExit) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON byte array representation of VoluntaryExit

type Withdrawal

type Withdrawal struct {
	Index          Uint256       `json:"index"`
	ValidatorIndex Uint256       `json:"validator_index"`
	Address        hexutil.Bytes `json:"address"`
	Amount         Uint256       `json:"amount"`
}

Withdrawal is a field of ExecutionPayloadCapella.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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