Fix missplaced warnings

This commit is contained in:
Chris Chinchilla 2019-06-19 11:03:10 +02:00
parent 56db792ad9
commit 622adf55c2
2 changed files with 14 additions and 14 deletions

View File

@ -305,10 +305,6 @@ You might want to install ccache to speed up repeated builds.
CMake will pick it up automatically.
Building Solidity is quite similar on Linux, macOS and other Unices:
.. warning::
BSD builds should work, but are untested by the Solidity team.
.. code-block:: bash
mkdir build
@ -322,6 +318,10 @@ or even easier on Linux and macOS, you can run:
#note: this will install binaries solc and soltest at usr/local/bin
./scripts/build.sh
.. warning::
BSD builds should work, but are untested by the Solidity team.
And for Windows:
.. code-block:: bash

View File

@ -165,16 +165,6 @@ Mathematical and Cryptographic Functions
``keccak256(bytes memory) returns (bytes32)``:
compute the Keccak-256 hash of the input
.. warning::
If you use ``ecrecover``, be aware that a valid signature can be turned into a different valid signature without
requiring knowledge of the corresponding private key. In the Homestead hard fork, this issue was fixed
for _transaction_ signatures (see `EIP-2 <http://eips.ethereum.org/EIPS/eip-2#specification>`_), but
the ecrecover function remained unchanged.
This is usually not a problem unless you require signatures to be unique or
use them to identify items. OpenZeppelin have a `ECDSA helper library <https://docs.openzeppelin.org/v2.3.0/api/cryptography#ecdsa>`_ that you can use as a wrapper for ``ecrecover`` without this issue.
.. note::
There used to be an alias for ``keccak256`` called ``sha3``, which was removed in version 0.5.0.
@ -198,6 +188,16 @@ Mathematical and Cryptographic Functions
For further details, read `example usage <https://ethereum.stackexchange.com/q/1777/222>`_.
.. warning::
If you use ``ecrecover``, be aware that a valid signature can be turned into a different valid signature without
requiring knowledge of the corresponding private key. In the Homestead hard fork, this issue was fixed
for _transaction_ signatures (see `EIP-2 <http://eips.ethereum.org/EIPS/eip-2#specification>`_), but
the ecrecover function remained unchanged.
This is usually not a problem unless you require signatures to be unique or
use them to identify items. OpenZeppelin have a `ECDSA helper library <https://docs.openzeppelin.org/v2.3.0/api/cryptography#ecdsa>`_ that you can use as a wrapper for ``ecrecover`` without this issue.
.. note::
When running ``sha256``, ``ripemd160`` or ``ecrecover`` on a *private blockchain*, you might encounter Out-of-Gas. This is because these functions are implemented as "precompiled contracts" and only really exist after they receive the first message (although their contract code is hardcoded). Messages to non-existing contracts are more expensive and thus the execution might run into an Out-of-Gas error. A workaround for this problem is to first send Wei (1 for example) to each of the contracts before you use them in your actual contracts. This is not an issue on the main or test net.