tendermint

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func CreateAndStartEventBus

func CreateAndStartEventBus() (*tmTypes.EventBus, error)

func CreateAndStartProxyAppConns

func CreateAndStartProxyAppConns(config *Config) (proxy.AppConns, error)

func CreateEvidenceReactor

func CreateEvidenceReactor(config *Config, stateStore sm.Store, blockStore *store.BlockStore) (*evidence.Reactor, *evidence.Pool, error)

func CreateMempoolAndMempoolReactor

func CreateMempoolAndMempoolReactor(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 tmLog.Logger) *p2p.Switch

func DefaultDBProvider

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

func DoHandshake

func DoHandshake(
	stateStore sm.Store,
	state sm.State,
	blockStore sm.BlockStore,
	genDoc *GenesisDoc,
	eventBus tmTypes.BlockEventPublisher,
	proxyApp proxy.AppConns,
) error

func GetBlockstoreDBs

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

func GetStateDBs

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

func KsyncLogger

func KsyncLogger(moduleName string) zerolog.Logger

func LoadConfig

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

func LogFormatter

func LogFormatter(keyvals ...interface{}) zerolog.Logger

func MakeNodeInfo

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

func TmLogger

func TmLogger() (logger log.Logger)

Types

type Block

type Block = tmTypes.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) Receive

func (bcR *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte)

type Config

type Config = tmCfg.Config

type DBContext

type DBContext struct {
	ID     string
	Config *Config
}

type GenesisDoc

type GenesisDoc = tmTypes.GenesisDoc

type KsyncTmLogger

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

func (KsyncTmLogger) Debug

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

func (KsyncTmLogger) Error

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

func (KsyncTmLogger) Info

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

func (KsyncTmLogger) With

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

type LightBlock

type LightBlock = tmTypes.LightBlock

type Metrics

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 Snapshot

type Snapshot = abciTypes.Snapshot

type TendermintBsyncBundle

type TendermintBsyncBundle = []TendermintBsyncDataItem

type TendermintBsyncDataItem

type TendermintBsyncDataItem struct {
	Key   string `json:"key"`
	Value *Block `json:"value"`
}

type TendermintBundle

type TendermintBundle = []TendermintDataItem

type TendermintDataItem

type TendermintDataItem struct {
	Key   string          `json:"key"`
	Value TendermintValue `json:"value"`
}

type TendermintSsyncBundle

type TendermintSsyncBundle = []TendermintSsyncDataItem

type TendermintSsyncDataItem

type TendermintSsyncDataItem struct {
	Key   string `json:"key"`
	Value struct {
		Snapshot   *abciTypes.Snapshot `json:"snapshot"`
		Block      *Block              `json:"block"`
		SeenCommit *tmTypes.Commit     `json:"seenCommit"`
		State      *tmState.State      `json:"state"`
		ChunkIndex uint32              `json:"chunkIndex"`
		Chunk      []byte              `json:"chunk"`
	} `json:"value"`
}

type TendermintValue

type TendermintValue struct {
	Block struct {
		Block *Block `json:"block"`
	} `json:"block"`
}

type TmEngine

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

func (*TmEngine) ApplyBlock

func (tm *TmEngine) ApplyBlock(runtime string, value []byte) error

func (*TmEngine) ApplyFirstBlockOverP2P

func (tm *TmEngine) ApplyFirstBlockOverP2P(runtime string, value, nextValue []byte) error

func (*TmEngine) ApplySnapshotChunk

func (tm *TmEngine) ApplySnapshotChunk(chunkIndex uint32, value []byte) (string, error)

func (*TmEngine) BootstrapState

func (tm *TmEngine) BootstrapState(value []byte) error

func (*TmEngine) CloseDBs

func (tm *TmEngine) CloseDBs() error

func (*TmEngine) DoHandshake

func (tm *TmEngine) DoHandshake() error

func (*TmEngine) GetAppHeight

func (tm *TmEngine) GetAppHeight() (int64, error)

func (*TmEngine) GetBaseHeight

func (tm *TmEngine) GetBaseHeight() int64

func (*TmEngine) GetBlock

func (tm *TmEngine) GetBlock(height int64) ([]byte, error)

func (*TmEngine) GetChainId

func (tm *TmEngine) GetChainId() (string, error)

func (*TmEngine) GetContinuationHeight

func (tm *TmEngine) GetContinuationHeight() (int64, error)

func (*TmEngine) GetGenesisHeight

func (tm *TmEngine) GetGenesisHeight() (int64, error)

func (*TmEngine) GetGenesisPath

func (tm *TmEngine) GetGenesisPath() string

func (*TmEngine) GetHeight

func (tm *TmEngine) GetHeight() int64

func (*TmEngine) GetHomePath

func (tm *TmEngine) GetHomePath() string

func (*TmEngine) GetMetrics

func (tm *TmEngine) GetMetrics() ([]byte, error)

func (*TmEngine) GetName

func (tm *TmEngine) GetName() string

func (*TmEngine) GetProxyAppAddress

func (tm *TmEngine) GetProxyAppAddress() string

func (*TmEngine) GetSeenCommit

func (tm *TmEngine) GetSeenCommit(height int64) ([]byte, error)

func (*TmEngine) GetSnapshotChunk

func (tm *TmEngine) GetSnapshotChunk(height, format, chunk int64) ([]byte, error)

func (*TmEngine) GetSnapshots

func (tm *TmEngine) GetSnapshots() ([]byte, error)

func (*TmEngine) GetState

func (tm *TmEngine) GetState(height int64) ([]byte, error)

func (*TmEngine) IsSnapshotAvailable

func (tm *TmEngine) IsSnapshotAvailable(height int64) (bool, error)

func (*TmEngine) OfferSnapshot

func (tm *TmEngine) OfferSnapshot(value []byte) (string, uint32, error)

func (*TmEngine) OpenDBs

func (tm *TmEngine) OpenDBs(homePath string) error

func (*TmEngine) PruneBlocks

func (tm *TmEngine) PruneBlocks(toHeight int64) error

func (*TmEngine) ResetAll

func (tm *TmEngine) ResetAll(homePath string, keepAddrBook bool) error

func (*TmEngine) StartProxyApp

func (tm *TmEngine) StartProxyApp() error

func (*TmEngine) StopProxyApp

func (tm *TmEngine) StopProxyApp() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL