Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
ed96eb2
Yul fuzzer: Support blobhash(uint) global function
bshastry Jan 25, 2024
44da00d
Use MCOPY when copying byte arrays
nikola-matic Feb 6, 2024
3122d35
ABI decode test case
nikola-matic Feb 14, 2024
4032b59
Add DebugData to AssemblyItem.
aarlt Feb 10, 2024
c7b8dcc
[test] Add /usr/local/lib to search paths for macOS.
aarlt Feb 16, 2024
9b8ed03
Fix typo in Assembly::fromJSON(..).
aarlt Feb 18, 2024
5aed751
Use ethers version 6.11.0 on openzeppelin external tests
r0qs Feb 19, 2024
c21490f
[ci] Remove usage of ETH_EVMONE environment variable.
aarlt Feb 19, 2024
d8c3ca2
Merge pull request #14834 from ethereum/use_mcopy_in_code_generation
nikola-matic Feb 19, 2024
dc11306
Merge pull request #14865 from ethereum/fix_typo_in_assembly_from_json
ekpyron Feb 19, 2024
6c5026d
Merge pull request #14862 from ethereum/add_usr_local_lib_to_default_…
aarlt Feb 19, 2024
18cabee
CompilerStack: Don't swallow details include in OptimizerException
cameel Jan 9, 2024
f518815
Remove obsolete gas cost tiers
cameel Jan 9, 2024
686f5cd
Document the Tier enum and constants that come from Execution Specs
cameel Jan 9, 2024
a973b4c
Rename Ext gas cost tier to BlockHash
cameel Jan 9, 2024
f78eec5
Merge pull request #14867 from ethereum/fix-openzeppelin
ekpyron Feb 19, 2024
5cf513d
Merge pull request #14772 from ethereum/clean-and-document-gas-tiers
cameel Feb 19, 2024
88ee7d8
[ci] Remove code signature from universal binary.
aarlt Feb 19, 2024
15ff3bc
Merge pull request #14869 from ethereum/remove_signature_from_univers…
ekpyron Feb 19, 2024
0bd7383
Merge pull request #14868 from ethereum/remove_usage_of_eth_evmone_en…
ekpyron Feb 19, 2024
172f3cf
Merge pull request #14841 from ethereum/add_debugdata_to_assemblyitem
ekpyron Feb 19, 2024
ac54fe1
Purge using namespace std from test
nikola-matic Jan 11, 2024
8631af2
Merge pull request #14778 from ethereum/purge-using-namespace-std-fro…
ekpyron Feb 19, 2024
ac39886
SMTChecker: Respect signedness of integer type
Feb 7, 2024
8770952
SMTChecker: Unsigned number expressions should have unsigned type
Feb 7, 2024
a1ad970
SMTChecker: Add test case
Feb 9, 2024
22da46c
Update changelog
Feb 9, 2024
f7baede
Merge pull request #14840 from ethereum/smt-fix-types
blishko Feb 19, 2024
4d163ff
Convert tagPos to a size for address size computation
Feb 18, 2024
8e21255
Account for subassemblies in tag size calculation, test adjustments a…
ekpyron Feb 19, 2024
c49d847
Force install python3.12 for Window bytecode compare job
nikola-matic Feb 20, 2024
0316f84
Merge pull request #14864 from simon-perriard/fix_subTagSize_computation
ekpyron Feb 20, 2024
1185ad0
Build hardhat from latest release in t_ems_ext_hardhat
r0qs Feb 20, 2024
9f0c222
Merge pull request #14873 from ethereum/pin-python-in-windows-ci
cameel Feb 20, 2024
d703b82
gas_diff_stats.py: Add basic unit tests
cameel Feb 11, 2024
c6e2331
gas_diff_stats.py: Add a Python shebang
cameel Feb 11, 2024
e28a1d4
gas_diff_stats.py: Print errors to stderr, not stdout
cameel Feb 11, 2024
5518a30
gas_diff_stats.py: Don't let shell evaluate file names and support na…
cameel Feb 11, 2024
39f3e76
gas_diff_stats.py: Fail when the semantic test dir does not exist
cameel Feb 11, 2024
855096b
gas_diff_stats.py: Skip non-gas lines to avoid having to silence pars…
cameel Feb 11, 2024
b9c7b69
gas_diff_stats.py: Explicitly ignore ir gas instead of failing to par…
cameel Feb 11, 2024
65031d3
gas_diff_stats.py: Handle errors instead of ignoring them
cameel Feb 11, 2024
43274fd
gas_diff_stats.py: Improve table and number formatting
cameel Feb 11, 2024
b88d690
gas_diff_stats.py: Order rows in a deterministic way (by file path)
cameel Feb 11, 2024
36f2d39
CI: Add a smoke test run for gas_diff_stats.py
cameel Feb 11, 2024
c130163
Merge pull request #14875 from ethereum/ext-test-hardhat-latest-release
ekpyron Feb 21, 2024
a851c59
Fix ENS external test ensuring it applies memory-safe-assembly filter…
r0qs Feb 21, 2024
f4105a9
Merge pull request #14842 from ethereum/more-robust-gas-diff-stats
ekpyron Feb 21, 2024
d7aa37d
Use latest release instead of main branch on external tests
r0qs Feb 20, 2024
a9a870d
Test coverage for existing parsing and formatting functionality of ga…
cameel Feb 7, 2024
e47e948
SoltesTypes: Fix outdated comment about allowed keys in gasUsed
cameel Feb 11, 2024
d98c943
TestFunctionCall::formatGasExpectations(): runType can't be empty in …
cameel Feb 7, 2024
c55c8b5
TestFunctionCall::formatGasExpectations(): Move diffing into a helper
cameel Feb 7, 2024
cd94139
TestFunctionCall::formatGasExpectations(): Handle corner cases properly
cameel Feb 7, 2024
d5bae3f
TestFunctionCall::formatGasExpectations(): Helper for getting optiona…
cameel Feb 7, 2024
2ee4d6b
Keep track of code deposit gas when executing contract code
cameel Feb 9, 2024
9623386
Separate 'code' gas settings in semantic tests
cameel Feb 9, 2024
96ce95a
Do not include code deposit gas in the total visible in test expectat…
cameel Feb 9, 2024
381b149
gas_diff_stats.py: Include code deposit costs in total cost
cameel Feb 11, 2024
e7312a5
Use CircleCI rust+node convenience image for t_ems_ext_hardhat job
r0qs Feb 21, 2024
c8358f5
Fix detect_hardhat_artifact_dir in externalTests scripts
r0qs Feb 21, 2024
4438082
Merge pull request #14880 from ethereum/update-external-tests
ekpyron Feb 21, 2024
acf382b
Merge pull request #14843 from ethereum/separate-code-deposit-cost-in…
cameel Feb 21, 2024
602f855
Merge pull request #14882 from ethereum/change-hardhat-ci-image
ekpyron Feb 21, 2024
a439996
Merge pull request #14881 from ethereum/fix-detect-hardhat-artifacts
ekpyron Feb 21, 2024
bd9b92c
Merge pull request #14806 from ethereum/fuzz-blobhash
bshastry Feb 22, 2024
e095590
Parser::parseFunctionDefinition(): Return FunctionDefinition, not AST…
cameel Nov 2, 2023
fa35ed5
Add ForAllQuantifier AST node
cameel Nov 2, 2023
4d051c1
Add parser support for quantified function definitions
cameel Nov 2, 2023
cd52e5a
TypeInference: Require declarations for type variables
cameel Nov 6, 2023
dba754e
Merge pull request #14668 from ethereum/new-analysis-forall
cameel Feb 23, 2024
180f744
gas_diff_stats.py: Sort the table by average change
cameel Feb 26, 2024
14e217e
Merge pull request #14888 from ethereum/gas-diff-stats-sort-by-avg
cameel Feb 27, 2024
125767e
SMTCommand: Remember to flush query before calling solver
Feb 27, 2024
28b2587
Merge pull request #14890 from ethereum/smt-solver-interface-small-up…
Feb 27, 2024
51eff63
Update introduction-to-smart-contracts.rst (#14884)
eclipse1228 Feb 29, 2024
e7aaf03
docs: Replace references to "mining" with "attestation" (#14147)
Vojtch159 Feb 29, 2024
9bd2424
Fix typos in variable names and comment (#14876)
Chomtana Feb 29, 2024
7676ab1
Update natspec-format.rst : Added structs and enums to Tags (#14267)
adityakode Feb 29, 2024
6b417dd
[evmasm] Fix handling of missing source locations during import.
aarlt Mar 1, 2024
b630c0a
fix: rename RedundantAssignEliminator to UnusedAssignEliminator
minaminao Jul 27, 2023
8709ae9
fix: typos
minaminao Aug 17, 2023
f96a851
chore: update example version of solidity in docker command
minaminao Aug 17, 2023
0225d9d
Update installing-solidity.rst
mehtavishwa30 Mar 1, 2024
51b6976
Update installing-solidity.rst
mehtavishwa30 Mar 1, 2024
8f0cb8a
Update docs/installing-solidity.rst
mehtavishwa30 Mar 4, 2024
cbd8437
Fix python snippet causing "SyntaxWarning" in Scanner.
aarlt Mar 4, 2024
360c945
Merge pull request #14904 from ethereum/fix_cmdline_python_snippet
aarlt Mar 4, 2024
be9db7b
Merge pull request #14903 from ethereum/fix_missing_source_locations_…
ekpyron Mar 4, 2024
ad77fd7
EVMHost: Rename newlyCreatedAccounts to m_newlyCreatedAccounts
cameel Feb 6, 2024
41363d7
EVMHost: Reset m_newlyCreatedAccounts() in reset()
cameel Feb 6, 2024
c09d2c0
EVMHost: Note about newly created accounts not being rolled back
cameel Feb 11, 2024
edc494d
Merge pull request #14845 from ethereum/selfdestruct-testing-tweaks
cameel Mar 5, 2024
3ea7497
English documentation updates up to v0.8.24-125-gedc494de1 (2024-03-06)
soldocsbot Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ List of Known Bugs
##################

Below, you can find a JSON-formatted list of some of the known security-relevant bugs in the
Solidity compiler. The file itself is hosted in the `Github repository
Solidity compiler. The file itself is hosted in the `GitHub repository
<https://github.com/ethereum/solidity/blob/develop/docs/bugs.json>`_.
The list stretches back as far as version 0.3.0, bugs known to be present only
in versions preceding that are not listed.
Expand Down
2 changes: 1 addition & 1 deletion docs/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Modifiers
- ``pure`` for functions: Disallows modification or access of state.
- ``view`` for functions: Disallows modification of state.
- ``payable`` for functions: Allows them to receive Ether together with a call.
- ``constant`` for state variables: Disallows assignment (except initialisation), does not occupy storage slot.
- ``constant`` for state variables: Disallows assignment (except initialization), does not occupy storage slot.
- ``immutable`` for state variables: Allows assignment at construction time and is constant when deployed. Is stored in code.
- ``anonymous`` for events: Does not store event signature as topic.
- ``indexed`` for event parameters: Stores the parameter as topic.
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/inheritance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Constructors

A constructor is an optional function declared with the ``constructor`` keyword
which is executed upon contract creation, and where you can run contract
initialisation code.
initialization code.

Before the constructor code is executed, state variables are initialised to
their specified value if you initialise them inline, or their :ref:`default value<default-value>` if you do not.
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ for the ``evmone`` shared object can be specified via the ``ETH_EVMONE`` environ
If you do not have it installed, you can skip these tests by passing the ``--no-semantic-tests``
flag to ``scripts/soltest.sh``.

The ``evmone`` library should both end with the file name
The ``evmone`` library should end with the file name
extension ``.so`` on Linux, ``.dll`` on Windows systems and ``.dylib`` on macOS.

For running SMT tests, the ``libz3`` library must be installed and locatable
Expand Down Expand Up @@ -552,7 +552,7 @@ topics, issues or feature implementations are debated in detail. The invitation

We are also sharing feedback surveys and other content that is relevant to language design in the forum.

If you want to know where the team is standing in terms or implementing new features, you can follow the implementation status in the `Solidity Github project <https://github.com/ethereum/solidity/projects/43>`_.
If you want to know where the team is standing in terms or implementing new features, you can follow the implementation status in the `Solidity GitHub project <https://github.com/ethereum/solidity/projects/43>`_.
Issues in the design backlog need further specification and will either be discussed in a language design call or in a regular team call. You can
see the upcoming changes for the next breaking release by changing from the default branch (`develop`) to the `breaking branch <https://github.com/ethereum/solidity/tree/breaking>`_.

Expand Down
24 changes: 15 additions & 9 deletions docs/installing-solidity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,20 @@ and runs it in a new container, passing the ``--help`` argument.

docker run ethereum/solc:stable --help

For example, You can specify release build versions in the tag for the 0.5.4 release.
You can specify release build versions in the tag. For example:

.. code-block:: bash

docker run ethereum/solc:0.5.4 --help
docker run ethereum/solc:stable --help

Note

Specific compiler versions are supported as the Docker image tag such as `ethereum/solc:0.8.23`. We will be passing the
`stable` tag here instead of specific version tag to ensure that users get the latest version by default and avoid the issue of
an out-of-date version.

To use the Docker image to compile Solidity files on the host machine, mount a
local folder for input and output, and specify the contract to compile. For example.
local folder for input and output, and specify the contract to compile. For example:

.. code-block:: bash

Expand Down Expand Up @@ -183,7 +189,7 @@ If you need a specific version of Solidity you can install a
Homebrew formula directly from Github.

View
`solidity.rb commits on Github <https://github.com/ethereum/homebrew-ethereum/commits/master/solidity.rb>`_.
`solidity.rb commits on GitHub <https://github.com/ethereum/homebrew-ethereum/commits/master/solidity.rb>`_.

Copy the commit hash of the version you want and check it out on your machine.

Expand Down Expand Up @@ -224,8 +230,8 @@ out-of-the-box but it is also meant to be friendly to third-party tools:
(via git, HTTPS, IPFS or just have it cached locally) and verify hashes of the binaries
after downloading them, you do not have to use HTTPS for the binaries themselves.

The same binaries are in most cases available on the `Solidity release page on Github`_. The
difference is that we do not generally update old releases on the Github release page. This means
The same binaries are in most cases available on the `Solidity release page on GitHub`_. The
difference is that we do not generally update old releases on the GitHub release page. This means
that we do not rename them if the naming convention changes and we do not add builds for platforms
that were not supported at the time of release. This only happens in ``solc-bin``.

Expand Down Expand Up @@ -301,7 +307,7 @@ This means that:
.. _IPFS: https://ipfs.io
.. _Swarm: https://swarm-gateways.net/bzz:/swarm.eth
.. _solc-bin: https://github.com/ethereum/solc-bin/
.. _Solidity release page on github: https://github.com/ethereum/solidity/releases
.. _Solidity release page on GitHub: https://github.com/ethereum/solidity/releases
.. _sha3sum: https://github.com/maandree/sha3sum
.. _keccak256() function from ethereumjs-util: https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/modules/_hash_.md#const-keccak256
.. _WebAssembly builds: https://emscripten.org/docs/compiling/WebAssembly.html
Expand Down Expand Up @@ -461,11 +467,11 @@ you should fork Solidity and add your personal fork as a second remote:
This method will result in a pre-release build leading to e.g. a flag
being set in each bytecode produced by such a compiler.
If you want to re-build a released Solidity compiler, then
please use the source tarball on the github release page:
please use the source tarball on the GitHub release page:

https://github.com/ethereum/solidity/releases/download/v0.X.Y/solidity_0.X.Y.tar.gz

(not the "Source code" provided by github).
(not the "Source code" provided by GitHub).

Command-Line Build
------------------
Expand Down
22 changes: 11 additions & 11 deletions docs/internals/optimizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ The following transformation steps are the main components:
- SSA Transform
- Common Subexpression Eliminator
- Expression Simplifier
- Redundant Assign Eliminator
- Unused Assign Eliminator
- Full Inliner

.. _optimizer-steps:
Expand Down Expand Up @@ -335,11 +335,11 @@ Abbreviation Full name
``T`` :ref:`literal-rematerialiser`
``L`` :ref:`load-resolver`
``M`` :ref:`loop-invariant-code-motion`
``r`` :ref:`redundant-assign-eliminator`
``m`` :ref:`rematerialiser`
``V`` :ref:`SSA-reverser`
``a`` :ref:`SSA-transform`
``t`` :ref:`structural-simplifier`
``r`` :ref:`unused-assign-eliminator`
``p`` :ref:`unused-function-parameter-pruner`
``S`` :ref:`unused-store-eliminator`
``u`` :ref:`unused-pruner`
Expand Down Expand Up @@ -482,7 +482,7 @@ is transformed to
}

This eases the rest of the optimization process because we can ignore
the complicated scoping rules of the for loop initialisation block.
the complicated scoping rules of the for loop initialization block.

.. _var-decl-initializer:

Expand Down Expand Up @@ -652,18 +652,18 @@ the block, a new SSA variable will be created at the location where control flow
this includes the beginning of loop post/body block and the location right after
If/Switch/ForLoop/Block statement.

After this stage, the Redundant Assign Eliminator is recommended to remove the unnecessary
After this stage, the Unused Assign Eliminator is recommended to remove the unnecessary
intermediate assignments.

This stage provides best results if the Expression Splitter and the Common Subexpression Eliminator
are run right before it, because then it does not generate excessive amounts of variables.
On the other hand, the Common Subexpression Eliminator could be more efficient if run after the
SSA transform.

.. _redundant-assign-eliminator:
.. _unused-assign-eliminator:

RedundantAssignEliminator
^^^^^^^^^^^^^^^^^^^^^^^^^
UnusedAssignEliminator
^^^^^^^^^^^^^^^^^^^^^^

The SSA transform always generates an assignment of the form ``a := a_i``, even though
these might be unnecessary in many cases, like the following example:
Expand Down Expand Up @@ -691,7 +691,7 @@ The SSA transform converts this snippet to the following:
sstore(a_3, 1)
}

The Redundant Assign Eliminator removes all the three assignments to ``a``, because
The Unused Assign Eliminator removes all the three assignments to ``a``, because
the value of ``a`` is not used and thus turn this
snippet into strict SSA form:

Expand All @@ -704,7 +704,7 @@ snippet into strict SSA form:
sstore(a_3, 1)
}

Of course the intricate parts of determining whether an assignment is redundant or not
Of course the intricate parts of determining whether an assignment is unused or not
are connected to joining control flow.

The component works as follows in detail:
Expand Down Expand Up @@ -829,7 +829,7 @@ current value if the value is an identifier.
The combination of the two rules above allow to compute a local value
numbering, which means that if two variables have the same
value, one of them will always be unused. The Unused Pruner or the
Redundant Assign Eliminator will then be able to fully eliminate such
Unused Assign Eliminator will then be able to fully eliminate such
variables.

This step is especially efficient if the expression splitter is run
Expand Down Expand Up @@ -1217,7 +1217,7 @@ The FullInliner replaces certain calls of certain functions
by the function's body. This is not very helpful in most cases, because
it just increases the code size but does not have a benefit. Furthermore,
code is usually very expensive and we would often rather have shorter
code than more efficient code. In same cases, though, inlining a function
code than more efficient code. In some cases, though, inlining a function
can have positive effects on subsequent optimizer steps. This is the case
if one of the function arguments is a constant, for example.

Expand Down
4 changes: 2 additions & 2 deletions docs/introduction-to-smart-contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ creates a public state variable, but it is a more complex datatype.
The :ref:`mapping <mapping-types>` type maps addresses to :ref:`unsigned integers <integers>`.

Mappings can be seen as `hash tables <https://en.wikipedia.org/wiki/Hash_table>`_ which are
virtually initialised such that every possible key exists from the start and is mapped to a
virtually initialized such that every possible key exists from the start and is mapped to a
value whose byte-representation is all zeros. However, it is neither possible to obtain a list of all keys of
a mapping, nor a list of all values. Record what you
added to the mapping, or use it in a context where this is not needed. Or
Expand Down Expand Up @@ -304,7 +304,7 @@ These blocks form a linear sequence in time, and that is where the word "blockch
Blocks are added to the chain at regular intervals, although these intervals may be subject to change in the future.
For the most up-to-date information, it is recommended to monitor the network, for example, on `Etherscan <https://etherscan.io/chart/blocktime>`_.

As part of the "order selection mechanism" (which is called "mining") it may happen that
As part of the "order selection mechanism", which is called `attestation <https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/attestations/>`_, it may happen that
blocks are reverted from time to time, but only at the "tip" of the chain. The more
blocks are added on top of a particular block, the less likely this block will be reverted. So it might be that your transactions
are reverted and even removed from the blockchain, but the longer you wait, the less
Expand Down
8 changes: 4 additions & 4 deletions docs/natspec-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ in the same way as if it were tagged with ``@notice``.
=============== ====================================================================================== =============================
Tag Context
=============== ====================================================================================== =============================
``@title`` A title that should describe the contract/interface contract, library, interface
``@author`` The name of the author contract, library, interface
``@notice`` Explain to an end user what this does contract, library, interface, function, public state variable, event
``@dev`` Explain to a developer any extra details contract, library, interface, function, state variable, event
``@title`` A title that should describe the contract/interface contract, library, interface, struct, enum
``@author`` The name of the author contract, library, interface, struct, enum
``@notice`` Explain to an end user what this does contract, library, interface, function, public state variable, event, struct, enum
``@dev`` Explain to a developer any extra details contract, library, interface, function, state variable, event, struct, enum
``@param`` Documents a parameter just like in Doxygen (must be followed by parameter name) function, event
``@return`` Documents the return variables of a contract's function function, public state variable
``@inheritdoc`` Copies all missing tags from the base function (must be followed by the contract name) function, public state variable
Expand Down