Documentation ¶
Index ¶
- func PathExists(path string) (bool, error)
- func WithMaxOpenDBs(optsMaxOpenDBs int) options.Option[BucketManager]
- type BucketManager
- func (b *BucketManager) BucketSize(epoch iotago.EpochIndex) (int64, error)
- func (b *BucketManager) CloseWithoutLocking()
- func (b *BucketManager) DeleteBucket(epoch iotago.EpochIndex) (deleted bool)
- func (b *BucketManager) Flush() error
- func (b *BucketManager) Get(epoch iotago.EpochIndex, realm kvstore.Realm) (kvstore.KVStore, error)
- func (b *BucketManager) IsTooOld(epoch iotago.EpochIndex) (isTooOld bool)
- func (b *BucketManager) LastPrunedEpoch() (epoch iotago.EpochIndex, hasPruned bool)
- func (b *BucketManager) Lock()
- func (b *BucketManager) Prune(epoch iotago.EpochIndex) error
- func (b *BucketManager) PruneSlots(epoch iotago.EpochIndex, startPruneRange iotago.SlotIndex, ...) error
- func (b *BucketManager) RestoreFromDisk() (lastPrunedEpoch iotago.EpochIndex)
- func (b *BucketManager) Shutdown()
- func (b *BucketManager) TotalSize() int64
- func (b *BucketManager) Unlock()
- type Prunable
- func (p *Prunable) AccountDiffs(slot iotago.SlotIndex) (*slotstore.AccountDiffs, error)
- func (p *Prunable) Attestations(slot iotago.SlotIndex) (kvstore.KVStore, error)
- func (p *Prunable) Blocks(slot iotago.SlotIndex) (*slotstore.Blocks, error)
- func (p *Prunable) BucketSize(epoch iotago.EpochIndex) (int64, error)
- func (p *Prunable) Committee() *epochstore.Store[*account.SeatedAccounts]
- func (p *Prunable) CommitteeCandidates(epoch iotago.EpochIndex) (*kvstore.TypedStore[iotago.AccountID, iotago.SlotIndex], error)
- func (p *Prunable) DecidedUpgradeSignals() *epochstore.Store[model.VersionAndHash]
- func (p *Prunable) Flush()
- func (p *Prunable) Mutations(slot iotago.SlotIndex) (kvstore.KVStore, error)
- func (p *Prunable) PoolStats() *epochstore.Store[*model.PoolsStats]
- func (p *Prunable) Prune(epoch iotago.EpochIndex, defaultPruningDelay iotago.EpochIndex) error
- func (p *Prunable) RestoreFromDisk() (lastPrunedEpoch iotago.EpochIndex)
- func (p *Prunable) Retainer(slot iotago.SlotIndex) (*slotstore.Retainer, error)
- func (p *Prunable) Rewards() *epochstore.EpochKVStore
- func (p *Prunable) RewardsForEpoch(epoch iotago.EpochIndex) (kvstore.KVStore, error)
- func (p *Prunable) Rollback(targetEpoch iotago.EpochIndex, startPruneRange iotago.SlotIndex, ...) error
- func (p *Prunable) RootBlocks(slot iotago.SlotIndex) (*slotstore.Store[iotago.BlockID, iotago.CommitmentID], error)
- func (p *Prunable) Roots(slot iotago.SlotIndex) (*slotstore.Store[iotago.CommitmentID, *iotago.Roots], error)
- func (p *Prunable) Shutdown()
- func (p *Prunable) Size() int64
- func (p *Prunable) UpgradeSignals(slot iotago.SlotIndex) (*slotstore.Store[account.SeatIndex, *model.SignaledBlock], error)
- func (p *Prunable) ValidatorPerformances(slot iotago.SlotIndex) (*slotstore.Store[iotago.AccountID, *model.ValidatorPerformance], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathExists ¶
func WithMaxOpenDBs ¶
func WithMaxOpenDBs(optsMaxOpenDBs int) options.Option[BucketManager]
WithMaxOpenDBs sets the maximum concurrently open DBs.
Types ¶
type BucketManager ¶
type BucketManager struct {
// contains filtered or unexported fields
}
func NewBucketManager ¶
func NewBucketManager(dbConfig database.Config, errorHandler func(error), opts ...options.Option[BucketManager]) *BucketManager
func (*BucketManager) BucketSize ¶
func (b *BucketManager) BucketSize(epoch iotago.EpochIndex) (int64, error)
func (*BucketManager) CloseWithoutLocking ¶
func (b *BucketManager) CloseWithoutLocking()
func (*BucketManager) DeleteBucket ¶
func (b *BucketManager) DeleteBucket(epoch iotago.EpochIndex) (deleted bool)
DeleteBucket deletes directory that stores the data for the given bucket and returns boolean flag indicating whether a directory for that bucket existed.
func (*BucketManager) Flush ¶
func (b *BucketManager) Flush() error
func (*BucketManager) Get ¶
func (b *BucketManager) Get(epoch iotago.EpochIndex, realm kvstore.Realm) (kvstore.KVStore, error)
func (*BucketManager) IsTooOld ¶
func (b *BucketManager) IsTooOld(epoch iotago.EpochIndex) (isTooOld bool)
IsTooOld checks if the index is in a pruned epoch.
func (*BucketManager) LastPrunedEpoch ¶
func (b *BucketManager) LastPrunedEpoch() (epoch iotago.EpochIndex, hasPruned bool)
func (*BucketManager) Lock ¶
func (b *BucketManager) Lock()
func (*BucketManager) Prune ¶
func (b *BucketManager) Prune(epoch iotago.EpochIndex) error
func (*BucketManager) PruneSlots ¶
func (b *BucketManager) PruneSlots(epoch iotago.EpochIndex, startPruneRange iotago.SlotIndex, endPruneRange iotago.SlotIndex) error
PruneSlots prunes the data of all slots in the range [from, to] in the given epoch.
func (*BucketManager) RestoreFromDisk ¶
func (b *BucketManager) RestoreFromDisk() (lastPrunedEpoch iotago.EpochIndex)
func (*BucketManager) Shutdown ¶
func (b *BucketManager) Shutdown()
func (*BucketManager) TotalSize ¶
func (b *BucketManager) TotalSize() int64
TotalSize returns the size of the prunable storage containing all db instances.
func (*BucketManager) Unlock ¶
func (b *BucketManager) Unlock()
type Prunable ¶
type Prunable struct {
// contains filtered or unexported fields
}
func New ¶
func New(dbConfig database.Config, apiProvider iotago.APIProvider, errorHandler func(error), opts ...options.Option[BucketManager]) *Prunable
func (*Prunable) AccountDiffs ¶
func (*Prunable) Attestations ¶
func (*Prunable) BucketSize ¶
func (p *Prunable) BucketSize(epoch iotago.EpochIndex) (int64, error)
func (*Prunable) Committee ¶
func (p *Prunable) Committee() *epochstore.Store[*account.SeatedAccounts]
func (*Prunable) CommitteeCandidates ¶
func (p *Prunable) CommitteeCandidates(epoch iotago.EpochIndex) (*kvstore.TypedStore[iotago.AccountID, iotago.SlotIndex], error)
func (*Prunable) DecidedUpgradeSignals ¶
func (p *Prunable) DecidedUpgradeSignals() *epochstore.Store[model.VersionAndHash]
func (*Prunable) PoolStats ¶
func (p *Prunable) PoolStats() *epochstore.Store[*model.PoolsStats]
func (*Prunable) Prune ¶
func (p *Prunable) Prune(epoch iotago.EpochIndex, defaultPruningDelay iotago.EpochIndex) error
func (*Prunable) RestoreFromDisk ¶
func (p *Prunable) RestoreFromDisk() (lastPrunedEpoch iotago.EpochIndex)
func (*Prunable) Rewards ¶
func (p *Prunable) Rewards() *epochstore.EpochKVStore
func (*Prunable) RewardsForEpoch ¶
func (*Prunable) RootBlocks ¶
func (*Prunable) UpgradeSignals ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.