types

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BLSSignatureSize = 96

Variables

This section is empty.

Functions

func CopyHeader added in v0.7.0

func CopyHeader(h *eth1Types.Header) *eth1Types.Header

CopyHeader creates a deep copy of a block header to prevent side effects from modifying a header variable.

Types

type BlockStatus added in v0.7.0

type BlockStatus struct {
	Hash          common.Hash `json:"hash"`
	Status        Status      `json:"status"`
	FinalizedSlot uint64      `json:"finalizedSlot"`
}

type BlsSignatureBytes added in v0.7.0

type BlsSignatureBytes [BLSSignatureSize]byte

func BytesToSig added in v0.7.0

func BytesToSig(b []byte) BlsSignatureBytes

func (BlsSignatureBytes) Bytes added in v0.7.0

func (h BlsSignatureBytes) Bytes() []byte

Bytes gets the byte representation of the underlying hash.

func (*BlsSignatureBytes) SetBytes added in v0.7.0

func (bls *BlsSignatureBytes) SetBytes(b []byte)

type ExtraData added in v0.7.0

type ExtraData struct {
	Slot          uint64
	Epoch         uint64
	ProposerIndex uint64
}

ExtraData

type MinimalEpochConsensusInfo

type MinimalEpochConsensusInfo struct {
	Epoch            uint64        `json:"epoch"`
	ValidatorList    []string      `json:"validatorList"`
	EpochStartTime   uint64        `json:"epochTimeStart"`
	SlotTimeDuration time.Duration `json:"slotTimeDuration"`
}

func (*MinimalEpochConsensusInfo) ConvertToEpochInfoV2 added in v0.7.0

func (info *MinimalEpochConsensusInfo) ConvertToEpochInfoV2() *MinimalEpochConsensusInfoV2

type MinimalEpochConsensusInfoV2 added in v0.7.0

type MinimalEpochConsensusInfoV2 struct {
	Epoch            uint64        `json:"epoch"`
	ValidatorList    []string      `json:"validatorList"`
	EpochStartTime   uint64        `json:"epochTimeStart"`
	SlotTimeDuration time.Duration `json:"slotTimeDuration"`
	ReorgInfo        *Reorg        `json:"reorg_info"`
	FinalizedSlot    uint64        `json:"finalizedSlot"`
}

func (*MinimalEpochConsensusInfoV2) ConvertToEpochInfo added in v0.7.0

func (info *MinimalEpochConsensusInfoV2) ConvertToEpochInfo() *MinimalEpochConsensusInfo

type MultiShardInfo added in v0.7.0

type MultiShardInfo struct {
	SlotInfo *NewSlotInfo
	Shards   []*Shard
}

MultiShardInfo

func (*MultiShardInfo) DeepEqual added in v0.7.0

func (si *MultiShardInfo) DeepEqual(nsi *MultiShardInfo) bool

func (*MultiShardInfo) FormattedStr added in v0.7.0

func (si *MultiShardInfo) FormattedStr() string

func (*MultiShardInfo) GetPanBlockNumber added in v0.7.0

func (si *MultiShardInfo) GetPanBlockNumber() uint64

func (*MultiShardInfo) GetPanShardRoot added in v0.7.0

func (si *MultiShardInfo) GetPanShardRoot() common.Hash

func (*MultiShardInfo) GetPanShardRootBytes added in v0.7.0

func (si *MultiShardInfo) GetPanShardRootBytes() []byte

func (*MultiShardInfo) GetSlot added in v0.7.0

func (si *MultiShardInfo) GetSlot() uint64

func (*MultiShardInfo) GetVanSlotRoot added in v0.7.0

func (si *MultiShardInfo) GetVanSlotRoot() common.Hash

func (*MultiShardInfo) GetVanSlotRootBytes added in v0.7.0

func (si *MultiShardInfo) GetVanSlotRootBytes() []byte

func (*MultiShardInfo) IsNil added in v0.7.0

func (si *MultiShardInfo) IsNil() bool

func (*MultiShardInfo) NotNil added in v0.7.0

func (si *MultiShardInfo) NotNil() bool

type NewSlotInfo added in v0.7.0

type NewSlotInfo struct {
	Slot      uint64
	BlockRoot common.Hash
}

NewSlotInfo contains slot info

type PanExtraDataWithBLSSig added in v0.7.0

type PanExtraDataWithBLSSig struct {
	ExtraData
	BlsSignatureBytes BlsSignatureBytes
}

PanExtraDataWithBLSSig

type PandoraHeaderInfo added in v0.7.0

type PandoraHeaderInfo struct {
	Slot   uint64
	Header *eth1Types.Header
}

PandoraHeaderInfo

type PandoraPendingHeaderFilter added in v0.7.0

type PandoraPendingHeaderFilter struct {
	FromBlockHash common.Hash `json:"fromBlockHash"`
}

PandoraPendingHeaderFilter

type Reorg added in v0.7.0

type Reorg struct {
	VanParentHash []byte `json:"van_parent_hash"`
	PanParentHash []byte `json:"pan_parent_hash"`
	NewSlot       uint64 `json:"new_slot"`
}

type Shard added in v0.7.0

type Shard struct {
	Id     uint64
	Blocks []*ShardData
}

type ShardData added in v0.7.0

type ShardData struct {
	Number     uint64
	HeaderRoot common.Hash
}

type ShutDownSignal added in v0.7.0

type ShutDownSignal struct {
	Shutdown bool
}

type SlotInfo added in v0.7.0

type SlotInfo struct {
	VanguardBlockHash common.Hash
	PandoraHeaderHash common.Hash
}

SlotInfo

type SlotInfoWithStatus added in v0.7.0

type SlotInfoWithStatus struct {
	VanguardBlockHash common.Hash
	PandoraHeaderHash common.Hash
	Status
}

SlotInfo

type Status added in v0.7.0

type Status string
const (
	Pending  Status = "Pending"
	Verified Status = "Verified"
	Invalid  Status = "Invalid"
	Skipped  Status = "Skipped"
	Unknown  Status = "Unknown"
)

type VanguardShardInfo added in v0.7.0

type VanguardShardInfo struct {
	Slot           uint64
	ShardInfo      *eth2Types.PandoraShard
	BlockHash      []byte
	FinalizedSlot  uint64
	FinalizedEpoch uint64
	ParentHash     []byte
}

VanguardShardInfo

Jump to

Keyboard shortcuts

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