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
Daniel
c195782f96
Merge pull request #13778 from Andy53/removes-solidity-upgrade
...
Removes solidity upgrade
2023-01-18 13:20:54 +01:00
Matheus Aguiar
7779b6f352
Forbid private library functions to be attached outside their declaration scope
2023-01-17 16:27:35 -03:00
andy53
df2ea19535
Remove solidity-upgrade
...
update config.yaml
Update using-the-compiler.rst
removed bug reports section
added changelog entry
removed trailing whitespace
removed trailing whitespace
2023-01-17 07:59:43 -07:00
Soham Zemse
fa78e0f3d4
feat: allow named parameters in mapping types
...
Co-authored-by: Hari <webmail.hari@gmail.com>
test: add parser and abi test cases
docs: add example on using named parameters for mappings
- Add changelog
feat: update antlr grammar to allow named parameters in mappings
fix: prevent conflicting mapping parameter names
ref: change order of mapping initializers
test: update expectations and fix build
test: add more tests
fix: use common error & code for conflicting params
fix: issue with accessing nested mapping
test: add conflicting params tests for more nested levels
Update libsolidity/analysis/DeclarationTypeChecker.cpp
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
fix: error reported with the same code twice
test: add more tests for 3 level nested mapping
Address review comments
2022-12-08 11:56:58 +01:00
chriseth
79c52b3c9e
Re-use knowledge about keccak calls.
...
Re-use knowledge about keccak calls.
Update gas cost.
More tests.
Fix bug.
Update libyul/optimiser/DataFlowAnalyzer.cpp
Remove util prefixes
fix test
More test cases.
Add Changelog entry
2022-12-07 14:16:13 +01:00
Leo Alt
77698f8108
Fix internal error when deleting struct member of function type
2022-11-30 12:47:32 +01:00
Leo Alt
608b424afc
Fix internal error when using user defined value types as mapping indices or struct members.
2022-11-29 13:04:01 +01:00
Leo Alt
07870d0318
Fix internal error in assignment chains that also assign to fully qualified state variables (, for example), where the contract expression is a tuble.
2022-11-28 18:45:50 +01:00
Leo Alt
a5dab6181c
Fix internal error when the abstract-nondet SMTChecker natspec annotation is used with a wrong option multiple times for the same function
2022-11-28 16:59:35 +01:00
Leo Alt
9a8dd4242f
Fix SMTChecker bug when a public library function is called internally by an internal library function, which in turn is called internally by a contract.
2022-11-28 13:07:18 +01:00
Vinay
9e7b85ac4b
Improve Error Reporting of SemVer Parser
2022-11-25 13:09:09 -03:00
Leo Alt
24df40de9a
Allow running Eldarica from the command line
2022-11-22 21:16:45 +01:00
Daniel
3109ce2dbc
Merge pull request #12132 from ethereum/userDefinedSideEffectsCodeTransform
...
Use side-effects of user defined functions in evm code transform.
2022-11-22 14:26:57 +01:00
Alex Beregszaszi
eb8af2caec
Add basic support for the EVM version Paris
...
This mostly means testing with evmone, but instruction renaming of difficulty->prevrandao is omitted.
2022-11-21 14:56:46 +01:00
chriseth
5ba8c109f4
Use side-effects of user defined functions in evm code transform.
2022-11-14 21:26:36 +01:00
Ishtiaque Zahid
3abf2724a1
changed output of formatNumberReadable so that it shows powers of two and one-less-than powers of two in a more compact format
2022-11-14 17:37:38 +01:00
nishant-sachdeva
149303d02d
added changelog entry for optimizer
2022-11-11 02:26:47 +05:30
chriseth
cffacac9de
Hash number literals according to their value instead of their string representation.
2022-11-08 20:34:10 +01:00
chriseth
c3899bd549
Indent changelog.
2022-11-08 17:48:36 +01:00
Duc Thanh Nguyen
4aac4c7bc4
Add Natspec devdoc inheritance support for events
2022-11-08 15:53:10 +01:00
Alexander Arlt
5b9096a381
[solc] Exit code 2 for exceptions.
2022-11-01 12:56:05 +01:00
Christian Parpart
9e7fe985bf
[Language Server]: Add basic document hover support.
2022-10-26 13:53:29 +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
Nikola Matic
e37dc8e975
Address review comments
2022-09-13 17:23:31 +02:00
Nikola Matic
ddf0d784ac
Changelog and docs
2022-09-12 11:13:47 +02:00
Kamil Śliwak
3b524455c6
Set version to 0.8.18
2022-09-08 17:59:54 +02:00
Kamil Śliwak
722e9d8693
Set release date for 0.8.17 and update the bug list
2022-09-08 15:32:40 +02:00
Kamil Śliwak
514842e2a4
Sort changelog for 0.8.17 alphabetically
2022-09-08 15:32:40 +02:00
Kamil Śliwak
1649f24767
Add missing changelog entries for a few PRs that will go into 0.8.17
2022-09-08 15:32:40 +02:00
Daniel Kirchner
d6eb255df4
Changelog entry and bug list entry.
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2022-09-08 12:05:49 +02:00
Christian Parpart
b6ba43234e
lsp: Always load all solidity files from project for analyzing.
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2022-08-22 12:49:04 +02:00
Daniel Kirchner
e996fe6247
Yul Optimizer: Simplify start offset of zero-length operations.
2022-08-15 15:42:51 +02:00
Matheus Aguiar
2282ea5e56
Added overflow checks after multiplication operation is executed.
2022-08-12 10:18:05 -03:00
Daniel Kirchner
9a429e2300
Fix ICE on invalid tuple assignments.
2022-08-09 12:41:47 +02:00
Kamil Śliwak
cc11c6f3d5
Set version to 0.8.17
2022-08-08 15:24:48 +02:00
Kamil Śliwak
caba38db5c
Set release date for 0.8.16 and update the bug list
2022-08-08 14:12:42 +02:00
Kamil Śliwak
fb51bd69a3
Changelog cleanup for 0.8.16
2022-08-08 13:57:19 +02:00
Kamil Śliwak
0835e41626
Sort changelog for 0.8.16 alphabetically
2022-08-08 13:56:22 +02:00
Marenz
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
Duc Thanh Nguyen
a9e03f5e4a
Fix out-of-range compiler crash for nested tuple assignment involving
...
outer unary tuple
2022-08-04 12:45:46 -04:00
Matheus Aguiar
9acf693aa2
Fixed bad cast when abiEncodeCall receives a tuple from a function.
2022-08-03 18:48:38 -03:00
Kamil Śliwak
48835b3a73
Changelog: Add missing entry for the 0.8.13 PR that caps the returndata copied for static returns
2022-07-26 18:19:17 +02:00
Kamil Śliwak
f917249111
Changelog: Remove the superfluous entry about error reporter
2022-07-26 18:05:16 +02:00
Kamil Śliwak
8b05868895
Changelog: Sort 0.8.15 entries
2022-07-26 18:04:50 +02:00
Kamil Śliwak
13dc5c2981
Changelog: Use Language Server instead of LSP when referring to the compiler component
2022-07-26 18:04:06 +02:00
Duc Thanh Nguyen
5072472917
Fix abi.encodeCall checks
2022-07-25 12:40:54 -04:00
Christian Parpart
31227e442e
lsp: Adds support for include paths and have {projectUri}/node_modules added by default.
...
- Factor out FileRepository's path resolving into own public function.
- Fixes sourceUnitNameToUri() path resolving in relation to include paths being used.
- Adding an solAssert().
- adds nother test for include-paths (bad include)
- Fixes a case on Windows there an ill-formed URI was generated.
- Dropping unnecessary if-branch when translating from sourceUnitName to URI.
2022-07-12 15:25:33 +02:00
Duc Thanh Nguyen
0a14368315
Display human readable type name in conversion error message
2022-07-06 10:49:51 -04:00
Matheus Aguiar
4fd5c11af7
Checks for overflow/underflow after add/sub operations.
2022-06-23 14:41:12 -03:00
Mathias L. Baumann
3ed9a38abc
Merge pull request #12966 from a3d4/fix-ice-structtype-nativemembers
...
Fix ICE caused by an immutable struct with mapping
2022-06-23 16:11:28 +02:00
Daniel Lupu
8498fdf1d4
Add changelog entries
2022-06-22 09:26:31 +02:00
Daniel Kirchner
cdf243a9af
Improved array copy routine for value type arrays from memory or calldata to storage.
2022-06-16 15:05:21 +02:00
Nishant Sachdeva
b80f4baae2
Merge pull request #12928 from StrongerXi/expand-purity-check-for-foreign-constants
...
Propagate purity information for member access to foreign pure variables
2022-06-16 17:53:49 +05:30
Ryan
3b2c6de61c
Propagate purity information for member access to foreign pure variables
2022-06-16 17:11:55 +05:30
Midhun07
697821b96b
Disallowed --metadata-literal, --model-checker-show-unproved, --model-checker-div-mod-no-slacks ----metadata-hash=swarm outside of compiler mode
2022-06-16 17:09:33 +05:30
Daniel Kirchner
60004acfe9
Set version to 0.8.16.
2022-06-15 18:32:15 +02:00
Daniel Kirchner
14d0776c94
Set release date for 0.8.15.
2022-06-15 15:08:24 +02:00
Daniel Kirchner
16245f7b9b
Warn about multiple assignments to storage byte pushes and fix warnings about multiple storage to storage copies.
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2022-06-15 13:53:05 +02:00
Daniel Kirchner
91ff02b988
Changelog and buglist entries.
2022-06-14 18:26:16 +02:00
Kamil Śliwak
acbdcc3711
Revert the change that made events accessible in other contacts via qualified access
2022-06-14 12:04:14 +02:00