server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeDomain added in v0.5.0

func ComputeDomain(domainType types.DomainType, forkVersionHex string, genesisValidatorsRootHex string) (domain types.Domain, err error)

ComputeDomain computes the signing domain

func SendHTTPRequest added in v0.5.0

func SendHTTPRequest(ctx context.Context, client http.Client, method, url string, payload any, dst any) error

SendHTTPRequest - prepare and send HTTP request, marshaling the payload if any, and decoding the response if dst is set

Types

type BoostService

type BoostService struct {
	// contains filtered or unexported fields
}

BoostService TODO

func NewBoostService

func NewBoostService(listenAddr string, relays []RelayEntry, log *logrus.Entry, genesisForkVersionHex string, relayRequestTimeout time.Duration) (*BoostService, error)

NewBoostService created a new BoostService

func (*BoostService) CheckRelays added in v0.5.0

func (m *BoostService) CheckRelays() bool

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

type HTTPServerTimeouts added in v0.4.0

type HTTPServerTimeouts struct {
	Read       time.Duration // Timeout for body reads. None if 0.
	ReadHeader time.Duration // Timeout for header reads. None if 0.
	Write      time.Duration // Timeout for writes. None if 0.
	Idle       time.Duration // Timeout to disconnect idle client connections. None if 0.
}

HTTPServerTimeouts are various timeouts for requests to the mev-boost HTTP server

func NewDefaultHTTPServerTimeouts added in v0.4.0

func NewDefaultHTTPServerTimeouts() HTTPServerTimeouts

NewDefaultHTTPServerTimeouts creates default server timeouts

type RelayEntry added in v0.4.2

type RelayEntry struct {
	Address   string
	PublicKey types.PublicKey
	URL       *url.URL
}

RelayEntry represents a relay that mev-boost connects to. Address will be schema://hostname:port PublicKey holds the relay's BLS public key used to verify message signatures.

func NewRelayEntry added in v0.4.5

func NewRelayEntry(relayURL string) (entry RelayEntry, err error)

NewRelayEntry creates a new instance based on an input string relayURL can be IP@PORT, PUBKEY@IP:PORT, https://IP, etc.

func (*RelayEntry) String added in v0.4.5

func (r *RelayEntry) String() string

Jump to

Keyboard shortcuts

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