feat: add eip8037 fuzzing scenarios - #235
Conversation
|
Oh you found my |
| BailFlag = &cli.BoolFlag{ | ||
| Name: "bail", | ||
| Value: false, | ||
| Usage: "If true, exit the process immediately after the first consensus flaw " + |
There was a problem hiding this comment.
Why did you feel the need for this? IMO the drain-period is usually pretty fast, unless one of the clients hang. But if they do, I don't think this will help.
Or is it because you don't want a second bug to obscure the first one?
| // Beneficiary is varied across four scenarios that interact with the | ||
| // SELFDESTRUCT state-gas table: | ||
| // - ZERO address | ||
| // - factory (self) |
There was a problem hiding this comment.
The initcode executes in a new address, doesn't it ? SO the self is something else?
| var beneficiary common.Address | ||
| switch rand.Intn(4) { | ||
| case 0: | ||
| beneficiary = common.Address{} | ||
| case 1: | ||
| beneficiary = factory | ||
| case 2: | ||
| beneficiary = common.HexToAddress("0xBE") | ||
| default: | ||
| beneficiary = common.HexToAddress("0xDEAD") | ||
| } |
There was a problem hiding this comment.
IMO maybe let's add a bit more options here. One should be ADDRESS, SELFDESTRUCT (true SD-to-self). And the various addresses of things that exist, and does not exist, and precompiles, and zero, and magic system addresses...
| // depths well beyond what RandCall2200's compile-time-recursion cap of | ||
| // 10 reaches. See test_state_gas_call.py::test_nested_calls_*. | ||
| func fillDeepCalls(gst *GstMaker, fork string) { | ||
| depth := 5 + rand.Intn(46) // 5..50 |
There was a problem hiding this comment.
Is depth the only random thing here? Because if so, feels like this random-test-generator is exhausted after 50 or so runs...?
But maybe I'm missing something
Description
Adds some EIP-8037 fuzzing scenarios. Note this is a draft PR and not in a mergeable state.
Adding for visability just now for others who want to fuzz EIP-8037. Command to run: