argotorg / argotorg/hevm

`hevm equivalence` does not check log equivalence

Open
#586 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
358
Forks
79
Avg merge
1d 1h
Merged PRs (30d)
6

Description

per title. an example
```
diff --git a/examples/tokens/ERC20.vy b/examples/tokens/ERC20.vy
index 2d70fd670..73065bcb4 100644
--- a/examples/tokens/ERC20.vy
+++ b/examples/tokens/ERC20.vy
@@ -120,7 +120,7 @@ def _burn(_to: address, _value: uint256):
assert _to != empty(address)
self.totalSupply -= _value
self.balanceOf[_to] -= _value
- log IERC20.Transfer(_to, empty(address), _value)
+ log IERC20.Transfer(empty(address), _to, _value)
```
(pulled from https://github.com/vyperlang/vyper/blob/c02d2d8c5ed8c904c31b7f3f937ab01781fc9891/examples/tokens/ERC20.vy)

results in `hevm equivalence` reporting
```
Found 3969 total pairs of endstates
Asking the SMT solver for 1120 pairs
Reuse of previous queries was Useful in 0 cases
No discrepancies found
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported `hevm equivalence` result with the altered `examples/tokens/ERC20.vy` example. Trace how the equivalence command handles execution logs, then add or update coverage so differing `Transfer` logs are reported as a discrepancy; done means the shown example no longer reports no discrepancies.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.