fulu

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package fulu provides Fulu (builder-specs) bid types for the Builder API.

Package fulu provides Fulu (builder-specs) bid building from Payload.

Package fulu provides Fulu (builder-specs) types and helpers for the Builder API.

Package fulu provides unblinding of Fulu SignedBlindedBeaconBlock for publishing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DenebPayload

DenebPayload returns the Deneb execution payload view of the fork-agnostic beacon payload (used for Deneb/Electra/Fulu unblinding).

func ExecutionPayloadHeaderFromBeacon

func ExecutionPayloadHeaderFromBeacon(p *eth2all.ExecutionPayload) (*deneb.ExecutionPayloadHeader, error)

ExecutionPayloadHeaderFromBeacon builds a deneb.ExecutionPayloadHeader from the fork-agnostic beacon execution payload. Used to construct a Fulu BuilderBid for getHeader responses.

func GloasPayload

GloasPayload returns the Gloas execution payload view of the fork-agnostic beacon payload (used for Gloas+ envelope reveals).

func UnblindSignedBlindedBeaconBlock

func UnblindSignedBlindedBeaconBlock(
	blinded *apiv1electra.SignedBlindedBeaconBlock,
	event *payload_builder.Payload,
) (*apiv1fulu.SignedBlockContents, error)

UnblindSignedBlindedBeaconBlock builds full Fulu SignedBlockContents from a blinded block and the matching Payload (full payload + blobs). The proposer signature is preserved.

Types

type BidSigner

type BidSigner interface {
	SignWithDomain(root phase0.Root, domain phase0.Domain) (phase0.BLSSignature, error)
}

BidSigner signs a BuilderBid and returns the signature.

type BuilderBid

type BuilderBid struct {
	Header             *deneb.ExecutionPayloadHeader `json:"header"`
	BlobKZGCommitments []deneb.KZGCommitment         `json:"blob_kzg_commitments"`
	ExecutionRequests  *eth2all.ExecutionRequests    `json:"execution_requests"`
	Value              *uint256.Int                  `json:"value"` // wei as uint256 in spec
	Pubkey             phase0.BLSPubKey              `json:"pubkey"`
}

BuilderBid is the Fulu/Electra builder bid message (header, blob_kzg_commitments, execution_requests, value, pubkey).

func (*BuilderBid) HashTreeRoot

func (b *BuilderBid) HashTreeRoot() ([32]byte, error)

HashTreeRoot returns the SSZ hash tree root of the BuilderBid (for signing).

func (*BuilderBid) HashTreeRootWith

func (b *BuilderBid) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith writes the BuilderBid SSZ tree into the hasher.

func (*BuilderBid) MarshalJSON

func (b *BuilderBid) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for BuilderBid.

func (*BuilderBid) UnmarshalJSON

func (b *BuilderBid) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler for BuilderBid.

type GetHeaderResponse

type GetHeaderResponse struct {
	Version string            `json:"version"`
	Data    *SignedBuilderBid `json:"data"`
}

GetHeaderResponse is the JSON response for getHeader: { "version": "fulu", "data": SignedBuilderBid }.

type SignedBuilderBid

type SignedBuilderBid struct {
	Message   *BuilderBid         `json:"message"`
	Signature phase0.BLSSignature `json:"signature"`
}

SignedBuilderBid is the signed Fulu builder bid (getHeader response data).

func BuildSignedBuilderBid

func BuildSignedBuilderBid(
	event *payload_builder.Payload,
	proposerPubkey phase0.BLSPubKey,
	blsSigner BidSigner,
	subsidyGwei uint64,
	genesisForkVersion phase0.Version,
	genesisValidatorsRoot phase0.Root,
) (*SignedBuilderBid, error)

BuildSignedBuilderBid builds a Fulu SignedBuilderBid from a Payload and the proposer's pubkey, and signs it with the builder's BLS key using DOMAIN_APPLICATION_BUILDER with the provided genesis fork version and genesis validators root (matches mev-boost-relay behavior). subsidyGwei is added to the bid value so the proposer sees a higher bid (e.g. for testing).

Jump to

Keyboard shortcuts

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