Documentation
¶
Index ¶
- Constants
- func ComputeDomain(domainType phase0.DomainType, forkVersionHex, genesisValidatorsRootHex string) (domain phase0.Domain, err error)
- func DecodeJSON(r io.Reader, dst any) error
- func IncrementBeaconNodeStatus(status, endpoint string)
- func IncrementBidBelowMinBid(relay string)
- func RecordBidValue(relay string, value float64)
- func RecordMsIntoSlot(endpoint string, ms float64)
- func RecordRelayLastSlot(relay string, slot uint64)
- func RecordRelayLatency(endpoint, relay string, latency float64)
- func RecordRelayStatusCode(httpStatus, endpoint, relay string)
- func RecordWinningBidValue(value float64)
- func SendHTTPRequest(ctx context.Context, client http.Client, method, url string, ...) (code int, err error)
- type BlockHashHex
- type BoostService
- type BoostServiceOpts
- type GetPayloadVersion
- type UserAgent
Constants ¶
const ( HeaderAccept = "Accept" HeaderContentType = "Content-Type" HeaderEthConsensusVersion = "Eth-Consensus-Version" HeaderKeySlotUID = "X-MEVBoost-SlotID" HeaderKeyVersion = "X-MEVBoost-Version" HeaderUserAgent = "User-Agent" // Header which communicates when a request was sent. Used to measure latency. HeaderDateMilliseconds = "Date-Milliseconds" // Header which communicates timeout set by client. Used to tweak block creation delay together with Date-Milliseconds. HeaderTimeoutMs = "X-Timeout-Ms" MediaTypeJSON = "application/json" MediaTypeOctetStream = "application/octet-stream" EthConsensusVersionBellatrix = "bellatrix" EthConsensusVersionCapella = "capella" EthConsensusVersionDeneb = "deneb" EthConsensusVersionElectra = "electra" EthConsensusVersionFulu = "fulu" )
Variables ¶
This section is empty.
Functions ¶
func ComputeDomain ¶ added in v0.5.0
func ComputeDomain(domainType phase0.DomainType, forkVersionHex, genesisValidatorsRootHex string) (domain phase0.Domain, err error)
ComputeDomain computes the signing domain
func DecodeJSON ¶ added in v0.7.5
DecodeJSON reads JSON from io.Reader and decodes it into a struct
func IncrementBeaconNodeStatus ¶ added in v1.10.0
func IncrementBeaconNodeStatus(status, endpoint string)
func IncrementBidBelowMinBid ¶ added in v1.10.0
func IncrementBidBelowMinBid(relay string)
func RecordBidValue ¶ added in v1.10.0
func RecordMsIntoSlot ¶ added in v1.10.0
func RecordRelayLastSlot ¶ added in v1.10.0
func RecordRelayLatency ¶ added in v1.10.0
func RecordRelayStatusCode ¶ added in v1.10.0
func RecordRelayStatusCode(httpStatus, endpoint, relay string)
func RecordWinningBidValue ¶ added in v1.10.0
func RecordWinningBidValue(value float64)
func SendHTTPRequest ¶ added in v0.5.0
func SendHTTPRequest(ctx context.Context, client http.Client, method, url string, userAgent UserAgent, headers map[string]string, payload, dst any) (code int, err error)
SendHTTPRequest - prepare and send HTTP request, marshaling the payload if any, and decoding the response if dst is set
Types ¶
type BlockHashHex ¶ added in v1.3.2
type BlockHashHex string
BlockHashHex is a hex-string representation of a block hash
type BoostService ¶
type BoostService struct {
// contains filtered or unexported fields
}
BoostService - the mev-boost service
func NewBoostService ¶
func NewBoostService(opts BoostServiceOpts) (*BoostService, error)
NewBoostService created a new BoostService
func (*BoostService) CheckRelays ¶ added in v0.5.0
func (m *BoostService) CheckRelays() int
CheckRelays sends a request to each one of the relays previously registered to get their status
func (*BoostService) StartHTTPServer ¶ added in v0.4.0
func (m *BoostService) StartHTTPServer() error
StartHTTPServer starts the HTTP server for this boost service instance
func (*BoostService) StartMetricsServer ¶ added in v1.10.0
func (m *BoostService) StartMetricsServer() error
StartMetricsServer starts the HTTP server for exporting metrics
func (*BoostService) UpdateConfig ¶ added in v1.11.0
func (m *BoostService) UpdateConfig(relayConfigs []types.RelayConfig, timeoutGetHeaderMs, lateInSlotTimeMs uint64)
UpdateConfig updates the relay configs and timeout settings
type BoostServiceOpts ¶ added in v0.7.1
type BoostServiceOpts struct {
Log *logrus.Entry
ListenAddr string
RelayConfigs []types.RelayConfig
GenesisForkVersionHex string
GenesisTime uint64
RelayCheck bool
RelayMinBid types.U256Str
RequestTimeoutGetHeader time.Duration
RequestTimeoutGetPayload time.Duration
RequestTimeoutRegVal time.Duration
RequestMaxRetries int
TimeoutGetHeaderMs uint64
LateInSlotTimeMs uint64
MetricsAddr string
}
BoostServiceOpts provides all available options for use with NewBoostService
type GetPayloadVersion ¶ added in v1.10.0
type GetPayloadVersion string
const ( GetPayloadV1 GetPayloadVersion = "V1" GetPayloadV2 GetPayloadVersion = "V2" )