Documentation ¶
Index ¶
- Variables
- func ConvertToStateTest(name, fork string, alloc core.GenesisAlloc, gasLimit uint64, ...) error
- func Copy(src, dst string) error
- func ExecuteFuzzer(c *cli.Context, allClients bool, providerFn TestProviderFn, cleanupFiles bool) error
- func GenerateAndExecute(c *cli.Context, generatorFn GeneratorFn, name string) error
- func RootsEqual(path string, c *cli.Context) (bool, error)
- func RunSingleTest(path string, c *cli.Context) (bool, error)
- func TestSpeed(dir string, c *cli.Context) error
- type BasicTracer
- func (n *BasicTracer) CaptureEnd([]byte, uint64, error)
- func (n *BasicTracer) CaptureEnter(vm.OpCode, common.Address, common.Address, []byte, uint64, *big.Int)
- func (n *BasicTracer) CaptureExit([]byte, uint64, error)
- func (n *BasicTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, ...)
- func (n *BasicTracer) CaptureStart(*vm.EVM, common.Address, common.Address, bool, []byte, uint64, *big.Int)
- func (n *BasicTracer) CaptureState(uint64, vm.OpCode, uint64, uint64, *vm.ScopeContext, []byte, int, error)
- func (n *BasicTracer) CaptureTxEnd(uint64)
- func (n *BasicTracer) CaptureTxStart(uint64)
- func (n *BasicTracer) GetResult() (json.RawMessage, error)
- func (n *BasicTracer) Stop(err error)
- type GeneratorFn
- type PrintingTracer
- type TestProviderFn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GethFlag = &cli.StringSliceFlag{ Name: "geth", Usage: "Location of go-ethereum 'evm' binary", } GethBatchFlag = &cli.StringSliceFlag{ Name: "gethbatch", Usage: "Location of go-ethereum 'evm' binary", } NethermindFlag = &cli.StringSliceFlag{ Name: "nethermind", Usage: "Location of nethermind 'nethtest' binary", } NethBatchFlag = &cli.StringSliceFlag{ Name: "nethbatch", Usage: "Location of nethermind 'nethtest' binary", } BesuFlag = &cli.StringSliceFlag{ Name: "besu", Usage: "Location of besu vm binary", } BesuBatchFlag = &cli.StringSliceFlag{ Name: "besubatch", Usage: "Location of besu vm binary", } ErigonFlag = &cli.StringSliceFlag{ Name: "erigon", Usage: "Location of erigon 'evm' binary", } ErigonBatchFlag = &cli.StringSliceFlag{ Name: "erigonbatch", Usage: "Location of erigon 'evm' binary", } NimbusFlag = &cli.StringSliceFlag{ Name: "nimbus", Usage: "Location of nimbus 'evmstate' binary", } EvmoneFlag = &cli.StringSliceFlag{ Name: "evmone", Usage: "Location of evmone 'evmone' binary", } RethFlag = &cli.StringSliceFlag{ Name: "revme", Usage: "Location of reth 'revme' binary", } ThreadFlag = &cli.IntFlag{ Name: "parallel", Usage: "Number of parallel executions to use.", Value: runtime.NumCPU(), } LocationFlag = &cli.StringFlag{ Name: "outdir", Usage: "Location to place artefacts", Value: "/tmp", } PrefixFlag = &cli.StringFlag{ Name: "prefix", Usage: "prefix of output files", } CountFlag = &cli.IntFlag{ Name: "count", Usage: "number of tests to generate", Value: 100, } TraceFlag = &cli.BoolFlag{ Name: "trace", Usage: "if true, a trace will be generated along with the tests. \n" + "This is useful for debugging the usefulness of the tests", } SkipTraceFlag = &cli.BoolFlag{ Name: "skiptrace", Usage: "If 'skiptrace' is set to true, then the evms will execute _without_ tracing, and only the final stateroot will be compared after execution.\n" + "This mode is faster, and can be used even if the clients-under-test has known errors in the trace-output, \n" + "but has a very high chance of missing cases which could be exploitable.", } VmFlags = []cli.Flag{ GethFlag, GethBatchFlag, NethermindFlag, NethBatchFlag, BesuFlag, BesuBatchFlag, ErigonFlag, ErigonBatchFlag, NimbusFlag, EvmoneFlag, RethFlag, } )
Functions ¶
func ConvertToStateTest ¶
func ConvertToStateTest(name, fork string, alloc core.GenesisAlloc, gasLimit uint64, target common.Address) error
ConvertToStateTest is a utility to turn stuff into sharable state tests.
func Copy ¶
Copy the src file to dst. Any existing file will be overwritten and will not copy file attributes.
func ExecuteFuzzer ¶
func ExecuteFuzzer(c *cli.Context, allClients bool, providerFn TestProviderFn, cleanupFiles bool) error
func GenerateAndExecute ¶
func GenerateAndExecute(c *cli.Context, generatorFn GeneratorFn, name string) error
func RootsEqual ¶
RootsEqual executes the test on the given path on all vms, and returns true if they all report the same post stateroot.
func RunSingleTest ¶
RunTests runs a test on all clients. Return values are : - true, nil: no consensus issue - true, err: test execution failed - false, err: a consensus issue found - false, nil: a consensus issue found
Types ¶
type BasicTracer ¶
type BasicTracer struct{}
func (*BasicTracer) CaptureEnd ¶
func (n *BasicTracer) CaptureEnd([]byte, uint64, error)
func (*BasicTracer) CaptureEnter ¶
func (*BasicTracer) CaptureExit ¶
func (n *BasicTracer) CaptureExit([]byte, uint64, error)
func (*BasicTracer) CaptureFault ¶
func (n *BasicTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error)
func (*BasicTracer) CaptureStart ¶
func (*BasicTracer) CaptureState ¶
func (*BasicTracer) CaptureTxEnd ¶
func (n *BasicTracer) CaptureTxEnd(uint64)
func (*BasicTracer) CaptureTxStart ¶
func (n *BasicTracer) CaptureTxStart(uint64)
func (*BasicTracer) GetResult ¶
func (n *BasicTracer) GetResult() (json.RawMessage, error)
func (*BasicTracer) Stop ¶
func (n *BasicTracer) Stop(err error)
type GeneratorFn ¶
type PrintingTracer ¶
type PrintingTracer struct {
BasicTracer
}
func (*PrintingTracer) CaptureStart ¶
func (*PrintingTracer) CaptureState ¶
type TestProviderFn ¶
Click to show internal directories.
Click to hide internal directories.