cannon

package
v0.0.0-...-011bec4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CannonMetricer

type CannonMetricer interface {
	RecordCannonExecutionTime(t float64)
}

type CannonPrestateProvider

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

func NewPrestateProvider

func NewPrestateProvider(prestate string) *CannonPrestateProvider

func (*CannonPrestateProvider) AbsolutePreStateCommitment

func (p *CannonPrestateProvider) AbsolutePreStateCommitment(_ context.Context) (common.Hash, error)

type CannonTraceProvider

type CannonTraceProvider struct {
	types.PrestateProvider
	// contains filtered or unexported fields
}

func NewTraceProvider

func NewTraceProvider(logger log.Logger, m CannonMetricer, cfg *config.Config, prestateProvider types.PrestateProvider, prestate string, localInputs utils.LocalGameInputs, dir string, gameDepth types.Depth) *CannonTraceProvider

func (*CannonTraceProvider) Get

func (*CannonTraceProvider) GetL2BlockNumberChallenge

func (p *CannonTraceProvider) GetL2BlockNumberChallenge(_ context.Context) (*types.InvalidL2BlockNumberChallenge, error)

func (*CannonTraceProvider) GetStepData

type CannonTraceProviderForTest

type CannonTraceProviderForTest struct {
	*CannonTraceProvider
}

CannonTraceProviderForTest is a CannonTraceProvider that can find the step referencing the preimage read Only to be used for testing

func NewTraceProviderForTest

func NewTraceProviderForTest(logger log.Logger, m CannonMetricer, cfg *config.Config, localInputs utils.LocalGameInputs, dir string, gameDepth types.Depth) *CannonTraceProviderForTest

func (*CannonTraceProviderForTest) FindStep

func (p *CannonTraceProviderForTest) FindStep(ctx context.Context, start uint64, preimage utils.PreimageOpt) (uint64, error)

type Executor

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

func NewExecutor

func NewExecutor(logger log.Logger, m CannonMetricer, cfg *config.Config, prestate string, inputs utils.LocalGameInputs) *Executor

func (*Executor) GenerateProof

func (e *Executor) GenerateProof(ctx context.Context, dir string, i uint64) error

GenerateProof executes cannon to generate a proof at the specified trace index. The proof is stored at the specified directory.

Jump to

Keyboard shortcuts

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