helpers

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateKeepRecent

func CalculateKeepRecent(maxBundleSize int, uploadInterval int) int

CalculateKeepRecent calculates the value for keepRecent, which is relevant for the pruning settings. It ensures that data that doesn't need to be stored anymore is pruned only after it has been validated. The calculation is based on the KYVE pool settings, and it ensures that blocks are stored for 3 days in advance.

func CalculateMaxDifference

func CalculateMaxDifference(maxBundleSize int, uploadInterval int) int

CalculateMaxDifference calculates a crucial threshold for the supervysor architecture. When the node is ahead of the pool by this value, the syncing process will halt in Ghost Mode. Once the node is again halfway within this value, the normal syncing process continues until reaching the threshold again.

func CheckBinaryPath added in v0.2.0

func CheckBinaryPath(path string) error

func CheckFilePath added in v0.2.0

func CheckFilePath(path string) error

func GetPoolSettings

func GetPoolSettings(poolId int, chainId string, poolEndpoints string) ([2]int, error)

GetPoolSettings retrieves KYVE pool settings by using a list of endpoints (& optionally fallback endpoints) based on the provided chain and pool ID.

func SetPruningSettings added in v0.2.0

func SetPruningSettings(homePath string, stateRequests bool, keepRecent int, interval int) error

SetPruningSettings updates the pruning settings in the app.toml file of the given home directory. It reads the current file, modifies the relevant lines and writes the updated lines back to the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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