Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( chainID isc.ChainID, nr sm_utils.NodeRandomiser, wal sm_gpa_utils.BlockWAL, snapshotExistsFun SnapshotExistsFun, store state.Store, metrics *metrics.ChainStateManagerMetrics, log *logger.Logger, parameters StateManagerParameters, ) (gpa.GPA, error)
Types ¶
type SnapshotExistsFun ¶
type SnapshotExistsFun func(uint32, *state.L1Commitment) bool
type StateManagerOutput ¶
type StateManagerOutput interface { TakeBlocksCommitted() []sm_snapshots.SnapshotInfo TakeSnapshotToLoad() sm_snapshots.SnapshotInfo TakeUpdateSnapshots() bool // contains filtered or unexported methods }
type StateManagerParameters ¶
type StateManagerParameters struct { // How many blocks may be stored in cache before old ones start being deleted BlockCacheMaxSize int // How long should the block stay in block cache before being deleted BlockCacheBlocksInCacheDuration time.Duration // How often should the block cache be cleaned BlockCacheBlockCleaningPeriod time.Duration // How often get block requests should be repeated StateManagerGetBlockRetry time.Duration // How often requests waiting for response should be checked for expired context StateManagerRequestCleaningPeriod time.Duration // How often timer tick fires in state manager StateManagerTimerTickPeriod time.Duration // This number of states will always be available in the database PruningMinStatesToKeep int // On single store pruning attempt at most this number of states will be deleted PruningMaxStatesToDelete int // How often snapshot manager should update list of known snapshots SnapshotManagerUpdatePeriod time.Duration TimeProvider sm_gpa_utils.TimeProvider }
func NewStateManagerParameters ¶
func NewStateManagerParameters(tpOpt ...sm_gpa_utils.TimeProvider) StateManagerParameters
Source Files ¶
Click to show internal directories.
Click to hide internal directories.