Documentation ¶
Overview ¶
Package executor is the executor agent responsible for proving and executing cross-chain messages.
Index ¶
- func NewTreeFromDB(ctx context.Context, chainID uint32, executorDB db.ExecutorDB) (*merkle.HistoricalTree, error)
- type Backend
- type Executor
- func (e Executor) CheckIfExecuted(ctx context.Context, message types.Message) (bool, error)
- func (e Executor) Execute(parentCtx context.Context, message types.Message) (_ bool, err error)
- func (e Executor) ExecuteExecutable(ctx context.Context) error
- func (e Executor) GetLogChan(chainID uint32) chan *ethTypes.Log
- func (e Executor) GetMerkleTree(chainID uint32) *merkle.HistoricalTree
- func (e Executor) OverrideMerkleTree(chainID uint32, tree *merkle.HistoricalTree)
- func (e Executor) Run(parentCtx context.Context) error
- func (e Executor) SetMinimumTime(ctx context.Context) error
- func (e Executor) StartAndListenOrigin(ctx context.Context, chainID uint32, address string) 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)
- func (e Executor) VerifyStateMerkleProof(ctx context.Context, state types.State) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTreeFromDB ¶ added in v0.0.81
func NewTreeFromDB(ctx context.Context, chainID uint32, executorDB db.ExecutorDB) (*merkle.HistoricalTree, error)
NewTreeFromDB builds a merkle tree from the db.
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 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, handler metrics.Handler) (*Executor, error)
NewExecutor creates a new executor agent.
func NewExecutorInjectedBackend ¶ added in v0.0.81
func NewExecutorInjectedBackend(ctx context.Context, config config.Config, executorDB db.ExecutorDB, scribeClient client.ScribeClient, clients map[uint32]Backend, urls map[uint32]string, handler metrics.Handler) (*Executor, error)
NewExecutorInjectedBackend creates a new Executor suitable for testing since it does not need a valid omnirpcURL.
func (Executor) CheckIfExecuted ¶ added in v0.0.184
CheckIfExecuted checks if a message has been executed.
func (Executor) Execute ¶ added in v0.0.69
Execute calls execute on `Destination.sol` on the destination chain, after verifying the message. TODO: Use multi-call to batch execute.
func (Executor) ExecuteExecutable ¶ added in v0.0.86
ExecuteExecutable executes executable messages in the database.
func (Executor) GetLogChan ¶ added in v0.0.81
GetLogChan gets a log channel.
func (Executor) GetMerkleTree ¶ added in v0.0.81
func (e Executor) GetMerkleTree(chainID uint32) *merkle.HistoricalTree
GetMerkleTree gets a merkle tree.
func (Executor) OverrideMerkleTree ¶ added in v0.0.81
func (e Executor) OverrideMerkleTree(chainID uint32, tree *merkle.HistoricalTree)
OverrideMerkleTree overrides the merkle tree for the chainID and domain.
func (Executor) Run ¶ added in v0.0.78
Run starts the executor agent. It calls `Start` and `Listen`.
func (Executor) SetMinimumTime ¶ added in v0.0.86
SetMinimumTime sets the minimum times.
func (Executor) StartAndListenOrigin ¶ added in v0.0.130
StartAndListenOrigin starts and listens to a chain.
func (Executor) VerifyMessageMerkleProof ¶ added in v0.0.69
VerifyMessageMerkleProof verifies message merkle proof.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package api contains the API for the executor.
|
Package api contains the API for the executor. |
Package cmd provides the command line interface for the executor.
|
Package cmd provides the command line interface for the executor. |
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 main provides the main entry point for the executor.
|
Package main provides the main entry point for the executor. |
Package metadata provides metadata for Executor.
|
Package metadata provides metadata for Executor. |
Package types contains the database types for the Executor.
|
Package types contains the database types for the Executor. |