cache

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SlotStartTime added in v0.7.0

func SlotStartTime(genesis uint64, slot types2.Slot, secondsPerSlot uint64) time.Time

Types

type CacheAPIs added in v0.7.0

type CacheAPIs interface {
	MarkInProgress(slot uint64) error
	MarkNotInProgress(slot uint64) error
	Purge()
	ForceDelSlot(slot uint64)
	ContainsHash(hash []byte) bool
}

type GenericCache added in v0.7.0

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

type PanCacheInsertParams added in v0.7.0

type PanCacheInsertParams struct {
	CurrentVerifiedHeader  *eth1Types.Header
	LastVerifiedHeaderHash []byte
}

type PandoraCache added in v0.7.0

type PandoraCache struct {
	GenericCache
}

func NewPandoraCache added in v0.7.0

func NewPandoraCache(size int, genesisTimestamp uint64, secondsPerSlot uint64) *PandoraCache

NewPandoraCache creates a pandora cache

func (*PandoraCache) ContainsHash added in v0.7.0

func (pc *PandoraCache) ContainsHash(hash []byte) bool

func (*PandoraCache) ForceDelSlot added in v0.7.0

func (pc *PandoraCache) ForceDelSlot(slot uint64)

func (*PandoraCache) Get added in v0.7.0

func (pc *PandoraCache) Get(slot uint64) *PandoraCacheData

func (*PandoraCache) MarkInProgress added in v0.7.0

func (pc *PandoraCache) MarkInProgress(slot uint64) error

func (*PandoraCache) MarkNotInProgress added in v0.7.0

func (pc *PandoraCache) MarkNotInProgress(slot uint64) error

func (*PandoraCache) Purge added in v0.7.0

func (pc *PandoraCache) Purge()

func (*PandoraCache) Put added in v0.7.0

func (pc *PandoraCache) Put(slot uint64, insertParams *PanCacheInsertParams) error

func (*PandoraCache) RemoveByTime added in v0.7.0

func (pc *PandoraCache) RemoveByTime(timeStamp time.Time) []*eth1Types.Header

func (*PandoraCache) VerifyPandoraCache added in v0.7.0

func (pc *PandoraCache) VerifyPandoraCache(verifyParams *PanCacheInsertParams) error

type PandoraCacheAPIs added in v0.7.0

type PandoraCacheAPIs interface {
	CacheAPIs
	Put(slot uint64, insertParams *PanCacheInsertParams) error
	Get(slot uint64) *PandoraCacheData
	RemoveByTime(timeStamp time.Time) []*eth1Types.Header
}

type PandoraCacheData added in v0.7.0

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

func (*PandoraCacheData) GetPanHeader added in v0.7.0

func (q *PandoraCacheData) GetPanHeader() *eth1Types.Header

type PandoraInterface added in v0.7.0

type PandoraInterface = PandoraCacheAPIs

type VanCacheInsertParams added in v0.7.0

type VanCacheInsertParams struct {
	CurrentShardInfo     *types.VanguardShardInfo
	LastVerfiedShardRoot []byte
	DisableDelete        bool
}

type VanguardCache added in v0.7.0

type VanguardCache struct {
	GenericCache
}

func NewVanguardCache added in v0.7.0

func NewVanguardCache(size int, genesisTimestamp uint64, secondsPerSlot uint64) *VanguardCache

func (*VanguardCache) ContainsHash added in v0.7.0

func (vc *VanguardCache) ContainsHash(hash []byte) bool

func (*VanguardCache) ForceDelSlot added in v0.7.0

func (vc *VanguardCache) ForceDelSlot(slot uint64)

func (*VanguardCache) Get added in v0.7.0

func (vc *VanguardCache) Get(slot uint64) *VanguardCacheData

func (*VanguardCache) MarkInProgress added in v0.7.0

func (vc *VanguardCache) MarkInProgress(slot uint64) error

func (*VanguardCache) MarkNotInProgress added in v0.7.0

func (vc *VanguardCache) MarkNotInProgress(slot uint64) error

func (*VanguardCache) Purge added in v0.7.0

func (vc *VanguardCache) Purge()

func (*VanguardCache) Put added in v0.7.0

func (vc *VanguardCache) Put(slot uint64, insertParams *VanCacheInsertParams) error

func (*VanguardCache) RemoveByTime added in v0.7.0

func (vc *VanguardCache) RemoveByTime(timeStamp time.Time)

func (*VanguardCache) VerifyVanguardCache added in v0.7.0

func (vc *VanguardCache) VerifyVanguardCache(verifyParams *VanCacheInsertParams) error

type VanguardCacheAPIs added in v0.7.0

type VanguardCacheAPIs interface {
	CacheAPIs
	Put(slot uint64, insertParams *VanCacheInsertParams) error
	Get(slot uint64) *VanguardCacheData
	RemoveByTime(timeStamp time.Time)
}

type VanguardCacheData added in v0.7.0

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

func (*VanguardCacheData) GetVanShard added in v0.7.0

func (q *VanguardCacheData) GetVanShard() *types.VanguardShardInfo

func (*VanguardCacheData) GetVanShardSlotNumber added in v0.7.0

func (q *VanguardCacheData) GetVanShardSlotNumber() uint64

type VanguardInterface added in v0.7.0

type VanguardInterface = VanguardCacheAPIs

Jump to

Keyboard shortcuts

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