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
Rodrigo Q. Saramago
28a959295b
Move common.sh from test/externalTests to scripts/externalTests
2023-04-28 16:32:01 +02:00
Rodrigo Q. Saramago
778d6f4b26
Migrate externalTests.sh to python
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2023-04-28 16:31:49 +02:00
Rodrigo Q. Saramago
28c7fdae09
Migrate yulStackShuffling tests to isoltest
2023-04-25 15:53:01 +02:00
Leo
4a8d6618f5
Merge pull request #13974 from blishko/chc-path-condition
...
[SMTChecker] Use path condition in CHC engine
2023-04-24 16:24:53 +02:00
Daniel
cd5ae26e34
Merge pull request #14143 from ethereum/remove-type-categoryname
...
Remove the inaccurate `Type::categoryName()`
2023-04-23 22:05:35 +02:00
Alex Beregszaszi
ee92491aae
Upgrade to evmc 10.1.0
2023-04-23 15:51:06 +02: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
Kamil Śliwak
34da6c8811
Remove the inaccurate Type::categoryName() and change the error message for invalid calls to one independent of the category
2023-04-20 13:50:22 +02:00
Rodrigo Q. Saramago
524db30f12
Update ubuntu ossfuzz references
2023-04-19 00:18:11 +02:00
Daniel
a77d4e281f
Merge pull request #14139 from ethereum/make-plus-binary-only
...
Make plus binary only (second attempt)
2023-04-18 21:20:31 +02:00
Matheus Aguiar
64f57ac3c7
Fix null dereference in using for directive when operator name is empty
2023-04-18 14:23:58 -03:00
Kamil Śliwak
8a14680851
Disallow unary plus at the parsing stage
2023-04-18 16:47:00 +02:00
Nikola Matić
8194acb3b7
Merge pull request #14119 from veniger/natspec-struct
...
Adds NatSpec to AST for struct definitions.
2023-04-18 16:05:20 +02:00
Marko Veniger
07def48f45
Adds NatSpec to AST for struct definitions.
2023-04-18 13:10:21 +02:00
Daniel Kirchner
421738b50d
Fix calldata handling during creation in EVMHost.
2023-04-18 12:53:50 +02:00
Daniel
c6aab84a0c
Merge pull request #14127 from ethereum/eip-3860
...
Add warning for EIP-3860 enforced initcode limits
2023-04-17 17:42:55 +02:00
Daniel
6d847e4e57
Merge pull request #14126 from ethereum/warm-coinbase
...
EVMHost: Support warm coinbase
2023-04-17 14:55:59 +02:00
Alex Beregszaszi
71bea997aa
Add and update tests
2023-04-15 13:47:11 +02:00
Alex Beregszaszi
4264b5ae07
EVMHost: Support warm coinbase
2023-04-15 13:19:08 +02:00
Alex Beregszaszi
d478c7d81a
EVMHost: Add "support" for Blake2f
2023-04-15 13:17:02 +02:00
Kamil Śliwak
593e207094
Merge pull request #14104 from ethereum/extract-parse-literal
...
Refactor literal parsing before adding suffixes
2023-04-12 14:52:04 +02:00
Daniel
6bc6ae94a6
Merge pull request #14050 from ethereum/contract-ast-internal-function-ids
...
Annotate internal function IDs
2023-04-12 14:11:39 +02:00
Kamil Śliwak
c1fffa892d
Parser: Extract literal parsing into a separate function
2023-04-12 12:30:05 +02:00
Kamil Śliwak
46457cfc25
Merge pull request #14103 from ethereum/extra-tests
...
A few extra tests for operators, denominations and virtual functions
2023-04-12 11:32:26 +02:00
hrkrshnn
41ce3feb0a
test: some tests for push0
...
1. `push0_disallowed.yul`: checks if `push0()` is a valid builtin in strict Yul
2. `push0_disallowed.sol`: checks if `push0()` is a valid builtin in inline assembly
3. `push0.sol`: simple semantic test that returns 0
4. `evmone_support.sol`: tests if push0 works properly in evmone
5. Updated some bytecode too large tests to use `shanghai` as version
6. Updated various tests where `push1 0` was hardcoded in different forms / expectations on bytecode
size (`Assembler.cpp`, `GasCosts.cpp`, `SolidityCompiler.cpp`, `SolidityExpressionCompiler.cpp`)
2023-04-12 00:10:24 +02:00
Kamil Śliwak
66fcd542bc
Tests for denominations in array sizes
2023-04-07 14:54:09 +02:00
Kamil Śliwak
fc7cd54849
Tests for changing virtual function mutability when overriding
2023-04-07 14:49:55 +02:00
Kamil Śliwak
5687f6e934
Tests for literal denominations with non-integer literals
2023-04-07 14:48:13 +02:00
Kamil Śliwak
8dd6f77692
Extra test for operator cleanup
2023-04-07 14:47:34 +02:00
Kamil Śliwak
e29a68d374
Merge pull request #14098 from ethereum/workaround-oz-ext-test-2
...
Skip `TransparentUpgradeableProxy` openzeppelin external tests due to partial viaIR support in Hardhat
2023-04-06 15:53:33 +02:00
Kamil Śliwak
a902c09cb7
Merge pull request #14086 from ethereum/gnosis-ext-workaround
...
Skip via-ir with yul optimizer for Gnosis external tests
2023-04-06 15:52:15 +02:00
Rodrigo Q. Saramago
f404eb0349
More openzeppelin workarounds
2023-04-06 13:23:36 +02:00
Rodrigo Q. Saramago
33b07c5dc6
Skip via-ir with yul optimizer for Gnosis external tests
2023-04-05 21:27:31 +02:00
Kamil Śliwak
9020efec58
Merge pull request #14087 from ethereum/better-error-for-invalid-call
...
Better error message when trying to call things that are not functions
2023-04-05 17:38:10 +02:00
Christian Parpart
be8752b5d3
Adds natspec to AST for enum definition.
2023-04-05 14:58:32 +02:00
Kamil Śliwak
a019f400d0
Better error message when trying to call things that are not functions
2023-04-04 17:30:37 +02:00
Kamil Śliwak
79d975a77d
Merge pull request #14078 from ethereum/fix_missing_keyword_unicode
...
Fix missing keyword `unicode` in grammar
2023-04-03 12:53:20 +02:00
Matheus Aguiar
4aa310034c
Added missing keyword unicode to Lexer
2023-03-28 13:51:43 -03:00
Leo Alt
ce9a7ee954
update smtchecker tests
2023-03-28 18:23:54 +02:00
Matheus Aguiar
0158de60be
Refactored NumberUnit and FunctionDefinition. Added OctalNumber. Fixed number followed by identifier with no whitespace.
2023-03-24 16:19:33 -03:00
Rodrigo Q. Saramago
a0e62bbd3d
Annotate function ID of functions that may be called via the internal dispatch.
...
Co-authored-by: Daniel <daniel@ekpyron.org>
2023-03-20 20:14:41 +01:00
chriseth
fac5666dc9
Re-implement unused assign / unused store eliminator.
2023-03-20 13:49:37 +01:00
Francois-Rene Rideau
acaa019785
Keep test/lsp.py working when not on a tty
2023-03-19 16:09:42 -04:00
Leo Alt
6c58f31b4a
add cli tests
2023-03-15 17:52:58 +01:00
Leo Alt
aacbe72079
group unsupported warnings
2023-03-15 17:06:06 +01:00
Leo Alt
21c0f78650
Report safe properties in BMC and CHC
2023-03-09 14:59:32 +01:00
Rodrigo Q. Saramago
f974dbc205
Update openzeppelin skipped tests that depends on hardhat via-ir full support
2023-03-07 18:50:48 +01:00
Bhargava Shastry
1ac3abfbb7
Strict assembly fuzzer: Change optimization setting from full to minimal.
2023-02-24 22:42:07 +01:00
wechman
aba5ac5e2a
User-defined operators: Tests
2023-02-22 00:40:03 +01:00
Kamil Śliwak
fa0d3a44a7
Tests for using enums and fixed-point types as user-defined types
2023-02-21 23:42:22 +01:00
Kamil Śliwak
38b5ae578b
Fix typo in test name: singed -> signed
2023-02-21 21:30:03 +01:00
Daniel Kirchner
4064116df4
Do not duplicate subassemblies.
...
Add LinkerObject check and more tests
2023-02-20 22:20:45 +01:00
Kamil Śliwak
973eda17b4
Merge pull request #13977 from ethereum/revert-openzeppelin-time-workaround
...
Remove openzeppelin workaround
2023-02-17 14:13:17 +01:00
Rodrigo Q. Saramago
228c355424
Remove openzeppelin workaround
2023-02-16 13:10:21 +01:00
chriseth
01b10e2515
Gas updates.
2023-02-15 21:33:06 +01:00
chriseth
07750ea23a
More aggressive runtime code exclusion.
2023-02-15 21:33:06 +01:00
Kamil Śliwak
e147654f92
Merge pull request #13971 from ethereum/improve-error-reporting-for-wrong-constructor-arguments
...
Improve error messages for wrong constructor arguments
2023-02-15 20:39:59 +01:00
Rodrigo Q. Saramago
ceaa7b53da
Skipping flaky openzeppelin tests
2023-02-15 18:54:15 +01:00
Kamil Śliwak
1a981af548
Only suggest removing parentheses from a construction call if they're empty
2023-02-15 14:27:03 +01:00
Kamil Śliwak
73183d3df9
Fix missing base constructor arguments being treated as an unimplemented function
2023-02-15 14:27:03 +01:00
Kamil Śliwak
bc3cbfa18d
Add more tests tests for calls to base constructor with missing or wrong arguments
2023-02-15 14:17:55 +01:00
Kamil Śliwak
16bc4c6b5f
Fix test for replacing base constructor
2023-02-15 14:17:55 +01:00
Daniel
7cd589eee4
Merge pull request #13961 from ethereum/fix-external-test-gp2
...
gp2 external test workaround
2023-02-13 21:36:36 +01:00
chriseth
91b14174d8
Merge pull request #13702 from ethereum/new_knowledge_engine
...
Re-implement KnowledgeBase using groups of constantly-spaced variables.
2023-02-13 20:05:47 +01:00
Rodrigo Q. Saramago
a5166f0a19
gp2 external test workaround
2023-02-11 17:16:03 +01:00
Leo
59f9ab4dee
Merge pull request #13939 from pgebal/fix_handling_bitwise_operators_when_parsing_z3_call_result
...
Fixes handling bitwise operators for z3 model checker
2023-02-09 12:16:28 +01:00
chriseth
695b250557
Update gas costs.
2023-02-09 10:47:12 +01:00
chriseth
47aa1c65ae
Re-implement KnowledgeBase using groups of constantly-spaced variables.
2023-02-09 10:47:11 +01:00
Pawel Gebal
a38549dc19
Fixes handling bitwise operators for z3 model checker
2023-02-08 18:37:17 +01:00
Leo Alt
db9c11a2a5
fix abstract nondet exception
2023-02-08 16:59:37 +01:00
Daniel
665bf29a84
Merge pull request #12958 from ethereum/yul-fuzzer-bound-memory-accesses
...
Yul grammar generator: Bound memory accesses.
2023-02-07 15:47:20 +01:00
Matheus Aguiar
a5c5e4602a
Cleanup of duplicated line leftover from previous fix
2023-02-06 18:10:31 -03:00
Nikola Matić
e48d495fb7
Merge pull request #13940 from ethereum/fix-workaround-gnosis-test
...
Replace quote marks with quotation marks in workaround of gnosis.sh external test
2023-02-06 21:48:38 +01:00
Matheus Aguiar
98c011328a
Replace quote marks with quotation marks
2023-02-06 16:53:23 -03: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
Matheus Aguiar
2b70b08d5f
Allow library external functions to be bound with using for
2023-02-02 13:39:19 -03:00
Bhargava Shastry
5c6e12b2c0
Update existing and add new test cases.
2023-02-02 11:40:39 +01:00
Bhargava Shastry
f8880cad82
Yul grammar generator: Bound memory accesses.
2023-02-02 08:10:53 +01:00
Rodrigo Q. Saramago
828f95ad9e
Fix pylint 2.16 warnings
2023-02-01 10:39:00 -03:00
Rodrigo Q. Saramago
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
Rodrigo Q. Saramago
d9d9ab30a2
Update default evm version to paris
2023-01-30 17:57:08 +01:00
Bhargava Shastry
564cf85725
Yul proto converter: Output prevrandao for evm versions >= paris
2023-01-30 09:19:33 +01:00
Nikola Matic
e7543d487d
Issue warning when using deprecated SELFDESTRUCT
2023-01-25 16:55:11 +01:00
Rodrigo Q. Saramago
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
vlad
484ee8a621
Additional tests for edge cases for mutability, visibility, location, experimental, global, indexed and anonymous
2023-01-20 20:05:36 +01:00
vlad
7fbd36855d
Disallow usage of the indexed attribute for modifier parameters Added tests for edge cases of several keywords
2023-01-20 19:53:02 +01:00
vlad
6a0ea174b8
Disallow several indexed attributes for the same event parameter
2023-01-20 19:53:02 +01:00
Rodrigo Q. Saramago
a9757e963e
Remove more workarounds
2023-01-18 09:25:31 +00:00
Nikola Matić
db0ecd2413
Merge pull request #13878 from ethereum/gnosis-remove-workarounds-for-latest-dependencies
...
Remove workarounds for latest dependencies from gnosis ext test
2023-01-18 09:42:39 +01:00
Kamil Śliwak
6df65ca1a1
gnosis ext test: Remove workarounds that used to be necessary to make the test work with latest versions of its dependencies
2023-01-18 08:54:01 +01:00
Matheus Aguiar
7779b6f352
Forbid private library functions to be attached outside their declaration scope
2023-01-17 16:27:35 -03:00
Nikola Matic
83c1f62026
Source location for named mapping keys
2023-01-17 12:25:23 +01:00
Matheus Aguiar
82806c4236
Change filename in sed command
2023-01-16 12:54:02 -03:00