structs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownValue            = errors.New("value is unknown")
	ErrPayloadAlreadyDelivered = errors.New("the slot payload was already delivered")
)

Functions

This section is empty.

Types

type BeaconState

type BeaconState struct {
	DutiesState
	ValidatorsState
	GenesisInfo
}

func (*BeaconState) HeadSlot

func (s *BeaconState) HeadSlot() Slot

func (*BeaconState) IsKnownValidator

func (s *BeaconState) IsKnownValidator(pk types.PubkeyHex) (bool, error)

func (*BeaconState) KnownValidatorByIndex

func (s *BeaconState) KnownValidatorByIndex(index uint64) (types.PubkeyHex, error)

func (*BeaconState) KnownValidators

func (s *BeaconState) KnownValidators() map[types.PubkeyHex]struct{}

func (*BeaconState) ValidatorsMap

type BidTraceExtended

type BidTraceExtended struct {
	types.BidTrace
	BlockNumber uint64 `json:"block_number,string"`
	NumTx       uint64 `json:"num_tx,string"`
}

type BidTraceWithTimestamp

type BidTraceWithTimestamp struct {
	BidTraceExtended
	Timestamp uint64 `json:"timestamp,string"`
}

type BlockBidAndTrace

type BlockBidAndTrace struct {
	Trace   *types.SignedBidTrace
	Bid     *types.GetHeaderResponse
	Payload *types.GetPayloadResponse
}

type BuilderGetValidatorsResponseEntrySlice

type BuilderGetValidatorsResponseEntrySlice []types.BuilderGetValidatorsResponseEntry

func (BuilderGetValidatorsResponseEntrySlice) Loggable

type DeliveredTrace

type DeliveredTrace struct {
	Trace       BidTraceWithTimestamp
	BlockNumber uint64
}

type DutiesState

type DutiesState struct {
	CurrentSlot            Slot
	ProposerDutiesResponse BuilderGetValidatorsResponseEntrySlice
}

type Epoch

type Epoch uint64

func (Epoch) Loggable

func (e Epoch) Loggable() map[string]any

type GenesisInfo

type GenesisInfo struct {
	GenesisTime           uint64 `json:"genesis_time,string"`
	GenesisValidatorsRoot string `json:"genesis_validators_root"`
	GenesisForkVersion    string `json:"genesis_fork_version"`
}

type HeaderAndTrace

type HeaderAndTrace struct {
	Header *types.ExecutionPayloadHeader
	Trace  *BidTraceWithTimestamp
}

type HeaderData

type HeaderData struct {
	HeaderAndTrace
	Slot      Slot
	Marshaled []byte `json:"-"`
}

/ extra

func (*HeaderData) UnmarshalJSON

func (hd *HeaderData) UnmarshalJSON(b []byte) error

type HeaderRequest

type HeaderRequest map[string]string

func (HeaderRequest) ParentHash

func (hr HeaderRequest) ParentHash() (types.Hash, error)

func (HeaderRequest) Pubkey

func (hr HeaderRequest) Pubkey() (PubKey, error)

func (HeaderRequest) Slot

func (hr HeaderRequest) Slot() (Slot, error)

type HeaderTraceQuery

type HeaderTraceQuery struct {
	Slot      Slot
	BlockHash types.Hash
	BlockNum  uint64
	Limit     uint64
}

HeaderTraceQuery structure used to query header structure

func (HeaderTraceQuery) HasBlockHash

func (q HeaderTraceQuery) HasBlockHash() bool

func (HeaderTraceQuery) HasBlockNum

func (q HeaderTraceQuery) HasBlockNum() bool

func (HeaderTraceQuery) HasLimit

func (q HeaderTraceQuery) HasLimit() bool

func (HeaderTraceQuery) HasSlot

func (q HeaderTraceQuery) HasSlot() bool

type PayloadKey

type PayloadKey struct {
	BlockHash types.Hash
	Proposer  types.PublicKey
	Slot      Slot
}

type PayloadQuery

type PayloadQuery struct {
	Slot      Slot
	BlockHash types.Hash
	BlockNum  uint64
	PubKey    types.PublicKey
	Limit     uint64
}

type PayloadTraceQuery

type PayloadTraceQuery struct {
	Slot          Slot
	BlockHash     types.Hash
	BlockNum      uint64
	Pubkey        types.PublicKey
	Cursor, Limit uint64
}

PayloadTraceQuery structure used to query payloads only

func (PayloadTraceQuery) HasBlockHash

func (q PayloadTraceQuery) HasBlockHash() bool

func (PayloadTraceQuery) HasBlockNum

func (q PayloadTraceQuery) HasBlockNum() bool

func (PayloadTraceQuery) HasCursor

func (q PayloadTraceQuery) HasCursor() bool

func (PayloadTraceQuery) HasLimit

func (q PayloadTraceQuery) HasLimit() bool

func (PayloadTraceQuery) HasPubkey

func (q PayloadTraceQuery) HasPubkey() bool

func (PayloadTraceQuery) HasSlot

func (q PayloadTraceQuery) HasSlot() bool

type PubKey

type PubKey struct{ types.PublicKey }

func (PubKey) Bytes

func (pk PubKey) Bytes() []byte

func (PubKey) Loggable

func (pk PubKey) Loggable() map[string]any

type SignedValidatorRegistration

type SignedValidatorRegistration struct {
	types.SignedValidatorRegistration
	Raw json.RawMessage
}

func (*SignedValidatorRegistration) UnmarshalJSON

func (s *SignedValidatorRegistration) UnmarshalJSON(b []byte) error

type Slot

type Slot uint64
const (
	SlotsPerEpoch Slot = 32
)

func (Slot) Epoch

func (s Slot) Epoch() Epoch

func (Slot) HeaderKey

func (s Slot) HeaderKey() ds.Key

func (Slot) Loggable

func (s Slot) Loggable() map[string]any

func (Slot) PayloadKey

func (s Slot) PayloadKey() ds.Key

type ValidatorsState

type ValidatorsState struct {
	KnownValidatorsByIndex map[uint64]types.PubkeyHex
	KnownValidators        map[types.PubkeyHex]struct{}
}

Jump to

Keyboard shortcuts

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