Commit Graph

2213 Commits

Author SHA1 Message Date
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
Daniel Kirchner
4b67dea8e2 Set version to 0.8.21. 2023-05-10 17:55:52 +02:00
Daniel Kirchner
3c77d33db8 Set release date for 0.8.20. 2023-05-10 12:20:56 +02:00
Daniel Kirchner
b730bde54d Sort and adjust changelog for 0.8.20. 2023-05-10 12:15:00 +02:00
Daniel Kirchner
606fbd8fcc Fix antlr grammar. 2023-05-10 12:00:45 +02:00
Alexander Arlt
4837d42361 Add experimental support to import AST via Standard JSON. 2023-05-09 14:07:38 -05:00
Nikola Matic
9a87b587d5 Disallow immutable initialization in try catch statements
Trigger github
2023-05-09 14:48:14 +02:00
hrkrshnn
cbd6495fb1 docs: mention that push0 also decreases the runtime costs
Fixes https://github.com/ethereum/solidity/pull/14107#discussion_r1163830306
2023-05-08 18:53:10 +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
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
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
3458da9df3 Emit PUSH0 as junk in evm code transform, if available. 2023-04-17 16:26:07 +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
hrkrshnn
b30f89bcce docs: On supporting shanghai EVM version and changelog 2023-04-12 00:10:24 +02:00
Nikola Matic
3d5bb3e87b Sort changelog 2023-04-05 17:42:06 +02:00
Christian Parpart
be8752b5d3 Adds natspec to AST for enum definition. 2023-04-05 14:58:32 +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
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
Nikola Matic
b6df64e4fd Set version to 0.8.20 2023-02-22 19:41:03 +01:00
Nikola Matic
21823613bc Set release date for 0.8.19 2023-02-22 13:33:25 +01:00
Nikola Matić
5f0f91974a
Revert "Set version to 0.8.20" 2023-02-22 13:27:50 +01:00
Nikola Matic
02b02f507d Set version to 0.8.20 2023-02-22 12:17:21 +01:00
Nikola Matic
486be8f10d Sort Changelog for 0.8.19 2023-02-22 12:13:46 +01:00
wechman
2e8d50eca2 User-defined operators: Documentation 2023-02-22 00:39:25 +01:00
Daniel Kirchner
4064116df4 Do not duplicate subassemblies.
Add LinkerObject check and more tests
2023-02-20 22:20:45 +01:00
chriseth
07750ea23a More aggressive runtime code exclusion. 2023-02-15 21:33:06 +01:00
Kamil Śliwak
73183d3df9 Fix missing base constructor arguments being treated as an unimplemented function 2023-02-15 14:27: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
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
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
Rodrigo Q. Saramago
e735ff1a95
Set version to 0.8.19 2023-02-01 20:24:50 +01:00
Rodrigo Q. Saramago
66007f5001
Add release date and bugs by version entry for 0.8.18 2023-02-01 14:45:13 +01:00
Rodrigo Q. Saramago
a186e60782
Sort changelog for 0.8.18 alphabetically 2023-02-01 14:45:13 +01:00
Rodrigo Q. Saramago
d9d9ab30a2 Update default evm version to paris 2023-01-30 17:57:08 +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
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