utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainIdMainnet  = "kyve-1"
	ChainIdKaon     = "kaon-1"
	ChainIdKorellia = "korellia"

	RestEndpointMainnet  = "https://api-eu-1.kyve.network"
	RestEndpointKaon     = "https://api-eu-1.kaon.kyve.network"
	RestEndpointKorellia = "https://api.korellia.kyve.network"

	RestEndpointArweave     = "https://arweave.net"
	RestEndpointBundlr      = "https://arweave.net"
	RestEndpointKYVEStorage = "https://storage.kyve.network"
)
View Source
const (
	KSyncRuntimeTendermint      = "@kyvejs/tendermint"
	KSyncRuntimeTendermintBsync = "@kyvejs/tendermint-bsync"
	KSyncRuntimeTendermintSsync = "@kyvejs/tendermint-ssync"
)
View Source
const (
	DefaultChainId            = ChainIdMainnet
	DefaultBackupPath         = "~/.ksync/backups"
	DefaultMetricsServerPort  = 8080
	DefaultSnapshotServerPort = 7878
)
View Source
const (
	BundlesPageLimit            = 100
	BlockBuffer                 = 300
	PruningInterval             = 100
	SnapshotPruningAheadFactor  = 3
	SnapshotPruningWindowFactor = 6
	BackoffMaxRetries           = 10
)

Variables

This section is empty.

Functions

func CreateSha256Checksum added in v1.0.0

func CreateSha256Checksum(input []byte) (hash string)

func DecompressGzip

func DecompressGzip(input []byte) ([]byte, error)

func GetChainRest added in v1.0.0

func GetChainRest(chainId, chainRest string) string

func GetFromUrl added in v1.0.0

func GetFromUrl(url string) ([]byte, error)

GetFromUrl tries to fetch data from url

func GetFromUrlWithBackoff added in v1.0.0

func GetFromUrlWithBackoff(url string) (data []byte, err error)

GetFromUrlWithBackoff tries to fetch data from url with exponential backoff

func IsFileGreaterThanOrEqualTo100MB added in v0.5.0

func IsFileGreaterThanOrEqualTo100MB(filePath string) (bool, error)

func LoadConfig added in v1.0.0

func LoadConfig(homePath string) (*cfg.Config, error)

func ParseSnapshotFromKey added in v1.0.0

func ParseSnapshotFromKey(key string) (height int64, chunkIndex int64, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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