prover

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT, MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(
	ctx context.Context,
	p *Prover, cfg *Config,
	txMgr *txmgr.SimpleTxManager,
	privateTxMgr *txmgr.SimpleTxManager,
) (err error)

InitFromConfig initializes the prover instance based on the given configurations.

Types

type Config

type Config struct {
	L1WsEndpoint                            string
	L2WsEndpoint                            string
	L2HttpEndpoint                          string
	TaikoL1Address                          common.Address
	TaikoL2Address                          common.Address
	TaikoTokenAddress                       common.Address
	ProverSetAddress                        common.Address
	L1ProverPrivKey                         *ecdsa.PrivateKey
	StartingBlockID                         *big.Int
	Dummy                                   bool
	GuardianProverMinorityAddress           common.Address
	GuardianProverMajorityAddress           common.Address
	GuardianProofSubmissionDelay            time.Duration
	Graffiti                                string
	BackOffMaxRetries                       uint64
	BackOffRetryInterval                    time.Duration
	ProveUnassignedBlocks                   bool
	ContesterMode                           bool
	EnableLivenessBondProof                 bool
	RPCTimeout                              time.Duration
	ProveBlockGasLimit                      uint64
	HTTPServerPort                          uint64
	Capacity                                uint64
	MinEthBalance                           *big.Int
	MinTaikoTokenBalance                    *big.Int
	MaxExpiry                               time.Duration
	MaxProposedIn                           uint64
	MaxBlockSlippage                        uint64
	Allowance                               *big.Int
	GuardianProverHealthCheckServerEndpoint *url.URL
	RaikoHostEndpoint                       string
	RaikoZKVMHostEndpoint                   string
	RaikoJWT                                string
	RaikoRequestTimeout                     time.Duration
	L1NodeVersion                           string
	L2NodeVersion                           string
	BlockConfirmations                      uint64
	TxmgrConfigs                            *txmgr.CLIConfig
	PrivateTxmgrConfigs                     *txmgr.CLIConfig
}

Config contains the configurations to initialize a Taiko prover.

func NewConfigFromCliContext

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

NewConfigFromCliContext creates a new config instance from command line flags.

type Prover

type Prover struct {
	// contains filtered or unexported fields
}

Prover keeps trying to prove newly proposed blocks.

func (*Prover) Close

func (p *Prover) Close(_ context.Context)

Close closes the prover instance.

func (*Prover) InitFromCli

func (p *Prover) InitFromCli(ctx context.Context, c *cli.Context) error

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

func (*Prover) IsGuardianProver

func (p *Prover) IsGuardianProver() bool

IsGuardianProver returns true if the current prover is a guardian prover.

func (*Prover) Name

func (p *Prover) Name() string

Name returns the application name.

func (*Prover) ProverAddress

func (p *Prover) ProverAddress() common.Address

ProverAddress returns the current prover account address.

func (*Prover) Start

func (p *Prover) Start() error

Start starts the main loop of the L2 block prover.

Jump to

Keyboard shortcuts

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