Documentation
¶
Index ¶
- type BackupConfig
- type Bundle
- type DataItem
- type Engine
- type Entry
- type FinalizedBundle
- type FinalizedBundleResponse
- type FinalizedBundlesResponse
- type HeightResponse
- type Integrations
- type KSYNCIntegration
- type Metrics
- type NetworkProperties
- type Networks
- type Pagination
- type Pool
- type PoolResponse
- type SourceMetadata
- type SourceRegistry
- type SupportedChain
- type SupportedChains
- type TendermintSSyncConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupConfig ¶ added in v1.0.0
type DataItem ¶
type DataItem struct {
Key string `json:"key"`
Value json.RawMessage `json:"value"`
}
type Engine ¶ added in v1.1.0
type Engine interface {
// GetName gets the engine name
GetName() string
// OpenDBs opens the relevant blockstore and state DBs
OpenDBs(homePath string) error
// CloseDBs closes the relevant blockstore and state DBs
CloseDBs() error
// GetHomePath gets the home path of the config and data folder
GetHomePath() string
// GetProxyAppAddress gets the proxy app address of the TSP connection
GetProxyAppAddress() string
// StartProxyApp starts the proxy app connections to the app
StartProxyApp() error
// StopProxyApp stops the proxy app connections to the app
StopProxyApp() error
// GetChainId gets the chain id of the app
GetChainId() (string, error)
// GetMetrics gets already encoded metric information
// for the metrics server
GetMetrics() ([]byte, error)
// GetContinuationHeight gets the block height from the app at which
// KSYNC should proceed block-syncing
GetContinuationHeight() (int64, error)
// DoHandshake does a handshake with the app and needs to be called
// before ApplyBlock
DoHandshake() error
// ApplyBlock takes the block in the raw format and applies it against
// the app
ApplyBlock(runtime string, value []byte) error
// ApplyFirstBlockOverP2P applies the first block over the P2P reactor
// which is necessary, if the genesis file is bigger than 100MB
ApplyFirstBlockOverP2P(runtime string, value, nextValue []byte) error
// GetGenesisPath gets the file path to the genesis file
GetGenesisPath() string
// GetGenesisHeight gets the initial height defined by the genesis file
GetGenesisHeight() (int64, error)
// GetHeight gets the latest height stored in the blockstore.db
GetHeight() int64
// GetBaseHeight gets the earliest height stored in the blockstore.db
GetBaseHeight() int64
// GetAppHeight gets over ABCI the latest block height tracked by the app
GetAppHeight() (int64, error)
// GetSnapshots gets the available snapshots over ABCI from the app
GetSnapshots() ([]byte, error)
// IsSnapshotAvailable gets available snapshots over ABCI from the app
// and checks if the requested snapshot is available
IsSnapshotAvailable(height int64) (bool, error)
// GetSnapshotChunk gets the requested snapshot chunk over ABCI from the
// app
GetSnapshotChunk(height, format, chunk int64) ([]byte, error)
// GetBlock loads the requested block from the blockstore.db
GetBlock(height int64) ([]byte, error)
// GetState rebuilds the requested state from the blockstore and state.db
GetState(height int64) ([]byte, error)
// GetSeenCommit loads the seen commit from the blockstore.db
GetSeenCommit(height int64) ([]byte, error)
// OfferSnapshot offers a snapshot over ABCI to the app
OfferSnapshot(value []byte) (string, uint32, error)
// ApplySnapshotChunk applies a snapshot chunk over ABCI to the app
ApplySnapshotChunk(chunkIndex uint32, value []byte) (string, error)
// BootstrapState initializes the tendermint state
BootstrapState(value []byte) error
// PruneBlocks prunes blocks from the block store and state store
// from the earliest found base height to the specified height
PruneBlocks(toHeight int64) error
// ResetAll removes all the data and WAL, reset this node's validator
// to genesis state
ResetAll(homePath string, keepAddrBook bool) error
}
Engine is an interface defining common behaviour for each consensus engine. Currently, both tendermint and cometbft are supported
type FinalizedBundle ¶
type FinalizedBundle struct {
Id string `json:"id,omitempty"`
StorageId string `json:"storage_id,omitempty"`
StorageProviderId string `json:"storage_provider_id,omitempty"`
CompressionId string `json:"compression_id,omitempty"`
FromKey string `json:"from_key,omitempty"`
ToKey string `json:"to_key,omitempty"`
DataHash string `json:"data_hash,omitempty"`
}
type FinalizedBundleResponse ¶
type FinalizedBundleResponse = struct {
FinalizedBundle FinalizedBundle `json:"finalized_bundle"`
}
type FinalizedBundlesResponse ¶ added in v1.0.0
type FinalizedBundlesResponse = struct {
FinalizedBundles []FinalizedBundle `json:"finalized_bundles"`
Pagination Pagination `json:"pagination"`
}
type HeightResponse ¶ added in v0.5.0
type HeightResponse struct {
Result struct {
Response struct {
LastBlockHeight string `json:"last_block_height"`
} `json:"response"`
} `json:"result"`
}
type Integrations ¶ added in v1.2.3
type Integrations struct {
KSYNC *KSYNCIntegration `yaml:"ksync,omitempty"`
}
type KSYNCIntegration ¶ added in v1.2.3
type Metrics ¶ added in v1.1.0
type Metrics struct {
LatestBlockHash string `json:"latest_block_hash"`
LatestAppHash string `json:"latest_app_hash"`
LatestBlockHeight int64 `json:"latest_block_height"`
LatestBlockTime time.Time `json:"latest_block_time"`
EarliestBlockHash string `json:"earliest_block_hash"`
EarliestAppHash string `json:"earliest_app_hash"`
EarliestBlockHeight int64 `json:"earliest_block_height"`
EarliestBlockTime time.Time `json:"earliest_block_time"`
CatchingUp bool `json:"catching_up"`
}
type NetworkProperties ¶ added in v1.2.3
type NetworkProperties struct {
LatestBlockKey *string
LatestStateKey *string
BlockStartKey *string
StateStartKey *string
Integrations *Integrations `yaml:"integrations,omitempty"`
Pools *[]Pool `yaml:"pools,omitempty"`
SourceMetadata *SourceMetadata `yaml:"properties,omitempty"`
}
type Networks ¶ added in v1.2.3
type Networks struct {
Kaon *NetworkProperties `yaml:"kaon-1,omitempty"`
Kyve *NetworkProperties `yaml:"kyve-1,omitempty"`
}
type Pagination ¶
type Pagination struct {
NextKey []byte `json:"next_key"`
}
type PoolResponse ¶
type SourceMetadata ¶ added in v1.1.0
type SourceMetadata struct {
Title string `yaml:"title"`
}
type SourceRegistry ¶ added in v1.1.0
type SupportedChain ¶ added in v1.0.0
type SupportedChains ¶ added in v1.0.0
type SupportedChains = struct {
Mainnet []SupportedChain `json:"kyve-1"`
Kaon []SupportedChain `json:"kaon-1"`
}
type TendermintSSyncConfig ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.