Commit Graph
480 Commits
Author SHA1 Message Date
GiokaMarkella 28a1abf89a Yul AST output on the CLI and in Standard JSON 2023-05-26 12:35:31 +02:00
Kamil Śliwak a11b1c83f0 Disallow using both --optimize-yul and --no-optimize-yul at the same time 2023-05-24 15:54:40 +02:00
Kamil Śliwak b24e4fcbfa Command-line tests for --optimize-yul and --no-optimize-yul used together 2023-05-24 15:53:29 +02:00
Alexander Arlt c5673278a7 Remove EWASM backend. 2023-05-11 10:56:55 -05:00
Alexander Arlt 4837d42361 Add experimental support to import AST via Standard JSON. 2023-05-09 14:07:38 -05:00
Daniel KirchnerandRodrigo Q. Saramago 44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00
chriseth 1e63615206 Export all events.
Update tests.

Additional tests

Revert changes to the Natspec
2023-05-03 14:08:27 -03:00
Martin Blicha 12bca24774 [SMTChecker] Use path condition when creating CHC targets
Without path condition, verification targets created inside ternary
operator ignore the condition of the operator inside the branches.
This led to false positives.

Further updates:

- Function calls should consider the conditions under which they are
called, otherwise the analysis may report false positives.
The fix proposed here is to add the current path condition to the edge
that propagates error from a function call.

- Increment error index after function call

This is necessary for the analysis of the ternary operator to work
correctly. No information should leak from a function call inside a
ternary operator in the first branch to the second branch, including
whether or not an error would have occured in the first branch.

However, for the execution that continues after the function call,
we still need to ensure that under the current path condition
the error has not occurred in that function call.

It would be better to isolate the analysis of the branches to separate
clauses, but I do not see an easy way for that now. In this way, even
though the function call in first branch is included in the clause of
the second branch, no information leaks.

- Additonal test for ternary operator

This tests the behaviour of SMTChecker on ternary operator with function
calls inside both branches. Specifically, it tests that SMTChecker
successfully detects a violation of a verification target in the second
branch when the same target is present also in the first branch, but
there it cannot be triggered because of the operator's condition.
2023-04-21 18:56:34 +02:00
Leo Alt 6c58f31b4a add cli tests 2023-03-15 17:52:58 +01:00
Leo Alt 21c0f78650 Report safe properties in BMC and CHC 2023-03-09 14:59:32 +01:00
Leo Alt 8d91ccf028 [SMTChecker] Add a new trusted mode which assumes that code that is
available at compile time is trusted.
2023-02-06 17:02:33 +01:00
feba4de509 Add paris constraints to SMTChecker
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
Co-authored-by: Leo <leo@ethereum.org>
2023-01-31 11:03:04 +01:00
ef6ff2f055 Adds support for the EVM version "Paris".
Deprecates `block.difficulty` and disallow `difficulty()` in inline assembly for EVM versions >= paris.
The change is due to the renaming introduced by EIP-4399 (see: https://eips.ethereum.org/EIPS/eip-4399).
Introduces `block.prevrandao` in Solidity and `prevrandao()` in inline assembly for EVM versions >= paris.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: matheusaaguiar <95899911+matheusaaguiar@users.noreply.github.com>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-01-23 18:50:36 +00:00
andy53 3bc535e1a1 Report when no contracts to compile
updates
2022-12-19 13:47:03 +01:00
Leo Alt c3a7adad27 update cli tests 2022-11-24 13:08:06 +01:00
Leo Alt 24df40de9a Allow running Eldarica from the command line 2022-11-22 21:16:45 +01:00
George Plotnikov 6374b4fe23 regenerating tests expectation 2022-10-26 15:13:47 +05:00
Kamil Śliwak ed3d3959aa Rename command line tests for the --no-cbor-metadata/appendCBOR option 2022-10-19 21:28:45 +02:00
hrkrshnn 6854e2b5d6 fix: bytecodeHash cannot be set to non-none for appendCBOR=false
Testing: see `test/cmdlineTests/metadata_append_standard_json_error`

Closes: https://github.com/ethereum/solidity/issues/13628
2022-10-13 02:07:20 +02:00
hrkrshnn d32661c0af Added tests for --no-append-metadata
- Command line tests
- Documented the standard json
- Changelog
- A Change in SolidityExecutionFramework to prevent flaky gas tests
- A boost test for --no-append-metadata
- Removed an outdated comment
2022-09-26 20:40:34 +02:00
Miles Liu dad1a56321 Pretty print expected json output of command line tests 2022-09-22 18:49:55 +08:00
nishant-sachdeva eafd7218b7 refactored struct message to use std::variant for _typeOrSeverity 2022-09-20 19:20:43 +05:30
nishant-sachdeva c8011d8719 Cleaning up helpers around errors 2022-09-19 10:51:14 +05:30
Nikola Matic e37dc8e975 Address review comments 2022-09-13 17:23:31 +02:00
Nikola Matic 314a1cc92f Command line tests and minor touch ups 2022-09-12 11:13:49 +02:00
Nikola Matic ddf0d784ac Changelog and docs 2022-09-12 11:13:47 +02:00
Nikola Matic f6f0d6a360 Make hardcoded parts of the optimizer sequence configurable 2022-09-12 10:57:36 +02:00
Daniel Kirchner a9c21863d4 Update tests. 2022-08-15 16:24:10 +02:00
MarenzandKamil Śliwak 22c7cd22b9 Fix wrong cleanup when copying from calldata to memory
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2022-08-08 13:07:16 +02:00
Matheus Aguiar 4fd5c11af7 Checks for overflow/underflow after add/sub operations. 2022-06-23 14:41:12 -03:00
chriseth 77038aa40e Update test expectations. 2022-05-23 13:37:50 +02:00
Leo Alt cbaba6f913 update tests 2022-05-11 20:02:31 +02:00
Leo Alt cba3d18f66 adjust for osx nondeterminism 2022-05-04 19:04:54 +02:00
Leo Alt 4fd7de36f1 update smt tests z3 4.8.16 2022-05-03 14:23:27 +02:00
Alexey Shekhirin cb24e5d545 fix(parser): error for unexpected token 2022-04-29 16:13:04 +04:00
Aisultan Kali 96376264e8 Set handlers use unified jsonPrint with prettifier if needed 2022-04-04 20:17:11 +02:00
Alexander Arlt 1a0988e503 libevmasm: refactor asm-json export & add support for source list. 2022-03-23 15:58:07 -05:00
Daniel Kirchner 4b9c01752d Test updates. 2022-03-16 15:34:38 +01:00
Daniel Kirchner 5cd98006d4 Fill in junk in stack layouts on terminating control flow paths. 2022-03-15 18:36:55 +01:00
Daniel Kirchner 0172f61340 No longer mark Yul as experimental. 2022-03-14 14:48:01 +01:00
Daniel Kirchner e58c0b561d Mark viaIR code generation as non-experimental. 2022-03-14 14:48:00 +01:00
chriseth 4f02be110c Unused store eliminator. 2022-03-10 18:25:28 +01:00
chriseth b3fe042884 Optimize eq iszero jumpi to xor jumpi and remove double jump. 2022-03-10 14:41:41 +01:00
Daniel Kirchner 0a9d752b8b Add test case and adjust tests. 2022-03-09 17:53:28 +01:00
Daniel Kirchner ce0a3e93f2 Store whether an evmasm Assembly is creation code. 2022-03-09 17:42:29 +01:00
chriseth 4f19d68ee9 Merge pull request #12620 from ethereum/assemblyAnnotation
Memory-safety annotation for inline assembly.
2022-03-07 12:48:41 +01:00
nishant-sachdeva beabc51c20 returnSize assigned according to truth value of returnInfo.dynamicReturnSize 2022-03-03 18:55:10 +05:30
Daniel Kirchner 6b6e163be5 Tests. 2022-03-02 16:42:28 +01:00
chriseth e9592c3f8e Update tests. 2022-02-21 14:32:52 +01:00
Marenz 46075d04d9 Include used events in `--hashes` output 2022-02-09 13:50:42 +01:00