Documentation
¶
Index ¶
- Constants
- func CreateSha256Checksum(input []byte) (hash string)
- func DecompressGzip(input []byte) ([]byte, error)
- func FormatGenesisFile(genesisPath string) error
- func GetChainRest(chainId, chainRest string) string
- func GetFromUrl(url string) ([]byte, error)
- func GetFromUrlWithBackoff(url string) (data []byte, err error)
- func GetFromUrlWithOptions(url string, options GetFromUrlOptions) ([]byte, error)
- func GetHomePathFromBinary(binaryPath string) string
- func GetInitialHeightFromGenesisFile(genesisPath string) (int64, error)
- func GetStatusFromRpc(blockRpcConfig types.BlockRpcConfig) (*types.StatusResponse, error)
- func GetVersion() string
- func IsFileGreaterThanOrEqualTo100MB(filePath string) (bool, error)
- func KsyncLogger(moduleName string) zerolog.Logger
- func LogFormatter(keyvals ...interface{}) zerolog.Logger
- func ParseBlockHeightFromKey(key string) (int64, error)
- func ParseSnapshotFromKey(key string) (height int64, chunkIndex int64, err error)
- func StartBinaryProcessForDB(engine types.Engine, binaryPath string, debug bool, args []string) (processId int, err error)
- func StartBinaryProcessForP2P(engine types.Engine, binaryPath string, debug bool, args []string) (processId int, err error)
- func StopProcessByProcessId(processId int) error
- func TrackBackupEvent(backupCompression string, backupKeepRecent int64, optOut bool)
- func TrackEnginesEvent(optOut bool)
- func TrackInfoEvent(chainId string, optOut bool)
- func TrackPruningEvent(untilHeight int64, optOut bool)
- func TrackResetEvent(optOut bool)
- func TrackServeSnapshotsEvent(engine types.Engine, chainId, chainRest, storageRest string, ...)
- func TrackSyncCompletedEvent(stateSyncHeight, blocksSynced, targetHeight int64, elapsed float64, ...)
- func TrackSyncStartEvent(engine types.Engine, syncType, chainId, chainRest, storageRest string, ...)
- func TrackVersionEvent(optOut bool)
- type GetFromUrlOptions
Constants ¶
View Source
const ( ChainIdMainnet = "kyve-1" ChainIdKaon = "kaon-1" ChainIdKorellia = "korellia-2" RestEndpointMainnet = "https://api.kyve.network" RestEndpointKaon = "https://api.kaon.kyve.network" RestEndpointKorellia = "https://api.korellia.kyve.network" RestEndpointArweave = "https://arweave.net" RestEndpointBundlr = "https://arweave.net" RestEndpointKYVEStorage = "https://storage.kyve.network" SegmentKey = "quSEhAvH5fqlHyop9r9mDGxgd97ro3vQ" )
View Source
const ( KSyncRuntimeTendermint = "@kyvejs/tendermint" KSyncRuntimeTendermintBsync = "@kyvejs/tendermint-bsync" KSyncRuntimeTendermintSsync = "@kyvejs/tendermint-ssync" )
View Source
const ( EngineTendermintV34 = "tendermint-v0.34" EngineCometBFTV37 = "cometbft-v0.37" EngineCometBFTV38 = "cometbft-v0.38" EngineCelestiaCoreV34 = "celestia-core-v0.34" EngineTendermintV34Legacy = "tendermint-v34" EngineCometBFTV37Legacy = "cometbft-v37" EngineCometBFTV38Legacy = "cometbft-v38" EngineCelestiaCoreV34Legacy = "celestia-core-v34" EngineTendermintLegacy = "tendermint" EngineCometBFTLegacy = "cometbft" EngineCelestiaCoreLegacy = "tendermint-celestiacore" )
View Source
const ( DefaultEngine = EngineTendermintV34 DefaultChainId = ChainIdMainnet DefaultBackupPath = "~/.ksync/backups" DefaultRpcServerPort = 7777 DefaultSnapshotServerPort = 7878 )
View Source
const ( BundlesPageLimit = 1000 BlockBuffer = 300 PruningInterval = 100 SnapshotPruningAheadFactor = 3 SnapshotPruningWindowFactor = 6 BackoffMaxRetries = 10 RequestTimeoutMS = 250 RequestBlocksTimeoutMS = 250 )
View Source
const ( SYNC_STARTED = "SYNC_STARTED" SYNC_COMPLETED = "SYNC_COMPLETED" BLOCK_SYNC = "BLOCK_SYNC" STATE_SYNC = "STATE_SYNC" HEIGHT_SYNC = "HEIGHT_SYNC" SERVE_SNAPSHOTS = "SERVE_SNAPSHOTS" INFO = "INFO" RESET = "RESET" PRUNE = "PRUNE" BACKUP = "BACKUP" VERSION = "VERSION" ENGINES = "ENGINES" )
View Source
const (
DefaultRegistryURL = "https://raw.githubusercontent.com/KYVENetwork/source-registry/main/.github/registry.yml"
)
Variables ¶
This section is empty.
Functions ¶
func CreateSha256Checksum ¶ added in v1.0.0
func DecompressGzip ¶
func FormatGenesisFile ¶ added in v1.5.0
func GetChainRest ¶ added in v1.0.0
func GetFromUrl ¶ added in v1.0.0
GetFromUrl tries to fetch data from url with a custom User-Agent header
func GetFromUrlWithBackoff ¶ added in v1.0.0
GetFromUrlWithBackoff tries to fetch data from url with exponential backoff
func GetFromUrlWithOptions ¶ added in v1.7.0
func GetFromUrlWithOptions(url string, options GetFromUrlOptions) ([]byte, error)
GetFromUrlWithOptions tries to fetch data from url with a custom User-Agent header and custom options
func GetHomePathFromBinary ¶ added in v1.1.0
func GetInitialHeightFromGenesisFile ¶ added in v1.6.2
func GetStatusFromRpc ¶ added in v1.7.0
func GetStatusFromRpc(blockRpcConfig types.BlockRpcConfig) (*types.StatusResponse, error)
func GetVersion ¶ added in v1.4.0
func GetVersion() string
func IsFileGreaterThanOrEqualTo100MB ¶ added in v0.5.0
func KsyncLogger ¶ added in v1.1.0
func LogFormatter ¶ added in v1.1.0
func ParseBlockHeightFromKey ¶ added in v1.1.0
func ParseSnapshotFromKey ¶ added in v1.0.0
func StartBinaryProcessForDB ¶ added in v1.1.0
func StartBinaryProcessForP2P ¶ added in v1.1.0
func StopProcessByProcessId ¶ added in v1.1.0
func TrackBackupEvent ¶ added in v1.2.1
func TrackEnginesEvent ¶ added in v1.5.0
func TrackEnginesEvent(optOut bool)
func TrackInfoEvent ¶ added in v1.2.1
func TrackPruningEvent ¶ added in v1.2.1
func TrackResetEvent ¶ added in v1.2.1
func TrackResetEvent(optOut bool)
func TrackServeSnapshotsEvent ¶ added in v1.2.1
func TrackSyncCompletedEvent ¶ added in v1.2.1
func TrackSyncStartEvent ¶ added in v1.2.1
func TrackVersionEvent ¶ added in v1.2.1
func TrackVersionEvent(optOut bool)
Types ¶
type GetFromUrlOptions ¶ added in v1.7.0
Click to show internal directories.
Click to hide internal directories.