relay

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanityBuilderBlock

func SanityBuilderBlock(payload builderTypes.BuilderBlockBid) error

func SignedBuilderBid

func SignedBuilderBid(builderBid builderTypes.BuilderBlockBid, sk *bls.SecretKey, publicKey phase0.BLSPubKey, domain signing.Domain) (*relayTypes.SignedBuilderBlockBid, error)

Types

type BuilderWinningBid added in v0.0.4

type BuilderWinningBid struct {
	BidID             string  `json:"bid_id"`
	HighestBidValue   big.Int `json:"highest_bid_value"`
	HighestBidBuilder string  `json:"highest_bid_builder"`
}

type EcdsaAddress

type EcdsaAddress [20]byte

func (EcdsaAddress) String

func (e EcdsaAddress) String() string

type EcdsaSignature

type EcdsaSignature [65]byte

func (EcdsaSignature) String

func (e EcdsaSignature) String() string

type EthNetwork

type EthNetwork struct {
	Network             uint64
	GenesisTime         uint64
	DomainBuilder       signing.Domain
	DomainBeaconCapella signing.Domain
}

func NewEthNetworkDetails

func NewEthNetworkDetails(network string, beaconClient *beaconclient.MultiBeaconClient) (*EthNetwork, error)

type HTTPError

type HTTPError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Hash

type Hash [32]byte

func (Hash) String

func (h Hash) String() string

type ProposerReqParams

type ProposerReqParams struct {
	Slot              uint64
	ProposerPubKeyHex string
	ParentHashHex     string
}

type PublicKey

type PublicKey [48]byte

type Relay

type Relay struct {
	URL string
	// contains filtered or unexported fields
}

func NewRelayAPI

func NewRelayAPI(params *RelayParams, log logrus.Entry) (relay *Relay, err error)

func (*Relay) BlockSlotTimestamp

func (relay *Relay) BlockSlotTimestamp(slot uint64) uint64

func (*Relay) RespondError

func (relay *Relay) RespondError(w http.ResponseWriter, code int, message string)

func (*Relay) RespondOK

func (relay *Relay) RespondOK(w http.ResponseWriter, response any)

func (*Relay) Routes

func (relay *Relay) Routes() http.Handler

func (*Relay) StartServer

func (relay *Relay) StartServer(ServerParams *RelayServerParams) (err error)

func (*Relay) TESThandleProposerHeader

func (relay *Relay) TESThandleProposerHeader(w http.ResponseWriter, req *http.Request)

type RelayConfig added in v0.0.5

type RelayConfig struct {
	MQTTBroker string `json:"mqtt_broker"`
	MQTTPort   uint16 `json:"mqtt_port"`
	PublicKey  string `json:"public_key"`
	Chain      uint64 `json:"chain"`
	Slot       uint64 `json:"current_slot"`
}

type RelayParams

type RelayParams struct {
	DbURL          string
	DatabaseParams databaseTypes.DatabaseOpts
	DbDriver       databaseTypes.DatabaseDriver
	DeleteTables   bool

	URL string

	PonPoolURL    string
	PonPoolAPIKey string

	BulletinBoardParams bulletinBoardTypes.RelayMQTTOpts

	BeaconClientUrls []string

	ReporterURL string

	Network string

	RedisURI string

	BidTimeOut time.Duration

	Sk *bls.SecretKey

	Version string

	DiscordWebhook string
}

type RelayServerParams

type RelayServerParams struct {
	ReadTimeout       time.Duration
	ReadHeaderTimeout time.Duration
	WriteTimeout      time.Duration
	IdleTimeout       time.Duration
}

type Signature

type Signature phase0.BLSSignature

type Transaction

type Transaction []byte

func (Transaction) String

func (t Transaction) String() string

Jump to

Keyboard shortcuts

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