Documentation
¶
Overview ¶
Package payload_bidder holds the shared, transport-independent mechanics for post-Gloas builder participation: constructing and signing execution payload bids and the corresponding execution payload envelope (reveal). Both the ePBS p2p submitter and the HTTP Builder API build on it; each supplies its own economics (bid value, execution payment) while the construction, hash-tree- root (always via dynamic-ssz so preset-dependent sizes resolve), signing domain, and fork handling live here.
Everything is fork-agnostic: bids and envelopes use the go-eth2-client spec/all union types and read the active fork from the payload, so adding a future fork is confined to the spec/all view tables.
Index ¶
- Variables
- func BuildSignedBid(p *payload_builder.Payload, params BidParams, s *Signer, ...) (*eth2all.SignedExecutionPayloadBid, error)
- func BuildSignedEnvelope(p *payload_builder.Payload, rc RevealContext, s *Signer, ...) (signed *eth2all.SignedExecutionPayloadEnvelope, blobs, proofs [][]byte, ...)
- type BidParams
- type RevealContext
- type Signer
Constants ¶
This section is empty.
Variables ¶
var DomainBeaconBuilder = phase0.DomainType{0x0B, 0x00, 0x00, 0x00}
DomainBeaconBuilder is DOMAIN_BEACON_BUILDER — the signing domain for execution payload bids and execution payload envelopes.
Functions ¶
func BuildSignedBid ¶
func BuildSignedBid( p *payload_builder.Payload, params BidParams, s *Signer, forkVersion phase0.Version, genesisValidatorsRoot phase0.Root, ) (*eth2all.SignedExecutionPayloadBid, error)
BuildSignedBid constructs and signs a fork-agnostic SignedExecutionPayloadBid for the given payload. The fork is read from the payload; all payload-derived fields (parent hashes, block hash, randao, gas limit, commitments, execution requests root, slot) are filled here, and only the transport's economics + identity come in via params.
func BuildSignedEnvelope ¶
func BuildSignedEnvelope( p *payload_builder.Payload, rc RevealContext, s *Signer, forkVersion phase0.Version, genesisValidatorsRoot phase0.Root, ) (signed *eth2all.SignedExecutionPayloadEnvelope, blobs, proofs [][]byte, err error)
BuildSignedEnvelope constructs and signs a fork-agnostic SignedExecutionPayloadEnvelope for the given payload, and returns the blobs and KZG proofs to publish alongside it. The fork-agnostic envelope embeds the canonical payload directly (no per-fork conversion needed).
Types ¶
type BidParams ¶
type BidParams struct {
BuilderIndex uint64
FeeRecipient bellatrix.ExecutionAddress
Value phase0.Gwei
ExecutionPayment phase0.Gwei
}
BidParams are the policy-decided inputs a transport supplies for a bid. The transport owns the economics (value, execution payment) and identity (builder index, fee recipient); every other bid field is derived from the payload.
type RevealContext ¶
type RevealContext struct {
BuilderIndex uint64
BeaconBlockRoot phase0.Root
ParentBeaconBlockRoot phase0.Root
}
RevealContext are the inputs a transport supplies for a payload reveal that aren't carried by the payload: the builder index and the beacon block roots the envelope is bound to.
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer signs execution payload bids and envelopes with the builder's BLS key.
func (*Signer) SignBid ¶
func (s *Signer) SignBid( bid *eth2all.ExecutionPayloadBid, forkVersion phase0.Version, genesisValidatorsRoot phase0.Root, ) (phase0.BLSSignature, error)
SignBid signs an execution payload bid. forkVersion must be the fork version the consensus client verifies against (the Gloas fork version).
func (*Signer) SignEnvelope ¶
func (s *Signer) SignEnvelope( envelope *eth2all.ExecutionPayloadEnvelope, forkVersion phase0.Version, genesisValidatorsRoot phase0.Root, ) (phase0.BLSSignature, error)
SignEnvelope signs an execution payload envelope.