Skip to content

Commit

Permalink
generator: fuzzer: fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Dec 8, 2023
1 parent f3ed9ef commit 8f72356
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fuzzer/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/eth/tracers/logger"
"github.com/ethereum/go-ethereum/tests"
Expand Down Expand Up @@ -128,10 +129,9 @@ func minimizeProgram(test *fuzzing.GstMaker, name string) (*fuzzing.GstMaker, er
}
newOutput := new(bytes.Buffer)
cfg := vm.Config{}
cfg.Debug = true
cfg.Tracer = logger.NewJSONLogger(&logger.Config{}, newOutput)
subtest := gethStateTest.Subtests()[0]
gethStateTest.RunNoVerify(subtest, cfg, false)
gethStateTest.RunNoVerify(subtest, cfg, false, rawdb.HashScheme)
newB := newOutput.Bytes()
newIdx := strings.LastIndex(string(newB), "{")
if newIdx <= 0 {
Expand Down
3 changes: 2 additions & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

var (
fork = "Shanghai"
fork = "Cancun"
sender = common.HexToAddress("a94f5374fce5edbc8e2a8697c15331677e6ebf0b")
sk = hexutil.MustDecode("0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8")
recursionLevel = 0
Expand Down Expand Up @@ -89,6 +89,7 @@ func createGstMaker(fill *filler.Filler, code []byte) *fuzzing.GstMaker {
GasPrice: big.NewInt(0x80),
To: dest.Hex(),
PrivateKey: sk,
Sender: sender,
}
gst.SetTx(tx)
return gst
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20231207170144-dbeb05897e38 // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZe
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA=
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA=
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A=
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo=
github.com/cockroachdb/pebble v0.0.0-20231207170144-dbeb05897e38 h1:ZUJe0p0apcsT718rqGiSYoChlXJPbQQnFQPWc/M0IZ8=
github.com/cockroachdb/pebble v0.0.0-20231207170144-dbeb05897e38/go.mod h1:BHuaMa/lK7fUe75BlsteiiTu8ptIG+qSAuDtGMArP18=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
Expand Down

0 comments on commit 8f72356

Please sign in to comment.