Comments (6)
The behaviour I expect is that the config leads, meaning sequences in the corpus which are illegal according to the current config should be skipped.
I'm not a fan of rewriting the corpus, this seems error prone and could lead to unpredictable/unwanted behaviour.
My reasoning behind this:
- The config describes how the fuzzer works and which actions are allowed
- The corpus is a repository of interesting sequences to help the fuzzer discover new coverage in its current run
from echidna.
This is expected, the echidna configuration will not enforce anything in the corpus. I think the same will happen with the max ether sent. Perhaps this can be a feature of fuzz-utils, where a certain corpus is "modified" to do X instead of Y. @rappie Can you please start a discussion there for this feature?
from echidna.
Personally I would expect the config settings to be overruling everything, so I would consider this a bug or at least unexpected behaviour. I've had similar issues in the past where i had to discard my corpus because I needed to blacklist certain functions (that were still in the corpus).
Is there no possibility check sequences from the corpus against the allowed settings before they are executed?
from echidna.
@rappie What is your expected behavior here? My intuition is to agree with @ggrieco-tob that the corpus should still run with its original config.
Are you suggesting to modify the corpus based on the new config, or to skip sequences that don't have compatible configs? Modifying the corpus seems like it may cause sequences to unexpectedly pass only due to the config change, but skipping non-applicable ones seems ok. Based on crytic/fuzz-utils#51 I think you are suggesting modification? Interested in better understanding your use case
from echidna.
I'm still not sure about this. Let's suppose you do a campaign using sender: [A, B]
. Later you decide to change using sender: [C, D]
. Are you suggesting echidna should reinterpret the corpus using the new parameters? I think it is better to say the user: the following config options are going to invalidate the current corpus. We can even warn the user if changed some parameter that affects the current corpus.
It seems that if you really want to preserve the corpus, changing some parameters, rewriting it (if possible), is the best option.
from echidna.
Let's suppose you do a campaign using sender: [A, B]. Later you decide to change using sender: [C, D]. Are you suggesting echidna should reinterpret the corpus using the new parameters?
I'm not suggesting Echidna should ever reinterpret the corpus. In this case it would look at the transactions and consider them all invalid, skipping them all and you're basically starting with a new corpus.
This is an extreme example though, and in this case it would indeed make sense to just discard the corpus.
The scenario I'm thinking about with filtering senders is if you are using a closed system of actors (lets say actor A,B,C) and you want to debug an issue by reducing the amount of actors and removing actor C. In this case you don't want the corpus to include any transactions by actor C because it will mess up the closed system. You don't want to discard the corpus either because you are just temporary debugging, plus it might contain interesting transactions/values.
from echidna.
Related Issues (20)
- Feature Request: Support for logging in view functions like Foundry's `console2` HOT 1
- [Bug-Candidate]: HOT 5
- [Bug-Candidate]: Coverage report doesn't display fuzzing contract in html unless an assertion fails HOT 1
- [Bug-Candidate]: no fore color support for terminal xterm-256color HOT 4
- [Bug-Candidate]: `Cannot decode byte '\xe4': Data.Text.Encoding: Invalid UTF-8 stream` HOT 9
- Improve error message on MaxInitCodeSizeExceeded issue HOT 3
- Improve error message if the function hashmap is not detected HOT 3
- [Bug-Candidate]: Internal Error: TODO: implement copySlice with a symbolically sized region HOT 4
- Feature Request: Add setting to consider reverted tests as failed in assertion mode HOT 1
- Shrinking multicore HOT 4
- update number of workers to a decent default HOT 1
- warn when seqLen > 1 and there haven't been any SLOAD/SSTORE in target HOT 1
- Allow Configurable Verbosity HOT 1
- [Bug-Candidate]: Contract is "unknown contract" but should be able to be identified HOT 2
- Have multiple workers to speed up fetching slots HOT 3
- [Bug-Candidate]: A simple contract took onchain fuzzer extremely long time to run due to zero calls per second HOT 2
- add call sequence mutation that removes all reverting txs in the sequences HOT 1
- [Bug-Candidate]: echidna: thread blocked indefinitely in an MVar operation HOT 2
- Log shrinking status when running in detached mode
- Fine-tune shrinking behavior HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echidna.