prover

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 24 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) (err error)

InitFromConfig initializes the prover instance based on the given configurations.

Types

type Config

type Config struct {
	L1WsEndpoint                    string
	L1HttpEndpoint                  string
	L2WsEndpoint                    string
	L2HttpEndpoint                  string
	MxcL1Address                    common.Address
	MxcL2Address                    common.Address
	L1ProverPrivKey                 *ecdsa.PrivateKey
	ZKEvmRpcdEndpoint               string
	ZkEvmRpcdParamsPath             string
	StartingBlockID                 *big.Int
	MaxConcurrentProvingJobs        uint
	Dummy                           bool
	OracleProver                    bool
	SystemProver                    bool
	OracleProverPrivateKey          *ecdsa.PrivateKey
	SystemProverPrivateKey          *ecdsa.PrivateKey
	Graffiti                        string
	RandomDummyProofDelayLowerBound *time.Duration
	RandomDummyProofDelayUpperBound *time.Duration
	ExpectedReward                  uint64
}

Config contains the configurations to initialize a Mxc 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) 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