cometbft_v37

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlocksyncChannel = byte(0x40)
)

Variables

This section is empty.

Functions

func CreateMempool

func CreateMempool(config *Config, proxyApp proxy.AppConns, state sm.State) mempl.Mempool

func CreateSwitch

func CreateSwitch(config *Config,
	transport p2p.Transport,
	bcReactor p2p.Reactor,
	nodeInfo p2p.NodeInfo,
	nodeKey *p2p.NodeKey,
	logger cometLog.Logger) *p2p.Switch

func DefaultDBProvider

func DefaultDBProvider(ctx *DBContext) (dbm.DB, error)

func GetBlockstoreDBs

func GetBlockstoreDBs(config *Config) (dbm.DB, *store.BlockStore, error)

func GetStateDBs

func GetStateDBs(config *Config) (dbm.DB, state.Store, error)

func LoadConfig

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

func MakeNodeInfo

func MakeNodeInfo(
	config *Config,
	nodeKey *p2p.NodeKey,
	genDoc *GenesisDoc,
) (p2p.NodeInfo, error)

Types

type Block

type Block = cometTypes.Block

type BlockchainReactor

type BlockchainReactor struct {
	p2p.BaseReactor
	// contains filtered or unexported fields
}

func NewBlockchainReactor

func NewBlockchainReactor(block *Block, nextBlock *Block) *BlockchainReactor

func (*BlockchainReactor) GetChannels

func (bcR *BlockchainReactor) GetChannels() []*p2p.ChannelDescriptor

func (*BlockchainReactor) ReceiveEnvelope

func (bcR *BlockchainReactor) ReceiveEnvelope(e p2p.Envelope)

type Config

type Config = cometCfg.Config

type DBContext

type DBContext struct {
	ID     string
	Config *Config
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine added in v1.9.0

func NewEngine(homePath string) (*Engine, error)

func (*Engine) ApplyBlock

func (engine *Engine) ApplyBlock(rawBlock, nextRawBlock []byte) error

func (*Engine) ApplyFirstBlockOverP2P

func (engine *Engine) ApplyFirstBlockOverP2P(rawBlock, nextRawBlock []byte) error

func (*Engine) ApplySnapshotChunk

func (engine *Engine) ApplySnapshotChunk(chunkIndex int64, chunk []byte) error

func (*Engine) BootstrapState

func (engine *Engine) BootstrapState(rawState, rawSeenCommit, rawBlock []byte) error

func (*Engine) CloseDBs

func (engine *Engine) CloseDBs() error

func (*Engine) DoHandshake

func (engine *Engine) DoHandshake() error

func (*Engine) GetAppHeight

func (engine *Engine) GetAppHeight() (int64, error)

func (*Engine) GetBaseHeight

func (engine *Engine) GetBaseHeight() int64

func (*Engine) GetBlock

func (engine *Engine) GetBlock(height int64) ([]byte, error)

func (*Engine) GetHeight

func (engine *Engine) GetHeight() int64

func (*Engine) GetName

func (engine *Engine) GetName() string

func (*Engine) GetProxyAppAddress

func (engine *Engine) GetProxyAppAddress() string

func (*Engine) GetRpcListenAddress added in v1.9.0

func (engine *Engine) GetRpcListenAddress() string

func (*Engine) GetSeenCommit

func (engine *Engine) GetSeenCommit(height int64) ([]byte, error)

func (*Engine) GetSnapshotChunk

func (engine *Engine) GetSnapshotChunk(height, format, chunk int64) ([]byte, error)

func (*Engine) GetSnapshots

func (engine *Engine) GetSnapshots() ([]byte, error)

func (*Engine) GetState

func (engine *Engine) GetState(height int64) ([]byte, error)

func (*Engine) IsSnapshotAvailable

func (engine *Engine) IsSnapshotAvailable(height int64) (bool, error)

func (*Engine) LoadConfig added in v1.8.0

func (engine *Engine) LoadConfig() error

func (*Engine) OfferSnapshot

func (engine *Engine) OfferSnapshot(rawSnapshot, rawState []byte) error

func (*Engine) OpenDBs

func (engine *Engine) OpenDBs() error

func (*Engine) PruneBlocks

func (engine *Engine) PruneBlocks(toHeight int64) error

func (*Engine) ResetAll

func (engine *Engine) ResetAll(keepAddrBook bool) error

func (*Engine) StartProxyApp

func (engine *Engine) StartProxyApp() error

func (*Engine) StartRPCServer added in v1.7.0

func (engine *Engine) StartRPCServer(port int64)

func (*Engine) StopProxyApp

func (engine *Engine) StopProxyApp() error

type EngineLogger added in v1.9.0

type EngineLogger struct {
	// contains filtered or unexported fields
}

func (EngineLogger) Debug added in v1.9.0

func (l EngineLogger) Debug(msg string, keyvals ...interface{})

func (EngineLogger) Error added in v1.9.0

func (l EngineLogger) Error(msg string, keyvals ...interface{})

func (EngineLogger) Info added in v1.9.0

func (l EngineLogger) Info(msg string, keyvals ...interface{})

func (EngineLogger) With added in v1.9.0

func (l EngineLogger) With(keyvals ...interface{}) log.Logger

type GenesisDoc

type GenesisDoc = cometTypes.GenesisDoc

type Snapshot

type Snapshot = abciTypes.Snapshot

type Transport added in v1.7.0

type Transport struct {
	// contains filtered or unexported fields
}

func (*Transport) IsListening added in v1.7.0

func (t *Transport) IsListening() bool

func (*Transport) Listeners added in v1.7.0

func (t *Transport) Listeners() []string

func (*Transport) NodeInfo added in v1.7.0

func (t *Transport) NodeInfo() cometP2P.NodeInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳