Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support state changes comparison for differential fuzzing #23

Closed
suxnju opened this issue Feb 20, 2024 · 0 comments
Closed

Support state changes comparison for differential fuzzing #23

suxnju opened this issue Feb 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@suxnju
Copy link

suxnju commented Feb 20, 2024

Describe the desired feature

In some scenarios, we want to compare whether the upgraded contract has changed the same states (not limited to return values).

For example, the following code snippet deleted a sentence because of carelessness after upgrading.

uint256 value = balanceOf[msg.sender];
- balanceOf[msg.sender] = 0; // deleted carelessly
(bool success, ) = msg.sender.call{value: value}("");

As far as I know, it is possible to compare whether the state changes are consistent in fuzzing. One feasible idea is to use foundry's startStateDiffRecording and stopAndReturnStateDiff.

However, as I am new to this field, I wonder if there is a simple way to support this based on diffusc.

@suxnju suxnju added the enhancement New feature or request label Feb 20, 2024
@suxnju suxnju closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant