echidna icon indicating copy to clipboard operation
echidna copied to clipboard

[Bug-Candidate]: Unwanted text printed to stdout when using JSON output driver

Open webthethird opened this issue 2 years ago • 2 comments

Describe the issue:

When using the JSON output driver, I noticed that echidna still prints the "Fetching Solidity source for contract..." text after printing the dictionary, without a new line. Since it doesn't print anything else like "Saving corpus...", I'm guessing it shouldn't print the "Fetching" lines either.

Code example to reproduce the issue:

Using --format json with on-chain fuzzing using any contract that stores other contract addresses should work. Just need to make it print Fetching Solidity source for contract at address 0x...

Version:

Echidna 2.1.1 Slither 0.9.3

Relevant log output:

{"coverage":{...},},"error":null,"gas_info":[],"seed":4641032117818476327,"success":true,"tests":[...,{"contract":"","error":null,"name":"name","status":"fuzzing","transactions":null,"type":"property"},{"contract":"","error":null,"name":"name","status":"fuzzing","transactions":null,"type":"property"},{"contract":"","error":null,"name":"name","status":"fuzzing","transactions":null,"type":"property"}]}Fetching Solidity source for contract at address 0xc00e94Cb662C3520282E6f5717214004A7f26888... Success!
Fetching Solidity source map for contract at address 0xc00e94Cb662C3520282E6f5717214004A7f26888... Error!

webthethird avatar Jun 07 '23 14:06 webthethird

This should be fixed here https://github.com/crytic/echidna/blob/b43ecf7fcd79e44c719385d2f75e46908fd0a43b/src/Main.hs#L187-L193

arcz avatar Jun 07 '23 15:06 arcz

@arcz Can I work on this issue?

AnmolSirola avatar Jun 20 '23 05:06 AnmolSirola