Versions in this module Expand all Collapse all v0 v0.0.1 Jun 7, 2021 Changes in this version + const MetricsSubsystem + var InitStateVersion = tmstate.Version + func ABCIResponsesResultsHash(ar *tmstate.ABCIResponses) []byte + func BootstrapState(db dbm.DB, state State) error + func ExecCommitBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block, logger log.Logger, ...) ([]byte, error) + func LoadABCIResponses(db dbm.DB, height int64) (*tmstate.ABCIResponses, error) + func LoadConsensusParams(db dbm.DB, height int64) (tmproto.ConsensusParams, error) + func LoadValidators(db dbm.DB, height int64) (*types.ValidatorSet, error) + func MakeGenesisDocFromFile(genDocFile string) (*types.GenesisDoc, error) + func MedianTime(commit *types.Commit, validators *types.ValidatorSet) time.Time + func PruneStates(db dbm.DB, from int64, to int64) error + func SaveABCIResponses(db dbm.DB, height int64, abciResponses *tmstate.ABCIResponses) + func SaveState(db dbm.DB, state State) + func TxPostCheck(state State) mempl.PostCheckFunc + func TxPreCheck(state State) mempl.PreCheckFunc + func VerifyEvidence(stateDB dbm.DB, state State, evidence types.Evidence, ...) error + type BlockExecutor struct + func NewBlockExecutor(db dbm.DB, logger log.Logger, proxyApp proxy.AppConnConsensus, ...) *BlockExecutor + func (blockExec *BlockExecutor) ApplyBlock(state State, blockID types.BlockID, block *types.Block) (State, int64, error) + func (blockExec *BlockExecutor) Commit(state State, block *types.Block, deliverTxResponses []*abci.ResponseDeliverTx) ([]byte, int64, error) + func (blockExec *BlockExecutor) CreateProposalBlock(height int64, state State, commit *types.Commit, proposerAddr []byte) (*types.Block, *types.PartSet) + func (blockExec *BlockExecutor) DB() dbm.DB + func (blockExec *BlockExecutor) SetEventBus(eventBus types.BlockEventPublisher) + func (blockExec *BlockExecutor) ValidateBlock(state State, block *types.Block) error + type BlockExecutorOption func(executor *BlockExecutor) + func BlockExecutorWithMetrics(metrics *Metrics) BlockExecutorOption + type BlockStore interface + Base func() int64 + Height func() int64 + LoadBlock func(height int64) *types.Block + LoadBlockByHash func(hash []byte) *types.Block + LoadBlockCommit func(height int64) *types.Commit + LoadBlockMeta func(height int64) *types.BlockMeta + LoadBlockPart func(height int64, index int) *types.Part + LoadSeenCommit func(height int64) *types.Commit + PruneBlocks func(height int64) (uint64, error) + SaveBlock func(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) + Size func() int64 + type ErrAppBlockHeightTooHigh struct + AppHeight int64 + CoreHeight int64 + func (e ErrAppBlockHeightTooHigh) Error() string + type ErrAppBlockHeightTooLow struct + AppHeight int64 + StoreBase int64 + func (e ErrAppBlockHeightTooLow) Error() string + type ErrBlockHashMismatch struct + AppHash []byte + CoreHash []byte + Height int64 + func (e ErrBlockHashMismatch) Error() string + type ErrInvalidBlock error + type ErrLastStateMismatch struct + App []byte + Core []byte + Height int64 + func (e ErrLastStateMismatch) Error() string + type ErrNoABCIResponsesForHeight struct + Height int64 + func (e ErrNoABCIResponsesForHeight) Error() string + type ErrNoConsensusParamsForHeight struct + Height int64 + func (e ErrNoConsensusParamsForHeight) Error() string + type ErrNoValSetForHeight struct + Height int64 + func (e ErrNoValSetForHeight) Error() string + type ErrProxyAppConn error + type ErrStateMismatch struct + Expected *State + Got *State + func (e ErrStateMismatch) Error() string + type ErrUnknownBlock struct + Height int64 + func (e ErrUnknownBlock) Error() string + type EvidencePool interface + AddEvidence func(types.Evidence) error + Header func(int64) *types.Header + IsCommitted func(types.Evidence) bool + IsPending func(types.Evidence) bool + PendingEvidence func(uint32) []types.Evidence + Update func(*types.Block, State) + type Metrics struct + BlockProcessingTime metrics.Histogram + func NopMetrics() *Metrics + func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics + type MockEvidencePool struct + func (me MockEvidencePool) AddEvidence(types.Evidence) error + func (me MockEvidencePool) Header(int64) *types.Header + func (me MockEvidencePool) IsCommitted(types.Evidence) bool + func (me MockEvidencePool) IsPending(types.Evidence) bool + func (me MockEvidencePool) PendingEvidence(uint32) []types.Evidence + func (me MockEvidencePool) Update(*types.Block, State) + type State struct + AppHash []byte + ChainID string + ConsensusParams tmproto.ConsensusParams + InitialHeight int64 + LastBlockHeight int64 + LastBlockID types.BlockID + LastBlockTime time.Time + LastHeightConsensusParamsChanged int64 + LastHeightValidatorsChanged int64 + LastResultsHash []byte + LastValidators *types.ValidatorSet + NextValidators *types.ValidatorSet + Validators *types.ValidatorSet + Version tmstate.Version + func LoadState(db dbm.DB) State + func LoadStateFromDBOrGenesisDoc(stateDB dbm.DB, genesisDoc *types.GenesisDoc) (State, error) + func LoadStateFromDBOrGenesisFile(stateDB dbm.DB, genesisFilePath string) (State, error) + func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) + func MakeGenesisStateFromFile(genDocFile string) (State, error) + func StateFromProto(pb *tmstate.State) (*State, error) + func (state *State) ToProto() (*tmstate.State, error) + func (state State) Bytes() []byte + func (state State) Copy() State + func (state State) Equals(state2 State) bool + func (state State) IsEmpty() bool + func (state State) MakeBlock(height int64, txs []types.Tx, commit *types.Commit, evidence []types.Evidence, ...) (*types.Block, *types.PartSet)