Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeDomain(domainType types.DomainType, forkVersionHex string, ...) (domain types.Domain, err error)
- func DeliveredHashKey(bh types.Hash) ds.Key
- func DeliveredKey(slot Slot) ds.Key
- func DeliveredNumKey(bn uint64) ds.Key
- func DeliveredPubkeyKey(pk types.PublicKey) ds.Key
- func HeaderHashKey(bh types.Hash) ds.Key
- func HeaderKey(slot Slot) ds.Key
- func HeaderNumKey(bn uint64) ds.Key
- func NewBeaconClient(endpoint string, config Config) (*beaconClient, error)
- func PayloadKeyKey(key PayloadKey) ds.Key
- func RegistrationKey(pk PubKey) ds.Key
- func SubmitBlockRequestToSignedBuilderBid(req *types.BuilderSubmitBlockRequest, sk *bls.SecretKey, ...) (*types.SignedBuilderBid, error)
- func ValidatorKey(pk PubKey) ds.Key
- type API
- type AllValidatorsResponse
- type BeaconClient
- type BeaconState
- type BidTraceWithTimestamp
- type BlockBidAndTrace
- type BuilderGetValidatorsResponseEntrySlice
- type Config
- type Datastore
- type DefaultDatastore
- func (s DefaultDatastore) GetDelivered(ctx context.Context, slot Slot) (BidTraceWithTimestamp, error)
- func (s DefaultDatastore) GetDeliveredBatch(ctx context.Context, slots []Slot) ([]BidTraceWithTimestamp, error)
- func (s DefaultDatastore) GetDeliveredByBlockHash(ctx context.Context, bh types.Hash) (BidTraceWithTimestamp, error)
- func (s DefaultDatastore) GetDeliveredByBlockNum(ctx context.Context, bn uint64) (BidTraceWithTimestamp, error)
- func (s DefaultDatastore) GetDeliveredByPubkey(ctx context.Context, pk types.PublicKey) (BidTraceWithTimestamp, error)
- func (s DefaultDatastore) GetHeader(ctx context.Context, slot Slot) (HeaderAndTrace, error)
- func (s DefaultDatastore) GetHeaderBatch(ctx context.Context, slots []Slot) ([]HeaderAndTrace, error)
- func (s DefaultDatastore) GetHeaderByBlockHash(ctx context.Context, bh types.Hash) (HeaderAndTrace, error)
- func (s DefaultDatastore) GetHeaderByBlockNum(ctx context.Context, bn uint64) (HeaderAndTrace, error)
- func (s DefaultDatastore) GetPayload(ctx context.Context, key PayloadKey) (*BlockBidAndTrace, error)
- func (s DefaultDatastore) GetRegistration(ctx context.Context, pk PubKey) (types.SignedValidatorRegistration, error)
- func (s DefaultDatastore) PutDelivered(ctx context.Context, slot Slot, trace DeliveredTrace, ttl time.Duration) error
- func (s DefaultDatastore) PutHeader(ctx context.Context, slot Slot, header HeaderAndTrace, ttl time.Duration) error
- func (s DefaultDatastore) PutPayload(ctx context.Context, key PayloadKey, payload *BlockBidAndTrace, ...) error
- func (s DefaultDatastore) PutRegistration(ctx context.Context, pk PubKey, registration types.SignedValidatorRegistration, ...) error
- type DefaultRelay
- func (rs *DefaultRelay) GetHeader(ctx context.Context, request HeaderRequest, state State) (*types.GetHeaderResponse, error)
- func (rs *DefaultRelay) GetPayload(ctx context.Context, payloadRequest *types.SignedBlindedBeaconBlock, ...) (*types.GetPayloadResponse, error)
- func (rs *DefaultRelay) GetValidators(state State) BuilderGetValidatorsResponseEntrySlice
- func (rs *DefaultRelay) Log() log.Logger
- func (rs *DefaultRelay) RegisterValidator(ctx context.Context, payload []types.SignedValidatorRegistration, state State) error
- func (rs *DefaultRelay) SubmitBlock(ctx context.Context, submitBlockRequest *types.BuilderSubmitBlockRequest, ...) error
- type DefaultService
- func (s *DefaultService) GetBlockReceived(ctx context.Context, slot Slot) ([]BidTraceWithTimestamp, error)
- func (s *DefaultService) GetBlockReceivedByHash(ctx context.Context, bh types.Hash) ([]BidTraceWithTimestamp, error)
- func (s *DefaultService) GetBlockReceivedByNum(ctx context.Context, bn uint64) ([]BidTraceWithTimestamp, error)
- func (s *DefaultService) GetDelivered(ctx context.Context, slot Slot) ([]types.BidTrace, error)
- func (s *DefaultService) GetDeliveredByHash(ctx context.Context, bh types.Hash) ([]types.BidTrace, error)
- func (s *DefaultService) GetDeliveredByNum(ctx context.Context, bn uint64) ([]types.BidTrace, error)
- func (s *DefaultService) GetDeliveredByPubKey(ctx context.Context, pk types.PublicKey) ([]types.BidTrace, error)
- func (s *DefaultService) GetHeader(ctx context.Context, request HeaderRequest) (*types.GetHeaderResponse, error)
- func (s *DefaultService) GetPayload(ctx context.Context, payloadRequest *types.SignedBlindedBeaconBlock) (*types.GetPayloadResponse, error)
- func (s *DefaultService) GetTailBlockReceived(ctx context.Context, limit uint64) ([]BidTraceWithTimestamp, error)
- func (s *DefaultService) GetTailDelivered(ctx context.Context, limit uint64) ([]types.BidTrace, error)
- func (s *DefaultService) GetTailDeliveredCursor(ctx context.Context, limit, cursor uint64) ([]types.BidTrace, error)
- func (s *DefaultService) GetValidators() BuilderGetValidatorsResponseEntrySlice
- func (s *DefaultService) Ready() <-chan struct{}
- func (s *DefaultService) RegisterValidator(ctx context.Context, payload []types.SignedValidatorRegistration) error
- func (s *DefaultService) Registration(ctx context.Context, pk types.PublicKey) (types.SignedValidatorRegistration, error)
- func (s *DefaultService) Run(ctx context.Context) (err error)
- func (s *DefaultService) SubmitBlock(ctx context.Context, submitBlockRequest *types.BuilderSubmitBlockRequest) error
- type DeliveredTrace
- type Epoch
- type ErrBadProposer
- type GetValidatorRelayResponse
- type HeadEvent
- type HeaderAndTrace
- type HeaderRequest
- type MultiBeaconClient
- func (b *MultiBeaconClient) Endpoint() string
- func (b *MultiBeaconClient) GetProposerDuties(epoch Epoch) (*RegisteredProposersResponse, error)
- func (b *MultiBeaconClient) KnownValidators(headSlot Slot) (AllValidatorsResponse, error)
- func (b *MultiBeaconClient) SubscribeToHeadEvents(ctx context.Context, slotC chan HeadEvent)
- func (b *MultiBeaconClient) SyncStatus() (*SyncStatusPayloadData, error)
- type PayloadKey
- type PubKey
- type RegisteredProposersResponse
- type RegisteredProposersResponseData
- type Relay
- type RelayService
- type Slot
- type State
- type SyncStatusPayload
- type SyncStatusPayloadData
- type TTLDatastoreBatcher
- type TTLStorage
- type UserAgent
- type ValidatorResponseEntry
- type ValidatorResponseValidatorData
Constants ¶
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" // tracing PathPprofIndex = "/debug/pprof/" PathPprofCmdline = "/debug/pprof/cmdline" PathPprofSymbol = "/debug/pprof/symbol" PathPprofTrace = "/debug/pprof/trace" PathPprofProfile = "/debug/pprof/profile" )
Router paths
const ( GenesisForkVersionMainnet = "0x00000000" GenesisForkVersionKiln = "0x70000069" // https://github.com/eth-clients/merge-testnets/blob/main/kiln/config.yaml#L10 GenesisForkVersionRopsten = "0x80000069" GenesisForkVersionSepolia = "0x90000069" GenesisForkVersionGoerli = "0x00001020" // https://github.com/eth-clients/merge-testnets/blob/main/goerli-shadow-fork-5/config.yaml#L11 GenesisValidatorsRootMainnet = "0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95" GenesisValidatorsRootKiln = "0x99b09fcd43e5905236c370f184056bec6e6638cfc31a323b304fc4aa789cb4ad" GenesisValidatorsRootRopsten = "0x44f1e56283ca88b35c789f7f449e52339bc1fefe3a45913a43a6d16edcd33cf1" GenesisValidatorsRootSepolia = "0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078" GenesisValidatorsRootGoerli = "0x043db0d9a83813551ee2f33450d23797757d430911a9320530ad8a0eabc43efb" BellatrixForkVersionMainnet = "0x02000000" BellatrixForkVersionKiln = "0x70000071" BellatrixForkVersionRopsten = "0x80000071" BellatrixForkVersionSepolia = "0x90000071" BellatrixForkVersionGoerli = "0x02001020" )
const (
Version = "0.1.3"
)
Variables ¶
var ( SlotsPerEpoch Slot = 32 DurationPerSlot = time.Second * 12 DurationPerEpoch = DurationPerSlot * time.Duration(SlotsPerEpoch) ErrHTTPErrorResponse = errors.New("got an HTTP error response") )
var ( ErrNoPayloadFound = errors.New("no payload found") ErrBeaconNodeSyncing = errors.New("beacon node is syncing") ErrMissingRequest = errors.New("req is nil") ErrMissingSecretKey = errors.New("secret key is nil") ErrUnknownValue = errors.New("value is unknown") UnregisteredValidatorMsg = "unregistered validator" )
var (
ErrParamNotFound = errors.New("not found")
)
Functions ¶
func ComputeDomain ¶
func ComputeDomain(domainType types.DomainType, forkVersionHex string, genesisValidatorsRootHex string) (domain types.Domain, err error)
ComputeDomain computes the signing domain
func DeliveredKey ¶
func DeliveredNumKey ¶ added in v0.1.3
func HeaderNumKey ¶
func NewBeaconClient ¶
func PayloadKeyKey ¶ added in v0.1.2
func PayloadKeyKey(key PayloadKey) ds.Key
func RegistrationKey ¶
func SubmitBlockRequestToSignedBuilderBid ¶
func SubmitBlockRequestToSignedBuilderBid(req *types.BuilderSubmitBlockRequest, sk *bls.SecretKey, pubkey *types.PublicKey, domain types.Domain) (*types.SignedBuilderBid, error)
SubmitBlockRequestToSignedBuilderBid converts a builders block submission to a bid compatible with mev-boost
func ValidatorKey ¶
Types ¶
type API ¶
type API struct { Service RelayService Log log.Logger EnableProfile bool // contains filtered or unexported fields }
type AllValidatorsResponse ¶
type AllValidatorsResponse struct {
Data []ValidatorResponseEntry
}
AllValidatorsResponse is the response for querying active validators
type BeaconClient ¶
type BeaconClient interface { SubscribeToHeadEvents(ctx context.Context, slotC chan HeadEvent) GetProposerDuties(Epoch) (*RegisteredProposersResponse, error) SyncStatus() (*SyncStatusPayloadData, error) KnownValidators(Slot) (AllValidatorsResponse, error) Endpoint() string }
func NewMultiBeaconClient ¶ added in v0.1.2
func NewMultiBeaconClient(l log.Logger, clients []BeaconClient) BeaconClient
type BeaconState ¶ added in v0.1.2
type BidTraceWithTimestamp ¶
type BlockBidAndTrace ¶
type BlockBidAndTrace struct { Trace *types.SignedBidTrace Bid *types.GetHeaderResponse Payload *types.GetPayloadResponse }
func SubmitBlockRequestToBlockBidAndTrace ¶
func SubmitBlockRequestToBlockBidAndTrace(signedBuilderBid *types.SignedBuilderBid, submitBlockRequest *types.BuilderSubmitBlockRequest) BlockBidAndTrace
type BuilderGetValidatorsResponseEntrySlice ¶
type BuilderGetValidatorsResponseEntrySlice []types.BuilderGetValidatorsResponseEntry
func (BuilderGetValidatorsResponseEntrySlice) Loggable ¶
func (b BuilderGetValidatorsResponseEntrySlice) Loggable() map[string]any
type Config ¶
type Config struct { Log log.Logger BuilderURLs []string Network string RelayRequestTimeout time.Duration BuilderCheck bool BeaconEndpoints []string PubKey types.PublicKey SecretKey *bls.SecretKey Datadir string TTL time.Duration CheckKnownValidator bool // contains filtered or unexported fields }
Config provides all available options for the default BeaconClient and Relay
type Datastore ¶
type Datastore interface { PutHeader(context.Context, Slot, HeaderAndTrace, time.Duration) error GetHeader(context.Context, Slot) (HeaderAndTrace, error) GetHeaderByBlockHash(context.Context, types.Hash) (HeaderAndTrace, error) GetHeaderByBlockNum(context.Context, uint64) (HeaderAndTrace, error) GetHeaderBatch(context.Context, []Slot) ([]HeaderAndTrace, error) PutDelivered(context.Context, Slot, DeliveredTrace, time.Duration) error GetDelivered(context.Context, Slot) (BidTraceWithTimestamp, error) GetDeliveredBatch(context.Context, []Slot) ([]BidTraceWithTimestamp, error) GetDeliveredByBlockHash(context.Context, types.Hash) (BidTraceWithTimestamp, error) GetDeliveredByBlockNum(context.Context, uint64) (BidTraceWithTimestamp, error) GetDeliveredByPubkey(context.Context, types.PublicKey) (BidTraceWithTimestamp, error) PutPayload(context.Context, PayloadKey, *BlockBidAndTrace, time.Duration) error GetPayload(context.Context, PayloadKey) (*BlockBidAndTrace, error) PutRegistration(context.Context, PubKey, types.SignedValidatorRegistration, time.Duration) error GetRegistration(context.Context, PubKey) (types.SignedValidatorRegistration, error) }
type DefaultDatastore ¶
type DefaultDatastore struct {
Storage TTLStorage
}
func (DefaultDatastore) GetDelivered ¶ added in v0.1.3
func (s DefaultDatastore) GetDelivered(ctx context.Context, slot Slot) (BidTraceWithTimestamp, error)
func (DefaultDatastore) GetDeliveredBatch ¶ added in v0.1.3
func (s DefaultDatastore) GetDeliveredBatch(ctx context.Context, slots []Slot) ([]BidTraceWithTimestamp, error)
func (DefaultDatastore) GetDeliveredByBlockHash ¶ added in v0.1.3
func (s DefaultDatastore) GetDeliveredByBlockHash(ctx context.Context, bh types.Hash) (BidTraceWithTimestamp, error)
func (DefaultDatastore) GetDeliveredByBlockNum ¶ added in v0.1.3
func (s DefaultDatastore) GetDeliveredByBlockNum(ctx context.Context, bn uint64) (BidTraceWithTimestamp, error)
func (DefaultDatastore) GetDeliveredByPubkey ¶ added in v0.1.3
func (s DefaultDatastore) GetDeliveredByPubkey(ctx context.Context, pk types.PublicKey) (BidTraceWithTimestamp, error)
func (DefaultDatastore) GetHeader ¶
func (s DefaultDatastore) GetHeader(ctx context.Context, slot Slot) (HeaderAndTrace, error)
func (DefaultDatastore) GetHeaderBatch ¶
func (s DefaultDatastore) GetHeaderBatch(ctx context.Context, slots []Slot) ([]HeaderAndTrace, error)
func (DefaultDatastore) GetHeaderByBlockHash ¶
func (s DefaultDatastore) GetHeaderByBlockHash(ctx context.Context, bh types.Hash) (HeaderAndTrace, error)
func (DefaultDatastore) GetHeaderByBlockNum ¶
func (s DefaultDatastore) GetHeaderByBlockNum(ctx context.Context, bn uint64) (HeaderAndTrace, error)
func (DefaultDatastore) GetPayload ¶
func (s DefaultDatastore) GetPayload(ctx context.Context, key PayloadKey) (*BlockBidAndTrace, error)
func (DefaultDatastore) GetRegistration ¶
func (s DefaultDatastore) GetRegistration(ctx context.Context, pk PubKey) (types.SignedValidatorRegistration, error)
func (DefaultDatastore) PutDelivered ¶
func (s DefaultDatastore) PutDelivered(ctx context.Context, slot Slot, trace DeliveredTrace, ttl time.Duration) error
func (DefaultDatastore) PutHeader ¶
func (s DefaultDatastore) PutHeader(ctx context.Context, slot Slot, header HeaderAndTrace, ttl time.Duration) error
func (DefaultDatastore) PutPayload ¶
func (s DefaultDatastore) PutPayload(ctx context.Context, key PayloadKey, payload *BlockBidAndTrace, ttl time.Duration) error
func (DefaultDatastore) PutRegistration ¶
func (s DefaultDatastore) PutRegistration(ctx context.Context, pk PubKey, registration types.SignedValidatorRegistration, ttl time.Duration) error
type DefaultRelay ¶
type DefaultRelay struct {
// contains filtered or unexported fields
}
func (*DefaultRelay) GetHeader ¶
func (rs *DefaultRelay) GetHeader(ctx context.Context, request HeaderRequest, state State) (*types.GetHeaderResponse, error)
GetHeader is called by a block proposer communicating through mev-boost and returns a bid along with an execution payload header
func (*DefaultRelay) GetPayload ¶
func (rs *DefaultRelay) GetPayload(ctx context.Context, payloadRequest *types.SignedBlindedBeaconBlock, state State) (*types.GetPayloadResponse, error)
GetPayload is called by a block proposer communicating through mev-boost and reveals execution payload of given signed beacon block if stored
func (*DefaultRelay) GetValidators ¶
func (rs *DefaultRelay) GetValidators(state State) BuilderGetValidatorsResponseEntrySlice
GetValidators returns a list of registered block proposers in current and next epoch
func (*DefaultRelay) Log ¶
func (rs *DefaultRelay) Log() log.Logger
func (*DefaultRelay) RegisterValidator ¶
func (rs *DefaultRelay) RegisterValidator(ctx context.Context, payload []types.SignedValidatorRegistration, state State) error
RegisterValidator is called is called by validators communicating through mev-boost who would like to receive a block from us when their slot is scheduled
func (*DefaultRelay) SubmitBlock ¶
func (rs *DefaultRelay) SubmitBlock(ctx context.Context, submitBlockRequest *types.BuilderSubmitBlockRequest, state State) error
SubmitBlock Accepts block from trusted builder and stores
type DefaultService ¶
type DefaultService struct { Log log.Logger Config Config Relay Relay Storage TTLStorage Datastore Datastore NewBeaconClient func() (BeaconClient, error) // contains filtered or unexported fields }
func (*DefaultService) GetBlockReceived ¶
func (s *DefaultService) GetBlockReceived(ctx context.Context, slot Slot) ([]BidTraceWithTimestamp, error)
func (*DefaultService) GetBlockReceivedByHash ¶
func (s *DefaultService) GetBlockReceivedByHash(ctx context.Context, bh types.Hash) ([]BidTraceWithTimestamp, error)
func (*DefaultService) GetBlockReceivedByNum ¶
func (s *DefaultService) GetBlockReceivedByNum(ctx context.Context, bn uint64) ([]BidTraceWithTimestamp, error)
func (*DefaultService) GetDelivered ¶
func (*DefaultService) GetDeliveredByHash ¶
func (*DefaultService) GetDeliveredByNum ¶
func (*DefaultService) GetDeliveredByPubKey ¶
func (*DefaultService) GetHeader ¶
func (s *DefaultService) GetHeader(ctx context.Context, request HeaderRequest) (*types.GetHeaderResponse, error)
func (*DefaultService) GetPayload ¶
func (s *DefaultService) GetPayload(ctx context.Context, payloadRequest *types.SignedBlindedBeaconBlock) (*types.GetPayloadResponse, error)
func (*DefaultService) GetTailBlockReceived ¶
func (s *DefaultService) GetTailBlockReceived(ctx context.Context, limit uint64) ([]BidTraceWithTimestamp, error)
func (*DefaultService) GetTailDelivered ¶
func (*DefaultService) GetTailDeliveredCursor ¶
func (*DefaultService) GetValidators ¶
func (s *DefaultService) GetValidators() BuilderGetValidatorsResponseEntrySlice
func (*DefaultService) Ready ¶
func (s *DefaultService) Ready() <-chan struct{}
func (*DefaultService) RegisterValidator ¶
func (s *DefaultService) RegisterValidator(ctx context.Context, payload []types.SignedValidatorRegistration) error
func (*DefaultService) Registration ¶
func (s *DefaultService) Registration(ctx context.Context, pk types.PublicKey) (types.SignedValidatorRegistration, error)
func (*DefaultService) Run ¶
func (s *DefaultService) Run(ctx context.Context) (err error)
Run creates a relay, datastore and starts the beacon client event loop
func (*DefaultService) SubmitBlock ¶
func (s *DefaultService) SubmitBlock(ctx context.Context, submitBlockRequest *types.BuilderSubmitBlockRequest) error
type DeliveredTrace ¶ added in v0.1.3
type DeliveredTrace struct { Trace BidTraceWithTimestamp BlockNumber uint64 }
type ErrBadProposer ¶
type ErrBadProposer struct {
Want, Got PubKey
}
func (ErrBadProposer) Error ¶
func (ErrBadProposer) Error() string
type GetValidatorRelayResponse ¶
type GetValidatorRelayResponse []struct { Slot uint64 `json:"slot,string"` Entry struct { Message struct { FeeRecipient string `json:"fee_recipient"` GasLimit uint64 `json:"gas_limit,string"` Timestamp uint64 `json:"timestamp,string"` PubKey string `json:"pubkey"` } `json:"message"` Signature string `json:"signature"` } `json:"entry"` }
type HeadEvent ¶
type HeadEvent struct { Slot uint64 `json:"slot,string"` Block string `json:"block"` State string `json:"state"` }
HeadEvent is emitted when subscribing to head events
type HeaderAndTrace ¶
type HeaderAndTrace struct { Header *types.ExecutionPayloadHeader Trace *BidTraceWithTimestamp }
type HeaderRequest ¶
func ParseHeaderRequest ¶
func ParseHeaderRequest(r *http.Request) HeaderRequest
func (HeaderRequest) Slot ¶
func (hr HeaderRequest) Slot() (Slot, error)
type MultiBeaconClient ¶ added in v0.1.2
type MultiBeaconClient struct { Log log.Logger Clients []BeaconClient // contains filtered or unexported fields }
func (*MultiBeaconClient) Endpoint ¶ added in v0.1.2
func (b *MultiBeaconClient) Endpoint() string
func (*MultiBeaconClient) GetProposerDuties ¶ added in v0.1.2
func (b *MultiBeaconClient) GetProposerDuties(epoch Epoch) (*RegisteredProposersResponse, error)
func (*MultiBeaconClient) KnownValidators ¶ added in v0.1.2
func (b *MultiBeaconClient) KnownValidators(headSlot Slot) (AllValidatorsResponse, error)
func (*MultiBeaconClient) SubscribeToHeadEvents ¶ added in v0.1.2
func (b *MultiBeaconClient) SubscribeToHeadEvents(ctx context.Context, slotC chan HeadEvent)
func (*MultiBeaconClient) SyncStatus ¶ added in v0.1.2
func (b *MultiBeaconClient) SyncStatus() (*SyncStatusPayloadData, error)
type PayloadKey ¶
func SubmissionToKey ¶ added in v0.1.2
func SubmissionToKey(submission *types.BuilderSubmitBlockRequest) PayloadKey
type RegisteredProposersResponse ¶
type RegisteredProposersResponse struct {
Data []RegisteredProposersResponseData
}
RegisteredProposersResponse is the response for querying proposer duties
type Relay ¶
type Relay interface { // Proposer APIs RegisterValidator(context.Context, []types.SignedValidatorRegistration, State) error GetHeader(context.Context, HeaderRequest, State) (*types.GetHeaderResponse, error) GetPayload(context.Context, *types.SignedBlindedBeaconBlock, State) (*types.GetPayloadResponse, error) // Builder APIs SubmitBlock(context.Context, *types.BuilderSubmitBlockRequest, State) error GetValidators(State) BuilderGetValidatorsResponseEntrySlice }
type RelayService ¶
type RelayService interface { // Proposer APIs (builder spec https://github.com/ethereum/builder-specs) RegisterValidator(context.Context, []types.SignedValidatorRegistration) error GetHeader(context.Context, 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() BuilderGetValidatorsResponseEntrySlice // Data APIs GetDelivered(context.Context, Slot) ([]types.BidTrace, error) GetDeliveredByHash(context.Context, types.Hash) ([]types.BidTrace, error) GetDeliveredByNum(context.Context, uint64) ([]types.BidTrace, error) GetDeliveredByPubKey(context.Context, types.PublicKey) ([]types.BidTrace, error) GetTailDelivered(context.Context, uint64) ([]types.BidTrace, error) GetTailDeliveredCursor(context.Context, uint64, uint64) ([]types.BidTrace, error) GetBlockReceived(context.Context, Slot) ([]BidTraceWithTimestamp, error) GetBlockReceivedByHash(context.Context, types.Hash) ([]BidTraceWithTimestamp, error) GetBlockReceivedByNum(context.Context, uint64) ([]BidTraceWithTimestamp, error) GetTailBlockReceived(context.Context, uint64) ([]BidTraceWithTimestamp, error) Registration(context.Context, types.PublicKey) (types.SignedValidatorRegistration, error) }
type State ¶
type State interface { Datastore() Datastore Beacon() BeaconState }
type SyncStatusPayload ¶
type SyncStatusPayload struct {
Data SyncStatusPayloadData
}
SyncStatusPayload is the response payload for /eth/v1/node/syncing
type SyncStatusPayloadData ¶
type TTLDatastoreBatcher ¶
type TTLDatastoreBatcher struct {
ds.TTLDatastore
}
type TTLStorage ¶
type ValidatorResponseEntry ¶
type ValidatorResponseEntry struct { Index uint64 `json:"index,string"` // Index of validator in validator registry. Balance string `json:"balance"` // Current validator balance in gwei. Status string `json:"status"` Validator ValidatorResponseValidatorData `json:"validator"` }
type ValidatorResponseValidatorData ¶
type ValidatorResponseValidatorData struct {
Pubkey string `json:"pubkey"`
}