You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Echidna still cannot find the correct magic value. We can verify where it gets stuck reviewing the `corpus-magic/covered.*.txt` file:
67
67
68
68
```
69
-
r |contract C {
70
-
bool value_found = false;
71
-
r | function magic(uint256 magic_1, uint256 magic_2, uint256 magic_3, uint256 magic_4) public {
72
-
r | require(magic_1 == 42);
73
-
r | require(magic_2 == 129);
74
-
r | require(magic_3 == magic_4+333);
75
-
value_found = true;
76
-
return;
77
-
}
78
-
79
-
function echidna_magic_values() public returns (bool) {
80
-
return !value_found;
81
-
}
82
-
83
-
}
69
+
1 | * | contract C {
70
+
2 | | bool value_found = false;
71
+
3 | |
72
+
4 | *| function magic(uint256 magic_1, uint256 magic_2, uint256 magic_3, uint256 magic_4) public {
73
+
5 | *r | require(magic_1 == 42);
74
+
6 | *r | require(magic_2 == 129);
75
+
7 | *r | require(magic_3 == magic_4 + 333);
76
+
8 | | value_found = true;
77
+
9 | | return;
78
+
10 | | }
79
+
11 | |
80
+
12 | | function echidna_magic_values() public returns (bool) {
81
+
13 | | return !value_found;
82
+
14 | | }
83
+
15 | | }
84
84
```
85
85
86
86
The label `r` on the left of each line shows that Echidna is able to reach these lines but it ends in a revert.
@@ -161,19 +161,19 @@ Seed: -7293830866560616537
161
161
This time, the property is violated immediately. We can verify that another `covered.*.txt` file is created showing another trace (labeled with `*`) that Echidna executed which finished with a return at the end of the `magic` function.
162
162
163
163
```
164
-
*r |contract C {
165
-
bool value_found = false;
166
-
*r | function magic(uint256 magic_1, uint256 magic_2, uint256 magic_3, uint256 magic_4) public {
167
-
*r | require(magic_1 == 42);
168
-
*r | require(magic_2 == 129);
169
-
*r | require(magic_3 == magic_4+333);
170
-
* | value_found = true;
171
-
return;
172
-
}
173
-
174
-
function echidna_magic_values() public returns (bool) {
175
-
return !value_found;
176
-
}
177
-
178
-
}
164
+
1 | * | contract C {
165
+
2 | | bool value_found = false;
166
+
3 | |
167
+
4 | * | function magic(uint256 magic_1, uint256 magic_2, uint256 magic_3, uint256 magic_4) public {
168
+
5 | *r | require(magic_1 == 42);
169
+
6 | *r | require(magic_2 == 129);
170
+
7 | *r | require(magic_3 == magic_4 + 333);
171
+
8 | * | value_found = true;
172
+
9 | | return;
173
+
10 | | }
174
+
11 | |
175
+
12 | | function echidna_magic_values() public returns (bool) {
0 commit comments