Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Store
- func (s *Store) ClearDB() error
- func (s *Store) Close() error
- func (s *Store) ConsensusInfo(ctx context.Context, epoch uint64) (*eventTypes.MinimalEpochConsensusInfo, error)
- func (s *Store) ConsensusInfos(fromEpoch uint64) ([]*eventTypes.MinimalEpochConsensusInfo, error)
- func (s *Store) DatabasePath() string
- func (s *Store) FindVerifiedSlotNumber(info *types.SlotInfo, fromSlot uint64) uint64
- func (s *Store) GetLatestEpoch() uint64
- func (s *Store) InMemoryLatestVerifiedHeaderHash() common.Hash
- func (s *Store) InMemoryLatestVerifiedSlot() uint64
- func (s *Store) InvalidSlotInfo(slot uint64) (*types.SlotInfo, error)
- func (s *Store) LatestSavedEpoch() uint64
- func (s *Store) LatestSavedVerifiedSlot() uint64
- func (s *Store) LatestVerifiedHeaderHash() common.Hash
- func (s *Store) RemoveRangeConsensusInfo(startEpoch, endEpoch uint64) error
- func (s *Store) RemoveRangeVerifiedInfo(fromSlot, skipSlot uint64) error
- func (s *Store) RevertConsensusInfo(reorgInfo *types.MinimalEpochConsensusInfoV2) error
- func (s *Store) SaveConsensusInfo(ctx context.Context, consensusInfo *eventTypes.MinimalEpochConsensusInfo) error
- func (s *Store) SaveInvalidSlotInfo(slot uint64, slotInfo *types.SlotInfo) error
- func (s *Store) SaveLatestEpoch(ctx context.Context) error
- func (s *Store) SaveLatestVerifiedHeaderHash() error
- func (s *Store) SaveLatestVerifiedSlot(ctx context.Context) error
- func (s *Store) SaveVerifiedSlotInfo(slot uint64, slotInfo *types.SlotInfo) error
- func (s *Store) VerifiedSlotInfo(slot uint64) (*types.SlotInfo, error)
- func (s *Store) VerifiedSlotInfos(fromSlot uint64) (map[uint64]*types.SlotInfo, error)
Constants ¶
View Source
const ( // ConsensusInfosCacheSize with 1024 consensus infos will be 1.5MB. ConsensusInfosCacheSize = 1 << 10 // OrchestratorNodeDbDirName is the name of the directory containing the orchestrator node database. OrchestratorNodeDbDirName = "orchestrator" // DatabaseFileName is the name of the orchestrator node database. DatabaseFileName = "orchestrator.db" )
Variables ¶
View Source
var (
EmptyHash = common.HexToHash("0000000000000000000000000000000000000000000000000000000000000000")
)
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { // There should be mutex in store sync.Mutex // contains filtered or unexported fields }
func NewKVStore ¶
NewKVStore initializes a new boltDB key-value store at the directory path specified, creates the kv-buckets based on the schema, and stores an open connection db object as a property of the Store struct.
func (*Store) ConsensusInfo ¶
func (s *Store) ConsensusInfo(ctx context.Context, epoch uint64) (*eventTypes.MinimalEpochConsensusInfo, error)
ConsensusInfo
func (*Store) ConsensusInfos ¶
func (s *Store) ConsensusInfos(fromEpoch uint64) ( []*eventTypes.MinimalEpochConsensusInfo, error, )
ConsensusInfos
func (*Store) DatabasePath ¶
DatabasePath at which this database writes files.
func (*Store) FindVerifiedSlotNumber ¶
func (*Store) InMemoryLatestVerifiedHeaderHash ¶
func (*Store) InMemoryLatestVerifiedSlot ¶
func (*Store) InvalidSlotInfo ¶
InvalidSlotInfo
func (*Store) LatestSavedVerifiedSlot ¶
LatestSavedEpoch
func (*Store) LatestVerifiedHeaderHash ¶
LatestSavedEpoch
func (*Store) RemoveRangeConsensusInfo ¶
func (*Store) RemoveRangeVerifiedInfo ¶
func (*Store) RevertConsensusInfo ¶
func (s *Store) RevertConsensusInfo(reorgInfo *types.MinimalEpochConsensusInfoV2) error
func (*Store) SaveConsensusInfo ¶
func (s *Store) SaveConsensusInfo( ctx context.Context, consensusInfo *eventTypes.MinimalEpochConsensusInfo, ) error
SaveConsensusInfo
func (*Store) SaveInvalidSlotInfo ¶
SaveInvalidSlotInfo
func (*Store) SaveLatestEpoch ¶
SaveLatestEpoch
func (*Store) SaveLatestVerifiedHeaderHash ¶
SaveLatestEpoch
func (*Store) SaveLatestVerifiedSlot ¶
SaveLatestEpoch
func (*Store) SaveVerifiedSlotInfo ¶
SaveVerifiedSlotInfo
func (*Store) VerifiedSlotInfo ¶
VerifiedSlotInfo
Click to show internal directories.
Click to hide internal directories.