Documentation
¶
Index ¶
- Constants
- Variables
- func LoadStateFromDBOrGenesisDocProvider(stateDB dbm.DB, genesisDocProvider GenesisDocProvider) (sm.State, *types.GenesisDoc, error)
- func TiasyncPrerunRoutine(appName string, cmd *cobra.Command, srvCtx *server.Context) error
- func TiasyncRoutine(svrCtx *server.Context, clientCtx client.Context, celestiaNamespace string)
- type GenesisDocProvider
- type Tiasync
- type TiasyncConfig
- type TiasyncInternalConfig
- type TiasyncPrerun
Constants ¶
View Source
const ( FlagAddrBookPath = "tiasync.addr-book-path" FlagChainID = "tiasync.chain-id" FlagEnable = "tiasync.enable" FlagLocalhostPort = "tiasync.localhost-port" FlagNodeKeyPath = "tiasync.node-key-path" FlagTiaPollInterval = "tiasync.tia-poll-interval" DefaultConfigDir = "config" DefaultNodeKeyName = "tiasync_node_key.json" DefaultAddrBookName = "tiasync_addrbook.json" DefaultConfigTemplate = `` /* 630-byte string literal not displayed */ )
Variables ¶
View Source
var DefaultTiasyncConfig = TiasyncConfig{ AddrBookPath: defaultAddrBookPath, ChainID: "", Enable: false, LocalhostPort: "26777", NodeKeyPath: defaultNodeKeyPath, TiaPollInterval: time.Second * 5, }
Functions ¶
func LoadStateFromDBOrGenesisDocProvider ¶
func LoadStateFromDBOrGenesisDocProvider( stateDB dbm.DB, genesisDocProvider GenesisDocProvider, ) (sm.State, *types.GenesisDoc, error)
LoadStateFromDBOrGenesisDocProvider attempts to load the state from the database, or creates one using the given genesisDocProvider. On success this also returns the genesis doc loaded through the given provider.
func TiasyncPrerunRoutine ¶
Types ¶
type GenesisDocProvider ¶
type GenesisDocProvider func() (*types.GenesisDoc, error)
GenesisDocProvider returns a GenesisDoc. It allows the GenesisDoc to be pulled from sources other than the filesystem, for instance from a distributed key-value store cluster.
type Tiasync ¶
func NewTiasync ¶
type TiasyncConfig ¶
type TiasyncConfig struct { // Path to tiasync's address book AddrBookPath string `mapstructure:"addr-book-path"` // Optionally provide the chain-id to filter out blocks from our namespace with a different chain-id ChainID string `mapstructure:"chain-id"` // Switch to enable/disable tiasync Enable bool `mapstructure:"enable"` // Port that cometbft will listen on LocalhostPort string `mapstructure:"localhost-port"` // Path to the JSON file containing the private key to use for node authentication in the p2p protocol // Tiasync must have a different key than the full node's cometbft instance NodeKeyPath string `mapstructure:"node-key-path"` // Cadence to query celestia for new blocks TiaPollInterval time.Duration `mapstructure:"tia-poll-interval"` }
TiasyncConfig defines the configuration for the in-process tiasync.
func TiasyncConfigFromAppOpts ¶
func TiasyncConfigFromAppOpts(appOpts servertypes.AppOptions) TiasyncConfig
func (TiasyncConfig) AddrBookFile ¶
func (t TiasyncConfig) AddrBookFile(cometCfg cfg.BaseConfig) string
func (TiasyncConfig) NodeKeyFile ¶
func (t TiasyncConfig) NodeKeyFile(cometCfg cfg.BaseConfig) string
type TiasyncInternalConfig ¶
var TiasyncInternalCfg TiasyncInternalConfig
type TiasyncPrerun ¶
func NewTiasyncPrerun ¶
func NewTiasyncPrerun( cmtConfig *cfg.Config, tiasyncCfg *TiasyncConfig, logger log.Logger, blockStoreDB dbm.DB, state sm.State, genDoc *types.GenesisDoc, height int64, ) (*TiasyncPrerun, error)
func (*TiasyncPrerun) Start ¶
func (t *TiasyncPrerun) Start()
Click to show internal directories.
Click to hide internal directories.