Documentation ¶
Index ¶
- Constants
- func FinalStatePath(dir string, binarySnapshots bool) string
- func FindStartingSnapshot(logger log.Logger, snapDir string, absolutePreState string, traceIndex uint64, ...) (string, error)
- func PreimageDir(dir string) string
- func RunCmd(ctx context.Context, l log.Logger, binary string, args ...string) error
- type CmdExecutor
- type Config
- type Executor
- type KonaExecutor
- type Metricer
- type OpProgramServerExecutor
- type OracleServerExecutor
- type PrestateProvider
- type SnapshotSelect
- type StateConverter
Constants ¶
View Source
const ( SnapsDir = "snapshots" PreimagesDir = "preimages" )
Variables ¶
This section is empty.
Functions ¶
func FinalStatePath ¶ added in v1.9.3
func FindStartingSnapshot ¶
func FindStartingSnapshot(logger log.Logger, snapDir string, absolutePreState string, traceIndex uint64, binarySnapshots bool) (string, error)
FindStartingSnapshot finds the closest snapshot before the specified traceIndex in snapDir. If no suitable snapshot can be found it returns absolutePreState.
func PreimageDir ¶
Types ¶
type CmdExecutor ¶
type Config ¶
type Config struct { // VM Configuration VmType types.TraceType VmBin string // Path to the vm executable to run when generating trace data SnapshotFreq uint // Frequency of snapshots to create when executing (in VM instructions) InfoFreq uint // Frequency of progress log messages (in VM instructions) DebugInfo bool // Whether to record debug info from the execution BinarySnapshots bool // Whether to use binary snapshots instead of JSON // Host Configuration L1 string L1Beacon string L2 string Server string // Path to the executable that provides the pre-image oracle server Network string RollupConfigPath string L2GenesisPath string }
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(logger log.Logger, m Metricer, cfg Config, oracleServer OracleServerExecutor, prestate string, inputs utils.LocalGameInputs) *Executor
func (*Executor) DoGenerateProof ¶
func (e *Executor) DoGenerateProof(ctx context.Context, dir string, begin uint64, end uint64, extraVmArgs ...string) error
DoGenerateProof executes vm from the specified starting trace index until the end trace index. The proof is stored at the specified directory.
type KonaExecutor ¶ added in v1.9.3
type KonaExecutor struct {
// contains filtered or unexported fields
}
func NewKonaExecutor ¶ added in v1.9.3
func NewKonaExecutor() *KonaExecutor
func NewNativeKonaExecutor ¶ added in v1.9.3
func NewNativeKonaExecutor(clientBinPath string) *KonaExecutor
func (*KonaExecutor) OracleCommand ¶ added in v1.9.3
func (s *KonaExecutor) OracleCommand(cfg Config, dataDir string, inputs utils.LocalGameInputs) ([]string, error)
type OpProgramServerExecutor ¶ added in v1.9.1
type OpProgramServerExecutor struct {
// contains filtered or unexported fields
}
func NewOpProgramServerExecutor ¶ added in v1.9.1
func NewOpProgramServerExecutor(logger log.Logger) *OpProgramServerExecutor
func (*OpProgramServerExecutor) OracleCommand ¶ added in v1.9.1
func (s *OpProgramServerExecutor) OracleCommand(cfg Config, dataDir string, inputs utils.LocalGameInputs) ([]string, error)
type OracleServerExecutor ¶ added in v1.9.0
type PrestateProvider ¶ added in v1.9.3
type PrestateProvider struct {
// contains filtered or unexported fields
}
func NewPrestateProvider ¶ added in v1.9.3
func NewPrestateProvider(prestate string, converter StateConverter) *PrestateProvider
func (*PrestateProvider) AbsolutePreStateCommitment ¶ added in v1.9.3
func (*PrestateProvider) PrestatePath ¶ added in v1.9.3
func (p *PrestateProvider) PrestatePath() string
type SnapshotSelect ¶
type StateConverter ¶ added in v1.9.3
type StateConverter interface { // ConvertStateToProof reads the state snapshot at the specified path and converts it to ProofData. // Returns the proof data, the VM step the state is from and whether or not the VM had exited. ConvertStateToProof(ctx context.Context, statePath string) (*utils.ProofData, uint64, bool, error) }
Click to show internal directories.
Click to hide internal directories.