mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10010 from ethereum/develop
Merge develop into breaking.
This commit is contained in:
+7
-7
@@ -1,11 +1,11 @@
|
||||
[
|
||||
{
|
||||
"name": "DynamicArrayCleanup",
|
||||
"summary": "When assigning a dynamically-sized array with types of size at most 16 bytes in storage causing the assigned array to shrink, some parts of deleted slots were not zeroed out.",
|
||||
"description": "Consider a dynamically-sized array in storage whose base-type is small enough such that multiple values can be packed into a single slot, such as `uint128[]`. Let us define its length to be `l`. When this array gets assigned from another array with a smaller length, say `m`, the slots between elements `m` and `l` have to be cleaned by zeroing them out. However, this cleaning was not performed properly. Specifically, after the slot corresponding to `m`, only the first packed value was cleaned up. If this array gets resized to a length larger than `m`, the indices corresponding to the unclean parts of the slot contained the original value, instead of 0. The resizing here is performed by assigning to the array `length`, by a `push()` or via inline assembly. You are not affected if you are only using `.push(<arg>)` or if you assign a value (even zero) to the new elements after increasing the length of the array.",
|
||||
"fixed": "0.7.3",
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"name": "DynamicArrayCleanup",
|
||||
"summary": "When assigning a dynamically-sized array with types of size at most 16 bytes in storage causing the assigned array to shrink, some parts of deleted slots were not zeroed out.",
|
||||
"description": "Consider a dynamically-sized array in storage whose base-type is small enough such that multiple values can be packed into a single slot, such as `uint128[]`. Let us define its length to be `l`. When this array gets assigned from another array with a smaller length, say `m`, the slots between elements `m` and `l` have to be cleaned by zeroing them out. However, this cleaning was not performed properly. Specifically, after the slot corresponding to `m`, only the first packed value was cleaned up. If this array gets resized to a length larger than `m`, the indices corresponding to the unclean parts of the slot contained the original value, instead of 0. The resizing here is performed by assigning to the array `length`, by a `push()` or via inline assembly. You are not affected if you are only using `.push(<arg>)` or if you assign a value (even zero) to the new elements after increasing the length of the array.",
|
||||
"fixed": "0.7.3",
|
||||
"severity": "medium"
|
||||
},
|
||||
{
|
||||
"name": "FreeFunctionRedefinition",
|
||||
"summary": "The compiler does not flag an error when two or more free functions with the same name and parameter types are defined in a source unit or when an imported free function alias shadows another free function with a different name but identical parameter types.",
|
||||
|
||||
@@ -519,7 +519,6 @@ An ``assert``-style exception is generated in the following situations:
|
||||
#. If you access an array or an array slice at a too large or negative index (i.e. ``x[i]`` where ``i >= x.length`` or ``i < 0``).
|
||||
#. If you access a fixed-length ``bytesN`` at a too large or negative index.
|
||||
#. If you divide or modulo by zero (e.g. ``5 / 0`` or ``23 % 0``).
|
||||
#. If you shift by a negative amount.
|
||||
#. If you convert a value too big or negative into an enum type.
|
||||
#. If you call a zero-initialized variable of internal function type.
|
||||
#. If you call ``assert`` with an argument that evaluates to false.
|
||||
|
||||
+36
-20
@@ -26,42 +26,58 @@ a 0.x version number `to indicate this fast pace of change <https://semver.org/#
|
||||
|
||||
.. warning::
|
||||
|
||||
Solidity recently released the 0.6.x version that introduced a lot of breaking
|
||||
changes. Make sure you read :doc:`the full list <060-breaking-changes>`.
|
||||
Solidity recently released the 0.7.x version that introduced a lot of breaking
|
||||
changes. Make sure you read :doc:`the full list <070-breaking-changes>`.
|
||||
|
||||
Language Documentation
|
||||
----------------------
|
||||
Ideas for improving Solidity or this documentation are always welcome,
|
||||
read our :doc:`contributors guide <contributing>` for more details.
|
||||
|
||||
If you are new to the concept of smart contracts we recommend you start with
|
||||
:ref:`an example smart contract <simple-smart-contract>` written
|
||||
in Solidity. When you are ready for more detail, we recommend you read the
|
||||
:doc:`"Solidity by Example" <solidity-by-example>` and
|
||||
"Language Description" sections to learn the core concepts of the language.
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
For further reading, try :ref:`the basics of blockchains <blockchain-basics>`
|
||||
and details of the :ref:`Ethereum Virtual Machine <the-ethereum-virtual-machine>`.
|
||||
**1. Understand the Smart Contract Basics**
|
||||
|
||||
If you are new to the concept of smart contracts we recommend you to get started by digging
|
||||
into the "Introduction to Smart Contracts" section, which covers:
|
||||
* :ref:`A simple example smart contract <simple-smart-contract>` written in Solidity.
|
||||
* :ref:`Blockchain Basics <blockchain-basics>`.
|
||||
* :ref:`The Ethereum Virtual Machine <the-ethereum-virtual-machine>`.
|
||||
|
||||
**2. Get to Know Solidity**
|
||||
|
||||
Once you are accustomed to the basics, we recommend you read the :doc:`"Solidity by Example" <solidity-by-example>`
|
||||
and “Language Description” sections to understand the core concepts of the language.
|
||||
|
||||
**3. Install the Solidity Compiler**
|
||||
|
||||
There are various ways to install the Solidity compiler,
|
||||
simply choose your preferred option and follow the steps outlined on the :ref:`installation page <installing-solidity>`.
|
||||
|
||||
.. hint::
|
||||
You can always try out code examples in your browser with the
|
||||
You can try out code examples directly in your browser with the
|
||||
`Remix IDE <https://remix.ethereum.org>`_. Remix is a web browser based IDE
|
||||
that allows you to write Solidity smart contracts, then deploy and run the
|
||||
smart contracts. It can take a while to load, so please be patient.
|
||||
that allows you to write, deploy and administer Solidity smart contracts, without
|
||||
the need to install Solidity locally.
|
||||
|
||||
.. warning::
|
||||
As humans write software, it can have bugs. You should follow established
|
||||
software development best-practices when writing your smart contracts, this
|
||||
software development best-practices when writing your smart contracts. This
|
||||
includes code review, testing, audits, and correctness proofs. Smart contract
|
||||
users are sometimes more confident with code than their authors, and
|
||||
blockchains and smart contracts have their own unique issues to
|
||||
watch out for, so before working on production code, make sure you read the
|
||||
:ref:`security_considerations` section.
|
||||
|
||||
If you have any questions, you can try searching for answers or asking on the
|
||||
`Ethereum Stackexchange <https://ethereum.stackexchange.com/>`_, or
|
||||
our `gitter channel <https://gitter.im/ethereum/solidity/>`_.
|
||||
**4. Learn More**
|
||||
|
||||
Ideas for improving Solidity or this documentation are always welcome,
|
||||
read our :doc:`contributors guide <contributing>` for more details.
|
||||
If you want to learn more about building decentralized applications on Ethereum, the
|
||||
`Ethereum Developer Resources <https://ethereum.org/en/developers/>`_
|
||||
can help you with further general documentation around Ethereum, and a wide selection of tutorials,
|
||||
tools and development frameworks.
|
||||
|
||||
If you have any questions, you can try searching for answers or asking on the
|
||||
`Ethereum StackExchange <https://ethereum.stackexchange.com/>`_, or
|
||||
our `Gitter channel <https://gitter.im/ethereum/solidity/>`_.
|
||||
|
||||
.. _translations:
|
||||
|
||||
|
||||
@@ -111,6 +111,14 @@ activate it using ``pragma experimental ABIEncoderV2;`` - we kept
|
||||
the same pragma, even though it is not considered experimental
|
||||
anymore.
|
||||
|
||||
The set of types supported by the new encoder is a strict superset of
|
||||
the ones supported by the old one. Contracts that use it can interact with ones
|
||||
that do not without limitations. The reverse is possible only as long as the
|
||||
non-``ABIEncoderV2`` contract does not try to make calls that would require
|
||||
decoding types only supported by the new encoder. The compiler can detect this
|
||||
and will issue an error. Simply enabling ``ABIEncoderV2`` for your contract is
|
||||
enough to make the error go away.
|
||||
|
||||
.. _smt_checker:
|
||||
|
||||
SMTChecker
|
||||
|
||||
Reference in New Issue
Block a user