Documentation ¶
Index ¶
- Variables
- type Attestation
- type AttestationData
- type AttesterSlashing
- type BLSToExecutionChange
- type BeaconBlockHeader
- type Bid
- type BlobBundler
- type BlobsBundle
- type BuilderBid
- type BuilderBidCapella
- type BuilderBidDeneb
- type BuilderClient
- type Checkpoint
- type Client
- func (c *Client) GetHeader(ctx context.Context, slot primitives.Slot, parentHash [32]byte, ...) (SignedBid, error)
- func (c *Client) NodeURL() string
- func (c *Client) RegisterValidator(ctx context.Context, svr []*ethpb.SignedValidatorRegistrationV1) error
- func (c *Client) Status(ctx context.Context) error
- func (c *Client) SubmitBlindedBlock(ctx context.Context, sb interfaces.ReadOnlySignedBeaconBlock) (interfaces.ExecutionData, *v1.BlobsBundle, error)
- type ClientOpt
- type Deposit
- type DepositData
- type ErrorMessage
- type Eth1Data
- type ExecHeaderResponse
- type ExecHeaderResponseCapella
- type ExecHeaderResponseDeneb
- type ExecPayloadResponse
- type ExecPayloadResponseCapella
- type ExecPayloadResponseDeneb
- type ExecutionPayload
- type ExecutionPayloadCapella
- type ExecutionPayloadDeneb
- type ExecutionPayloadDenebAndBlobsBundle
- type ExecutionPayloadHeader
- type ExecutionPayloadHeaderCapella
- type ExecutionPayloadHeaderDeneb
- type ExecutionPayloadResponse
- type IndexedAttestation
- type ParsedPayload
- type ProposerSlashing
- type SignedBLSToExecutionChange
- type SignedBeaconBlockHeader
- type SignedBid
- type SignedBlindedBeaconBlockBellatrix
- type SignedVoluntaryExit
- type SyncAggregate
- type Uint256
- type Uint64String
- type VersionResponse
- type VoluntaryExit
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
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.
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
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.
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() primitives.Wei 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 ¶
func WrappedBuilderBidDeneb(p *ethpb.BuilderBidDeneb) (Bid, error)
WrappedBuilderBidDeneb is a constructor which wraps a protobuf bid into an interface.
type BlobBundler ¶ added in v5.1.0
type BlobBundler interface {
BundleProto() (*v1.BlobsBundle, error)
}
BlobBundler can retrieve the underlying blob bundle protobuf message for the given execution payload response.
type BlobsBundle ¶
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 ¶
func FromBundleProto(bundle *v1.BlobsBundle) *BlobsBundle
FromBundleProto converts the proto bundle type to the builder type.
func (BlobsBundle) ToProto ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (c *Client) SubmitBlindedBlock(ctx context.Context, sb interfaces.ReadOnlySignedBeaconBlock) (interfaces.ExecutionData, *v1.BlobsBundle, error)
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 ¶
Deposit is a field of Beacon Block Body.
func (*Deposit) MarshalJSON ¶
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 ¶
Eth1Data is a field of Beacon Block Body.
func (*Eth1Data) MarshalJSON ¶
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 ¶
func (ehr *ExecHeaderResponseCapella) ToProto() (*eth.SignedBuilderBidCapella, error)
ToProto returns a SignedBuilderBidCapella Proto from ExecHeaderResponseCapella.
type ExecHeaderResponseDeneb ¶
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 ¶
func (ehr *ExecHeaderResponseDeneb) ToProto() (*eth.SignedBuilderBidDeneb, error)
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 ¶
func (r *ExecPayloadResponseCapella) ToProto() (*v1.ExecutionPayloadCapella, error)
ToProto returns a ExecutionPayloadCapella Proto.
type ExecPayloadResponseDeneb ¶
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 ¶
func (r *ExecPayloadResponseDeneb) ToProto() (*v1.ExecutionPayloadDeneb, *v1.BlobsBundle, error)
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 ¶
func FromProto(payload *v1.ExecutionPayload) (ExecutionPayload, error)
FromProto converts a proto execution payload type to our builder compatible payload type.
func (*ExecutionPayload) PayloadProto ¶ added in v5.1.0
func (r *ExecutionPayload) PayloadProto() (proto.Message, error)
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 ¶
func FromProtoCapella(payload *v1.ExecutionPayloadCapella) (ExecutionPayloadCapella, error)
FromProtoCapella converts a proto execution payload type for capella to our builder compatible payload type.
func (*ExecutionPayloadCapella) PayloadProto ¶ added in v5.1.0
func (p *ExecutionPayloadCapella) PayloadProto() (proto.Message, error)
func (*ExecutionPayloadCapella) ToProto ¶
func (p *ExecutionPayloadCapella) ToProto() (*v1.ExecutionPayloadCapella, error)
ToProto returns a ExecutionPayloadCapella Proto.
type ExecutionPayloadDeneb ¶
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 ¶
func FromProtoDeneb(payload *v1.ExecutionPayloadDeneb) (ExecutionPayloadDeneb, error)
func (*ExecutionPayloadDeneb) ToProto ¶
func (p *ExecutionPayloadDeneb) ToProto() (*v1.ExecutionPayloadDeneb, error)
ToProto returns the ExecutionPayloadDeneb Proto.
type ExecutionPayloadDenebAndBlobsBundle ¶
type ExecutionPayloadDenebAndBlobsBundle struct { ExecutionPayload *ExecutionPayloadDeneb `json:"execution_payload"` BlobsBundle *BlobsBundle `json:"blobs_bundle"` }
ExecutionPayloadDenebAndBlobsBundle the main field used in ExecPayloadResponseDeneb.
func (*ExecutionPayloadDenebAndBlobsBundle) BundleProto ¶ added in v5.1.0
func (r *ExecutionPayloadDenebAndBlobsBundle) BundleProto() (*v1.BlobsBundle, error)
func (*ExecutionPayloadDenebAndBlobsBundle) PayloadProto ¶ added in v5.1.0
func (r *ExecutionPayloadDenebAndBlobsBundle) PayloadProto() (proto.Message, error)
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 ¶
func (h *ExecutionPayloadHeader) ToProto() (*v1.ExecutionPayloadHeader, error)
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 ¶
func (h *ExecutionPayloadHeaderCapella) ToProto() (*v1.ExecutionPayloadHeaderCapella, error)
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 ¶
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 ¶
func (h *ExecutionPayloadHeaderDeneb) MarshalJSON() ([]byte, error)
MarshalJSON returns a JSON byte array representing the ExecutionPayloadHeaderDeneb struct.
func (*ExecutionPayloadHeaderDeneb) ToProto ¶
func (h *ExecutionPayloadHeaderDeneb) ToProto() (*v1.ExecutionPayloadHeaderDeneb, error)
ToProto returns a ExecutionPayloadHeaderDeneb Proto object.
func (*ExecutionPayloadHeaderDeneb) UnmarshalJSON ¶
func (h *ExecutionPayloadHeaderDeneb) UnmarshalJSON(b []byte) error
UnmarshalJSON takes in a byte array and unmarshals the value into ExecutionPayloadHeaderDeneb.
type ExecutionPayloadResponse ¶ added in v5.1.0
type ExecutionPayloadResponse struct { Version string `json:"version"` Data json.RawMessage `json:"data"` }
ExecutionPayloadResponse allows for unmarshaling just the Version field of the payload. This allows it to return different ExecutionPayload types based on the version field.
func ExecutionPayloadResponseFromData ¶ added in v5.1.0
func ExecutionPayloadResponseFromData(ed interfaces.ExecutionData, bundle *v1.BlobsBundle) (*ExecutionPayloadResponse, error)
ExecutionPayloadResponseFromData converts an ExecutionData interface value to a payload response. This involves serializing the execution payload value so that the abstract payload envelope can be used.
func (*ExecutionPayloadResponse) ParsePayload ¶ added in v5.1.0
func (r *ExecutionPayloadResponse) ParsePayload() (ParsedPayload, error)
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 ParsedPayload ¶ added in v5.1.0
ParsedPayload can retrieve the underlying protobuf message for the given execution payload response.
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 ¶
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 ¶
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 ¶
Uint256 a wrapper representation of big.Int
func (Uint256) MarshalJSON ¶
MarshalJSON returns a json byte representation of Uint256.
func (Uint256) MarshalText ¶
MarshalText returns a text byte representation of Uint256.
func (Uint256) SSZBytes ¶
SSZBytes creates an ssz-style (little-endian byte slice) representation of the Uint256.
func (*Uint256) UnmarshalJSON ¶
UnmarshalJSON takes in a byte array and unmarshals the value in Uint256
func (*Uint256) UnmarshalText ¶
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