Documentation ¶
Overview ¶
Package executor is the executor agent.
Index ¶
- type Backend
- type ChainExecutor
- type Executor
- func (e Executor) BuildTreeFromDB(ctx context.Context, chainID uint32, destination uint32) error
- func (e Executor) Execute(ctx context.Context, message types.Message) (bool, error)
- func (e Executor) Listen(ctx context.Context, chainID uint32) error
- func (e Executor) Start(ctx context.Context) error
- func (e Executor) Stop(chainID uint32)
- func (e Executor) VerifyMessageMerkleProof(message types.Message) (bool, error)
- func (e Executor) VerifyMessageOptimisticPeriod(ctx context.Context, message types.Message) (*uint32, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶ added in v0.0.63
type Backend interface { // HeaderByNumber returns the block header with the given block number. HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) }
Backend is the backend for the executor.
type ChainExecutor ¶ added in v0.0.49
type ChainExecutor struct {
// contains filtered or unexported fields
}
ChainExecutor is a struct that contains the necessary information for each chain level executor.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is the executor agent.
func NewExecutor ¶
func NewExecutor(ctx context.Context, config config.Config, executorDB db.ExecutorDB, scribeClient client.ScribeClient, clients map[uint32]Backend) (*Executor, error)
NewExecutor creates a new executor agent.
func (Executor) BuildTreeFromDB ¶ added in v0.0.49
BuildTreeFromDB builds the merkle tree from the database's messages. This function will reset the current merkle tree and replace it with the one built from the database. This function should also not be called while Start or Listen are running.
func (Executor) Execute ¶ added in v0.0.69
Execute calls execute on `destination.sol` on the destination chain, after verifying the message.
func (Executor) Listen ¶ added in v0.0.45
Listen listens to the log channel and processes the logs. Requires Start to be called first.
func (Executor) VerifyMessageMerkleProof ¶ added in v0.0.69
VerifyMessageMerkleProof verifies a message against the merkle tree at the state of the given nonce.
Directories ¶
Path | Synopsis |
---|---|
Package config defines the config for the Executor.
|
Package config defines the config for the Executor. |
Package db provides a database interface for the executor.
|
Package db provides a database interface for the executor. |
datastore/sql
Package sql provides a datastore implementation for the executor.
|
Package sql provides a datastore implementation for the executor. |
datastore/sql/base
Package base contains the base sql implementation
|
Package base contains the base sql implementation |
datastore/sql/mysql
Package mysql implements the mysql package
|
Package mysql implements the mysql package |
datastore/sql/sqlite
Package sqlite implements the sqlite package
|
Package sqlite implements the sqlite package |
Package types contains the database types for the Executor.
|
Package types contains the database types for the Executor. |