Commit Graph

7234 Commits

Author SHA1 Message Date
Kamil Śliwak
25be38905f YulStack: When Yul optimization is not requested, run Yul optimizer with a minimal sequence instead of disabling it 2023-06-07 12:13:38 +02:00
Kamil Śliwak
8e35e8dd8e Command-line tests checking behavior of msize without optimizer 2023-06-07 12:12:00 +02:00
Kamil Śliwak
7ab730d410 Update tests that would become ineffective with minimal optimizations applied 2023-06-07 12:12:00 +02:00
Kamil Śliwak
64ef9d581b Command-line test for equivalence of optimizer options on the CLI and in Standard JSON 2023-06-07 10:29:45 +02:00
Kamil Śliwak
e6716e3208 Helpers for removing decorations form solc output 2023-06-07 10:29:45 +02:00
Kamil Śliwak
c7372f3f22
Merge pull request #14268 from ethereum/resurrect-yul-optimizer-cli-options
Resurrect Yul optimizer CLI options
2023-06-07 10:28:16 +02:00
Nikola Matic
47969adf91 Experimental standard library
Change import syntax and cover with tests
2023-06-06 17:16:23 +02:00
Kamil Śliwak
2769bb52f6 Make --optimize-yul work again 2023-06-06 09:54:07 +02:00
Kamil Śliwak
42a068b449 CommandLineParser: Store the state of EVM assembly and Yul optimizer explicitly
- Does not change the meaning of CLI options, just the way we map them to internal variables.
2023-06-06 09:54:07 +02:00
Pawel Gebal
f15b826431 Add optional bounds to unroll loops in BMC model checker 2023-06-02 18:32:38 +02:00
Kamil Śliwak
f397b9a083 cmdlineTests: Add prefixes for temporary files/dirs 2023-06-02 16:10:40 +02:00
Kamil Śliwak
5c5f8e8dad cmdlineTests: Remove superfluous set and temporary dirs 2023-06-02 16:10:40 +02:00
Kamil Śliwak
00c2f511d3 cmdlineTests: Remove superfluous output from script-based tests and adjust the rest 2023-06-02 16:10:40 +02:00
Kamil Śliwak
c1df8ed563 cmdlineTests: Remove unnecessary subshells
- Whitespace-only change, separated out to make it easy to diff.
2023-06-02 16:10:40 +02:00
Kamil Śliwak
6b061ba696 cmdlineTests: Extract script-based test out of cmdlineTests.sh
- Just extraction, with as few changes to the code as possible.
2023-06-02 16:10:40 +02:00
Kamil Śliwak
dd10334754 cmdlineTests: Support tests that contain a script to run as an alternative to input.* files 2023-06-02 16:09:11 +02:00
Kamil Śliwak
72a384f4fe cmdlineTests: Ensure that leading symbols in names affect the sort order 2023-06-02 16:09:11 +02:00
r0qs
824e59dec2
Remove unnecessary line from OZ external test script 2023-06-02 12:09:53 +02:00
Matheus Aguiar
d657e77f1e Remove problematic sed commands in openzeppelin external test 2023-05-31 02:11:33 -03:00
Leo
a0933fa80a
Merge pull request #14276 from ethereum/smtchecker-fix-ice
SMTChecker: External function call with struct member is not getter
2023-05-30 13:46:35 +02:00
Leo
ceab4dfee5
Merge pull request #14269 from blishko/smtchecker-fix-analysis-external-calls
[SMTChecker] Remember verification targets from trusted external calls
2023-05-30 13:45:37 +02:00
Martin Blicha
8ca453f82e SMTChecker: External function call with struct member is not getter
if a struct has a member that is a function pointer with `external`
attribute, and such a member is called, it is currently incorrectly
treated as a public getter in SMTEncoder.

The proposed fix is to make SMTEncoder::publicGetter more strict in
deciding whether an expression is a public getter.
The added condition, that the access happens on a state variable, is
exactly what is checked later with an assertion that is currently
failing.
2023-05-26 14:23:45 +02:00
Nikola Matić
477b621f2e
Merge pull request #14274 from ethereum/enable-access-to-foreign-events 2023-05-26 13:49:13 +02:00
Martin Blicha
b0419da654 [SMTChecker] Remember verification targets from trusted external calls
Previously, we did not remember trusted external calls for later phase
when we compute possible verification targets for each function.
This led to false negative in cases where verification target can be
violated, but not by calling a public function directly, but only when
it is called as an external function from other function.

The added test cases witnesses this behaviour. The underflow in
`dec` cannot happen in any other way except what the `dec` is called
from `f`.

The same problem did not occur when the functions are called internally,
because for such cases, we have already been remembering these calls in
the callgraph in the CHC engine.
2023-05-26 13:03:44 +02:00
Nikola Matic
5893e099fe Allow qualified access to events from other contracts 2023-05-26 12:52:52 +02:00
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
Kamil Śliwak
8c5304368d test_via_ir_equivalence(): Simplify by merging the asm loops
- And fix indentation
2023-05-23 15:30:07 +02:00
Kamil Śliwak
bcdb41f743 test_via_ir_equivalence(): Remove unnecessary filter for asm_output_two_stage
- This bit will never actually appear in the output file.
2023-05-23 15:28:18 +02:00
Kamil Śliwak
17aacfdb6a test_via_ir_equivalence(): Fix quoting and locals 2023-05-23 15:25:48 +02:00
Kamil Śliwak
0ce5e4c94d test_via_ir_equivalence(): Use assertions for precondition checks 2023-05-23 15:23:44 +02:00
Nikola Matic
e7f5303a39 Make ASTJSONTest an EVMVersionRestrictedTestCase 2023-05-17 18:10:16 +02:00
Nikola Matic
7a34d34045 Restrict experimental solidity to constantinople and above 2023-05-17 17:03:43 +02:00
r0qs
af74ab69c9
Workaround gp2 and prb-math external tests 2023-05-16 16:13:51 +02:00
Nikola Matic
8a41f4ac7e Introduce solidity-next pragma
Exclude pragma experimental error from ANTLR tests

Test for first pragma after non-pragma declaration

Resolve import pragmas

Change pragma name from next to solidity

Add Changelog entries

Address review comments
2023-05-15 19:25:13 +02:00
Daniel
9804085934
Merge pull request #14216 from ethereum/fix_bmc_side_effects_in_statement
Fix encoding of side-effects inside if and ternary in BMC
2023-05-15 13:34:22 +02:00
Alexander Arlt
c5673278a7 Remove EWASM backend. 2023-05-11 10:56:55 -05:00
Leo Alt
678461e828 Fix encoding of side-effects inside if and conditional statements in the BMC engine 2023-05-11 16:44:09 +02:00
Alexander Arlt
4837d42361 Add experimental support to import AST via Standard JSON. 2023-05-09 14:07:38 -05:00
Daniel Kirchner
75a0c486a8 Adjust gas expectations due to new creation costs. 2023-05-09 18:22:44 +02:00
Daniel Kirchner
53626fc092 Bump docker images and evmone version. 2023-05-09 17:59:00 +02:00
Nikola Matic
9a87b587d5 Disallow immutable initialization in try catch statements
Trigger github
2023-05-09 14:48:14 +02:00
Daniel Kirchner
44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00
Rodrigo Q. Saramago
a29f77369a
Move AST annotation of internal function dispatch IDs to ContractDefinition
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-05-06 20:31:27 +02:00
Nikola Matić
41742c5410
Merge pull request #14188 from ethereum/fuzz-ir-pipeline
Make use of IR codegen pipeline and selectively report stack too deep…
2023-05-06 13:04:13 +02:00
Rodrigo Q. Saramago
766db7daa4
Update gp2 external test script 2023-05-05 17:09:58 +02:00
Bhargava Shastry
889f0721a2 Make use of IR codegen pipeline and selectively report stack too deep errors for the new pipeline. 2023-05-05 11:39:56 +02:00
chriseth
1e63615206 Export all events.
Update tests.

Additional tests

Revert changes to the Natspec
2023-05-03 14:08:27 -03:00
Rodrigo Q. Saramago
75960e6db8
Fix throw of ExternalTestNotFound in external_tests.py 2023-04-28 18:28:07 +02:00