Documentation ¶
Index ¶
- Constants
- func GetFileChannelDescriptor() *p2p.ChannelDescriptor
- func GetLightBlockChannelDescriptor() *p2p.ChannelDescriptor
- func GetMetadataChannelDescriptor() *p2p.ChannelDescriptor
- func GetParamsChannelDescriptor() *p2p.ChannelDescriptor
- func Snapshot(height uint64, dbsyncConfig config.DBSyncConfig, baseConfig config.BaseConfig) error
- type Reactor
- type Syncer
Constants ¶
View Source
const ( // MetadataChannel exchanges DB metadata MetadataChannel = p2p.ChannelID(0x70) // FileChannel exchanges file data FileChannel = p2p.ChannelID(0x71) LightBlockChannel = p2p.ChannelID(0x72) ParamsChannel = p2p.ChannelID(0x73) MetadataHeightFilename = "LATEST_HEIGHT" HeightSubdirectoryPrefix = "snapshot_" MetadataFilename = "METADATA" )
View Source
const ApplicationDBSubdirectory = "application.db"
View Source
const LockFile = "LOCK"
View Source
const WasmDirectory = "wasm/wasm/state/wasm"
TODO: this is bad as TM shouldn't be aware of wasm. DB sync/restore logic should ideally happen on application-level (i.e. Cosmos layer) and communicate to TM via new ABCI methods
View Source
const WasmSuffix = "_wasm"
Variables ¶
This section is empty.
Functions ¶
func GetFileChannelDescriptor ¶
func GetFileChannelDescriptor() *p2p.ChannelDescriptor
func GetLightBlockChannelDescriptor ¶
func GetLightBlockChannelDescriptor() *p2p.ChannelDescriptor
func GetMetadataChannelDescriptor ¶
func GetMetadataChannelDescriptor() *p2p.ChannelDescriptor
func GetParamsChannelDescriptor ¶
func GetParamsChannelDescriptor() *p2p.ChannelDescriptor
func Snapshot ¶
func Snapshot(height uint64, dbsyncConfig config.DBSyncConfig, baseConfig config.BaseConfig) error
Types ¶
type Reactor ¶
type Reactor struct { service.BaseService // contains filtered or unexported fields }
func NewReactor ¶
func NewReactor( logger log.Logger, config config.DBSyncConfig, baseConfig config.BaseConfig, peerEvents p2p.PeerEventSubscriber, stateStore sm.Store, blockStore *store.BlockStore, initialHeight int64, chainID string, eventBus *eventbus.EventBus, shouldSync bool, postSyncHook func(context.Context, sm.State) error, ) *Reactor
func (*Reactor) SetFileChannel ¶
func (*Reactor) SetLightBlockChannel ¶
func (*Reactor) SetMetadataChannel ¶
func (*Reactor) SetParamsChannel ¶
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
func NewSyncer ¶
func NewSyncer( logger log.Logger, dbsyncConfig config.DBSyncConfig, baseConfig config.BaseConfig, enable bool, metadataRequestFn func(context.Context) error, fileRequestFn func(context.Context, types.NodeID, uint64, string) error, commitStateFn func(context.Context, uint64) (sm.State, *types.Commit, error), postSyncFn func(context.Context, sm.State, *types.Commit) error, resetDirFn func(*Syncer), ) *Syncer
func (*Syncer) PushFile ¶
func (s *Syncer) PushFile(file *dstypes.FileResponse)
func (*Syncer) SetMetadata ¶
Click to show internal directories.
Click to hide internal directories.