crytic / medusa

Parallelized, coverage-guided, mutational Solidity smart contract fuzzing, powered by go-ethereum
https://secure-contracts.com/program-analysis/medusa/docs/src/
GNU Affero General Public License v3.0
303 stars 40 forks source link

Print out events emitted in assertion failure callstack #330

Closed 0xicingdeath closed 3 months ago

0xicingdeath commented 8 months ago

Once a contract emits an event, in many cases it will emit intermediate values / adjusted values, etc – and it would be really handy to be able to see this output from the fuzzer for the entire call of sequences (and not just the last one that resulted in the failure).

We've seen quite a few issues historically that have resulted in 5-6 sequences (or more, up to 90 and change 😛), where the bug wasn't in the function that was being called in the last assertion, but was actually introduced in say, transaction 3 or 4, and required us to dig into the system to understand what its impact was on other invariants. Having the event traces and visibility into the arguments for those events would be useful to help make debugging a little easier.

anishnaik commented 3 months ago

I believe this can be achieved through the use of traceAll. Closing.