Documentation ¶
Index ¶
- Variables
- type BlockExecutor
- func (e *BlockExecutor) ApplyBlock(ctx context.Context, state types.State, block *types.Block) (types.State, *tmstate.ABCIResponses, error)
- func (e *BlockExecutor) Commit(ctx context.Context, state types.State, block *types.Block, ...) ([]byte, uint64, error)
- func (e *BlockExecutor) CreateBlock(height uint64, lastCommit *types.Commit, lastHeaderHash types.Hash, ...) *types.Block
- func (e *BlockExecutor) InitChain(genesis *tmtypes.GenesisDoc) (*abci.ResponseInitChain, error)
- func (e *BlockExecutor) SetFraudProofService(fraudProofServ *fraudserv.ProofService)
- func (e *BlockExecutor) VerifyFraudProof(fraudProof *abci.FraudProof, expectedValidAppHash []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAddingValidatorToBased = errors.New("cannot add validators to empty validator set")
View Source
var ErrEmptyValSetGenerated = errors.New("applying the validator changes would result in empty set")
View Source
var ErrFraudProofGenerated = errors.New("failed to ApplyBlock: halting node due to fraud")
Functions ¶
This section is empty.
Types ¶
type BlockExecutor ¶
type BlockExecutor struct { FraudService *fraudserv.ProofService // contains filtered or unexported fields }
BlockExecutor creates and applies blocks and maintains state.
func NewBlockExecutor ¶
func NewBlockExecutor(proposerAddress []byte, namespaceID cnc.Namespace, chainID string, mempool mempool.Mempool, proxyApp proxy.AppConnConsensus, fraudProofsEnabled bool, eventBus *tmtypes.EventBus, logger log.Logger) *BlockExecutor
NewBlockExecutor creates new instance of BlockExecutor. Proposer address and namespace ID will be used in all newly created blocks.
func (*BlockExecutor) ApplyBlock ¶
func (e *BlockExecutor) ApplyBlock(ctx context.Context, state types.State, block *types.Block) (types.State, *tmstate.ABCIResponses, error)
ApplyBlock validates and executes the block.
func (*BlockExecutor) Commit ¶
func (e *BlockExecutor) Commit(ctx context.Context, state types.State, block *types.Block, resp *tmstate.ABCIResponses) ([]byte, uint64, error)
Commit commits the block
func (*BlockExecutor) CreateBlock ¶
func (e *BlockExecutor) CreateBlock(height uint64, lastCommit *types.Commit, lastHeaderHash types.Hash, state types.State) *types.Block
CreateBlock reaps transactions from mempool and builds a block.
func (*BlockExecutor) InitChain ¶
func (e *BlockExecutor) InitChain(genesis *tmtypes.GenesisDoc) (*abci.ResponseInitChain, error)
InitChain calls InitChainSync using consensus connection to app.
func (*BlockExecutor) SetFraudProofService ¶ added in v0.8.0
func (e *BlockExecutor) SetFraudProofService(fraudProofServ *fraudserv.ProofService)
func (*BlockExecutor) VerifyFraudProof ¶
func (e *BlockExecutor) VerifyFraudProof(fraudProof *abci.FraudProof, expectedValidAppHash []byte) (bool, error)
Click to show internal directories.
Click to hide internal directories.