From 800e551946017738cb6ce12a12ec8c890841295b Mon Sep 17 00:00:00 2001 From: Anish Naik Date: Tue, 14 Jan 2025 15:24:18 -0500 Subject: [PATCH] fix execution tracing during contract deployments --- fuzzing/fuzzer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzzing/fuzzer.go b/fuzzing/fuzzer.go index 9e95fca1..279a7db9 100644 --- a/fuzzing/fuzzer.go +++ b/fuzzing/fuzzer.go @@ -533,9 +533,9 @@ func chainSetupFromCompilations(fuzzer *Fuzzer, testChain *chain.TestChain) (*ex Block: block, TransactionIndex: len(block.Messages) - 1, } - // Revert to genesis and re-run the failed contract deployment tx. + // Revert to one block before and re-run the failed contract deployment tx. // We should be able to attach an execution trace; however, if it fails, we provide the ExecutionResult at a minimum. - err = testChain.RevertToBlockNumber(0) + err = testChain.RevertToBlockNumber(block.Header.Number.Uint64() - 1) if err != nil { return nil, fmt.Errorf("failed to reset to genesis block: %v", err) } else {