Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockState ¶
type BlockState struct { types.StateDB // todo change to types.ReadOnlyView // contains filtered or unexported fields }
func NewBlockState ¶
func NewBlockState( block *models.Block, registers atree.Ledger, chainID flowGo.ChainID, blocks storage.BlockIndexer, receipts storage.ReceiptIndexer, logger zerolog.Logger, ) (*BlockState, error)
func (*BlockState) Execute ¶
func (s *BlockState) Execute(tx models.Transaction) (*gethTypes.Receipt, error)
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewStateEngine ¶
func NewStateEngine( config *config.Config, execution executiondata.ExecutionDataAPIClient, blockPublisher *models.Publisher, store *pebble.Storage, blocks storage.BlockIndexer, transactions storage.TransactionIndexer, receipts storage.ReceiptIndexer, logger zerolog.Logger, ) *Engine
type RegisterValidator ¶
RegisterValidator keeps track of all set register during execution and is checked once the block is executed.
func NewRegisterValidator ¶
func NewRegisterValidator( register atree.Ledger, execution executiondata.ExecutionDataAPIClient, ) *RegisterValidator
NewRegisterValidator will create a new register validator. The register validator should only be used once for atree.Ledger it wraps for a specific block height. After we must call ValidateBlock only once.
func (*RegisterValidator) SetValue ¶
func (r *RegisterValidator) SetValue(owner, key, value []byte) (err error)
func (*RegisterValidator) ValidateBlock ¶
func (r *RegisterValidator) ValidateBlock(cadenceHeight uint64) error
ValidateBlock will go over all registers that were set during block execution and compare them against the registers stored on-chain using an execution data client for the provided Cadence height. Expected errors: - ErrStateMismatch error if there is a mismatch in any of the register values Any other error is an issue with client request or response.