driver

package
v0.0.0-...-db25876 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2025 License: MIT, MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*rpc.ClientConfig
	P2PSync                       bool
	P2PSyncTimeout                time.Duration
	RetryInterval                 time.Duration
	MaxExponent                   uint64
	BlobServerEndpoint            *url.URL
	SocialScanEndpoint            *url.URL
	PreconfBlockServerPort        uint64
	PreconfBlockServerJWTSecret   []byte
	PreconfBlockServerCORSOrigins string
	PreconfBlockServerCheckSig    bool
	P2PConfigs                    *p2p.Config
	P2PSignerConfigs              p2p.SignerSetup
}

Config contains the configurations to initialize a Taiko driver.

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from the command line inputs.

type Driver

type Driver struct {
	*Config
	// contains filtered or unexported fields
}

Driver keeps the L2 execution engine's local block chain in sync with the TaikoL1 contract.

func (*Driver) ChainSyncer

func (d *Driver) ChainSyncer() *chainSyncer.L2ChainSyncer

ChainSyncer returns the driver's chain syncer, this method should only be used for testing.

func (*Driver) Close

func (d *Driver) Close(_ context.Context)

Close closes the driver instance.

func (*Driver) InitFromCli

func (d *Driver) InitFromCli(ctx context.Context, c *cli.Context) error

InitFromCli initializes the given driver instance based on the command line flags.

func (*Driver) InitFromConfig

func (d *Driver) InitFromConfig(ctx context.Context, cfg *Config) (err error)

InitFromConfig initializes the driver instance based on the given configurations.

func (*Driver) Name

func (d *Driver) Name() string

Name returns the application name.

func (*Driver) Start

func (d *Driver) Start() error

Start starts the driver instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL