prover

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

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

InitFromConfig initializes the prover instance based on the given configurations.

Types

type Config

type Config struct {
	L1Endpoint                      string
	L2Endpoint                      string
	TaikoL1Address                  common.Address
	TaikoL2Address                  common.Address
	L1ProverPrivKey                 *ecdsa.PrivateKey
	ZKEvmRpcdEndpoint               string
	ZkEvmRpcdParamsPath             string
	StartingBlockID                 *big.Int
	MaxConcurrentProvingJobs        uint
	Dummy                           bool
	RandomDummyProofDelayLowerBound *time.Duration
	RandomDummyProofDelayUpperBound *time.Duration
	Idx                             uint
	Total                           uint
}

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 keep trying to prove new proposed blocks valid/invalid.

func (*Prover) Close

func (p *Prover) Close()

Close closes the prover instance.

func (*Prover) InitFromCli

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

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

func (*Prover) Name

func (p *Prover) Name() string

Name returns the application name.

func (*Prover) NeedNewProof added in v0.3.0

func (p *Prover) NeedNewProof(id *big.Int) (bool, error)

NeedNewProof checks whether the L2 block still needs a new proof.

func (*Prover) Start

func (p *Prover) Start() error

Start starts the main loop of the L2 block prover.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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