Documentation ¶
Index ¶
Constants ¶
View Source
const ( // proposer endpoints PathStatus = "/eth/v1/builder/status" PathRegisterValidator = "/eth/v1/builder/validators" PathGetHeader = "/eth/v1/builder/header/{slot:[0-9]+}/{parent_hash:0x[a-fA-F0-9]+}/{pubkey:0x[a-fA-F0-9]+}" PathGetPayload = "/eth/v1/builder/blinded_blocks" // builder endpoints PathGetValidators = "/relay/v1/builder/validators" PathSubmitBlock = "/relay/v1/builder/blocks" // data api PathBuilderBlocksReceived = "/relay/v1/data/bidtraces/builder_blocks_received" PathProposerPayloadsDelivered = "/relay/v1/data/bidtraces/proposer_payload_delivered" PathSpecificRegistration = "/relay/v1/data/validator_registration" )
Router paths
View Source
const (
DataLimit = 450
)
Variables ¶
View Source
var (
ErrParamNotFound = errors.New("not found")
)
Functions ¶
func ParseHeaderRequest ¶
func ParseHeaderRequest(r *http.Request) structs.HeaderRequest
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) AttachMetrics ¶
func (*API) AttachToHandler ¶
type APIMetrics ¶
type APIMetrics struct { ApiReqCounter *prometheus.CounterVec ApiReqTiming *prometheus.HistogramVec ApiReqElCount *prometheus.HistogramVec }
type Service ¶
type Service interface { // Proposer APIs (builder spec https://github.com/ethereum/builder-specs) RegisterValidatorSingular(ctx context.Context, payload structs.SignedValidatorRegistration) error RegisterValidator(context.Context, []structs.SignedValidatorRegistration) error GetHeader(context.Context, structs.HeaderRequest) (*types.GetHeaderResponse, error) GetPayload(context.Context, *types.SignedBlindedBeaconBlock) (*types.GetPayloadResponse, error) // Builder APIs (relay spec https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5) SubmitBlock(context.Context, *types.BuilderSubmitBlockRequest) error GetValidators() structs.BuilderGetValidatorsResponseEntrySlice // Data APIs GetPayloadDelivered(context.Context, structs.PayloadTraceQuery) ([]structs.BidTraceExtended, error) GetBlockReceived(context.Context, structs.HeaderTraceQuery) ([]structs.BidTraceWithTimestamp, error) Registration(context.Context, types.PublicKey) (types.SignedValidatorRegistration, error) }
Click to show internal directories.
Click to hide internal directories.