Versions in this module Expand all Collapse all v0 v0.38.78 Jul 18, 2023 v0.38.77 Jul 18, 2023 Changes in this version + const MetricsSubsystem + var ErrFinalizeBlockResponsesNotPersisted = errors.New("node is not persisting finalize block responses") + var InitStateVersion = cmtstate.Version + func ExecCommitBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block, logger log.Logger, ...) ([]byte, error) + func MakeGenesisDocFromFile(genDocFile string) (*types.GenesisDoc, error) + func MedianTime(commit *types.Commit, validators *types.ValidatorSet) time.Time + func Rollback(bs BlockStore, ss Store, removeBlock bool) (int64, []byte, error) + func TxPostCheck(state State) mempl.PostCheckFunc + func TxPreCheck(state State) mempl.PreCheckFunc + func TxResultsHash(txResults []*abci.ExecTxResult) []byte + type BlockExecutor struct + func NewBlockExecutor(stateStore Store, logger log.Logger, proxyApp proxy.AppConnConsensus, ...) *BlockExecutor + func NewBlockExecutorWithEthClient(stateStore Store, logger log.Logger, proxyApp proxy.AppConnConsensus, ...) *BlockExecutor + func (blockExec *BlockExecutor) ApplyBlock(state State, blockID types.BlockID, block *types.Block) (State, error) + func (blockExec *BlockExecutor) Commit(state State, block *types.Block, abciResponse *abci.ResponseFinalizeBlock) (int64, error) + func (blockExec *BlockExecutor) CreateProposalBlock(ctx context.Context, height int64, state State, ...) (*types.Block, error) + func (blockExec *BlockExecutor) ExtendVote(ctx context.Context, vote *types.Vote) ([]byte, error) + func (blockExec *BlockExecutor) ProcessProposal(block *types.Block, state State) (bool, error) + func (blockExec *BlockExecutor) SetEventBus(eventBus types.BlockEventPublisher) + func (blockExec *BlockExecutor) Store() Store + func (blockExec *BlockExecutor) ValidateBlock(state State, block *types.Block) error + func (blockExec *BlockExecutor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) error + type BlockExecutorOption func(executor *BlockExecutor) + func BlockExecutorWithMetrics(metrics *Metrics) BlockExecutorOption + type BlockStore interface + Base func() int64 + Close func() error + DeleteLatestBlock func() error + Height func() int64 + LoadBaseMeta func() *types.BlockMeta + LoadBlock func(height int64) *types.Block + LoadBlockByHash func(hash []byte) *types.Block + LoadBlockCommit func(height int64) *types.Commit + LoadBlockExtendedCommit func(height int64) *types.ExtendedCommit + LoadBlockMeta func(height int64) *types.BlockMeta + LoadBlockMetaByHash func(hash []byte) *types.BlockMeta + LoadBlockPart func(height int64, index int) *types.Part + LoadSeenCommit func(height int64) *types.Commit + PruneBlocks func(height int64, state State) (uint64, int64, error) + SaveBlock func(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) + SaveBlockWithExtendedCommit func(block *types.Block, blockParts *types.PartSet, ...) + Size func() int64 + type EmptyEvidencePool struct + func (EmptyEvidencePool) AddEvidence(types.Evidence) error + func (EmptyEvidencePool) CheckEvidence(types.EvidenceList) error + func (EmptyEvidencePool) PendingEvidence(int64) (ev []types.Evidence, size int64) + func (EmptyEvidencePool) ReportConflictingVotes(*types.Vote, *types.Vote) + func (EmptyEvidencePool) Update(State, types.EvidenceList) + 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 + CheckEvidence func(types.EvidenceList) error + PendingEvidence func(maxBytes int64) (ev []types.Evidence, size int64) + Update func(State, types.EvidenceList) + type Metrics struct + BlockProcessingTime metrics.Histogram + ConsensusParamUpdates metrics.Counter + ValidatorSetUpdates metrics.Counter + func NopMetrics() *Metrics + func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics + type State struct + AppHash []byte + ChainID string + ConsensusParams types.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 cmtstate.Version + func FromProto(pb *cmtstate.State) (*State, error) + func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) + func MakeGenesisStateFromFile(genDocFile string) (State, error) + func (state *State) ToProto() (*cmtstate.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, lastCommit *types.Commit, ...) *types.Block + func (state State) MakeNewBlock(height int64, txs []types.Tx, lastCommit *types.Commit, ...) *types.Block + type Store interface + Bootstrap func(State) error + Close func() error + Load func() (State, error) + LoadConsensusParams func(int64) (types.ConsensusParams, error) + LoadFinalizeBlockResponse func(int64) (*abci.ResponseFinalizeBlock, error) + LoadFromDBOrGenesisDoc func(*types.GenesisDoc) (State, error) + LoadFromDBOrGenesisFile func(string) (State, error) + LoadLastFinalizeBlockResponse func(int64) (*abci.ResponseFinalizeBlock, error) + LoadValidators func(int64) (*types.ValidatorSet, error) + PruneStates func(int64, int64, int64) error + Save func(State) error + SaveFinalizeBlockResponse func(int64, *abci.ResponseFinalizeBlock) error + func NewStore(db dbm.DB, options StoreOptions) Store + type StoreOptions struct + DiscardABCIResponses bool