Skip to content

Commit 47a71e8

Browse files
authored
Merge pull request #6188 from ethereum/develop
Release 0.5.5
2 parents 9549d8f + 40171c2 commit 47a71e8

File tree

394 files changed

+8794
-2526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+8794
-2526
lines changed

.circleci/config.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656
paths:
5757
- boost_1_68_0
5858
- store_artifacts:
59-
path: build/libsolc/soljson.js
59+
path: emscripten_build/libsolc/soljson.js
6060
destination: soljson.js
6161
- run: mkdir -p workspace
62-
- run: cp build/libsolc/soljson.js workspace/soljson.js
62+
- run: cp emscripten_build/libsolc/soljson.js workspace/soljson.js
6363
- run: scripts/get_version.sh > workspace/version.txt
6464
- persist_to_workspace:
6565
root: workspace
@@ -202,8 +202,6 @@ jobs:
202202
- run:
203203
name: Install build dependencies
204204
command: |
205-
brew update
206-
brew upgrade
207205
brew unlink python
208206
brew install z3
209207
brew install boost
@@ -353,8 +351,6 @@ jobs:
353351
- run:
354352
name: Install dependencies
355353
command: |
356-
brew update
357-
brew upgrade
358354
brew unlink python
359355
brew install z3
360356
- run: mkdir -p test_results

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ prerelease.txt
3232

3333
# Build directory
3434
build/
35+
emscripten_build/
3536
docs/_build
3637
docs/utils/__pycache__
3738
docs/utils/*.pyc

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include(EthPolicy)
1010
eth_policy()
1111

1212
# project name and version should be set after cmake_policy CMP0048
13-
set(PROJECT_VERSION "0.5.4")
13+
set(PROJECT_VERSION "0.5.5")
1414
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES CXX)
1515

1616
option(LLL "Build LLL" OFF)

Changelog.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
### 0.5.5 (2019-03-05)
2+
3+
Language Features:
4+
* Add support for getters of mappings with ``string`` or ``bytes`` key types.
5+
* Meta programming: Provide access to the name of contracts via ``type(C).name``.
6+
7+
8+
Compiler Features:
9+
* Support ``petersburg`` as ``evmVersion`` and set as default.
10+
* Inline Assembly: Consider ``extcodehash`` as part of Constantinople.
11+
* Inline Assembly: Instructions unavailable to the currently configured EVM are errors now.
12+
* SMTChecker: Do not report underflow/overflow if they always revert. This removes false positives when using ``SafeMath``.
13+
* Standard JSON Interface: Allow retrieving metadata without triggering bytecode generation.
14+
* Static Analyzer: Warn about expressions with custom types when they have no effect.
15+
* Optimizer: Add new rules with constants including ``LT``, ``GT``, ``AND`` and ``BYTE``.
16+
* Optimizer: Add rule for shifts with constants for Constantinople.
17+
* Optimizer: Combine multiple shifts with constant shift-by values into one.
18+
* Optimizer: Do not mask with 160-bits after ``CREATE`` and ``CREATE2`` as they are guaranteed to return an address or 0.
19+
* Optimizer: Support shifts in the constant optimiser for Constantinople.
20+
* Yul Optimizer: Add rule to replace switch statements with literals by matching case body.
21+
22+
23+
Bugfixes:
24+
* ABIEncoderV2: Fix internal error related to bare delegatecall.
25+
* ABIEncoderV2: Fix internal error related to ecrecover.
26+
* ABIEncoderV2: Fix internal error related to mappings as library parameters.
27+
* ABIEncoderV2: Fix invalid signature for events containing structs emitted in libraries.
28+
* Inline Assembly: Proper error message for missing variables.
29+
* Optimizer: Fix internal error related to unused tag removal across assemblies. This never generated any invalid code.
30+
* SMTChecker: Fix crash related to statically-sized arrays.
31+
* TypeChecker: Fix internal error and disallow index access on contracts and libraries.
32+
* Yul: Properly detect name clashes with functions before their declaration.
33+
* Yul: Take built-in functions into account in the compilability checker.
34+
* Yul Optimizer: Properly take reassignments to variables in sub-expressions into account when replacing in the ExpressionSimplifier.
35+
36+
37+
Build System:
38+
* Soltest: Add support for left-aligned, padded hex literals.
39+
* Soltest: Add support for right-aligned, padded boolean literals.
40+
141
### 0.5.4 (2019-02-12)
242

343
Language Features:

ReleaseChecklist.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,51 @@
1-
Checklist for making a release:
1+
## Checklist for making a release:
22

3+
### Requirements
4+
- [ ] Lauchpad (Ubuntu One) account
5+
- [ ] gnupg key (has to be version 1, gpg2 won't work) for `[email protected]` created and uploaded
6+
- [ ] Readthedocs account, access to the Solidity project
7+
- [ ] Write access to https://github.com/ethereum/homebrew-ethereum
8+
9+
### Pre-release
310
- [ ] Ensure that a Github project exists for the release.
411
- [ ] Check that all issues and pull requests from the Github project to be released are merged to ``develop``.
5-
- [ ] Create a commit in ``develop`` that updates the ``Changelog`` to include a release date (run ``./scripts/tests.sh`` to update the bug list). Sort the changelog entries alphabetically and correct any errors you notice.
12+
13+
### Changelog
14+
- [ ] Sort the changelog entries alphabetically and correct any errors you notice.
15+
- [ ] Create a commit on a new branch that updates the ``Changelog`` to include a release date.
16+
- [ ] Run ``./scripts/tests.sh`` to update the bug list.
617
- [ ] Create a pull request and wait for the tests, merge it.
18+
19+
### Create the Release
20+
- [ ] Create Github release page: https://github.com/ethereum/solidity/releases/new
21+
- [ ] On the release page, select the ``release`` branch as new target and set tag to the new version (e.g. `v0.5.4`) (make sure you only `SAVE DRAFT` instead of `PUBLISH RELEASE` before the actual release)
722
- [ ] Thank voluntary contributors in the Github release page (use ``git shortlog -s -n -e origin/release..origin/develop``).
823
- [ ] Create a pull request from ``develop`` to ``release``, wait for the tests, then merge it.
924
- [ ] Make a final check that there are no platform-dependency issues in the ``solidity-test-bytecode`` repository.
1025
- [ ] Wait for the tests for the commit on ``release``, create a release in Github, creating the tag.
11-
- [ ] Wait for the CI runs on the tag itself (they should push artifacts onto the Github release page).
12-
- [ ] Run ``scripts/create_source_tarball.sh`` while being on the tag to create the source tarball.
13-
- [ ] Upload the source tarball (in the upload directory) to the release page.
26+
- [ ] Wait for the CI runs on the tag itself (travis and appveyor should push artifacts onto the Github release page).
27+
- [ ] Run ``scripts/create_source_tarball.sh`` while being on the tag to create the source tarball. Make sure to create ``prerelease.txt`` before: (``echo -n > prerelease.txt``). This will create the tarball in a directory called ``upload``.
28+
- [ ] Take the tarball from the upload directory (its name should be ``solidity_x.x.x.tar.gz``, otherwise ``prerelease.txt`` was missing in the step before) and upload the source tarball to the release page.
29+
- [ ] Click the `PUBLISH RELEASE` button on the release page.
30+
31+
### PPA
32+
- [ ] Change ``scripts/release_ppa.sh`` to match your key's email and key id.
1433
- [ ] Run ``scripts/release_ppa.sh release`` to create the PPA release (you need the relevant openssl key).
15-
- [ ] Once the ``~ethereum/ubuntu/ethereum-static`` PPA build is finished and published for all platforms (make sure not to do this earlier), copy the static package to the ``~ethereum/ubuntu/ethereum`` PPA for the destination series ``Trusty`` and ``Xenial`` while selecting ``Copy existing binaries``.
16-
- [ ] Check that the Docker release was pushed to Docker Hub (this still seems to have problems, run ``./scripts/docker_deploy_manual.sh release``).
17-
- [ ] Update the homebrew realease in https://github.com/ethereum/homebrew-ethereum/blob/master/solidity.rb (version and hash)
34+
- [ ] Wait for the ``~ethereum/ubuntu/ethereum-static`` PPA build to be finished and published for *all platforms*. SERIOUSLY: DO NOT PROCEED EARLIER!!! *After* the static builds are *published*, copy the static package to the ``~ethereum/ubuntu/ethereum`` PPA for the destination series ``Trusty`` and ``Xenial`` while selecting ``Copy existing binaries``.
35+
- [ ] Check that the Docker release was pushed to Docker Hub (this still seems to have problems, run ``./scripts/docker_deploy_manual.sh v0.x.x``).
36+
37+
### Homebrew
38+
- [ ] Update the version and the hash (``sha256sum solidity_x.x.x.tar.gz``) in https://github.com/ethereum/homebrew-ethereum/blob/master/solidity.rb
39+
40+
### Documentation
1841
- [ ] Update the default version on readthedocs.
19-
- [ ] Make a release of ``solc-js``: Increment the version number, create a pull request for that, merge it after tests succeeded.
42+
43+
### Release solc-js
44+
- [ ] Increment the version number, create a pull request for that, merge it after tests succeeded.
2045
- [ ] Run ``npm publish`` in the updated ``solc-js`` repository.
2146
- [ ] Create a commit to increase the version number on ``develop`` in ``CMakeLists.txt`` and add a new skeleton changelog entry.
2247
- [ ] Merge ``release`` back into ``develop``.
48+
49+
### Post-release
2350
- [ ] Announce on Twitter and Reddit.
2451
- [ ] Lean back, wait for bug reports and repeat from step 1 :)

codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ codecov:
33
coverage:
44
range: 70...100
55
status:
6+
patch:
7+
default:
8+
target: "50%"
9+
paths: "!test/"
610
project:
711
default:
812
target: auto

docs/assembly.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ Note that the order of arguments can be seen to be reversed in non-functional st
162162
Opcodes marked with ``-`` do not push an item onto the stack (do not return a result),
163163
those marked with ``*`` are special and all others push exactly one item onto the stack (their "return value").
164164
Opcodes marked with ``F``, ``H``, ``B`` or ``C`` are present since Frontier, Homestead, Byzantium or Constantinople, respectively.
165-
Constantinople is still in planning and all instructions marked as such will result in an invalid instruction exception.
166165

167166
In the following, ``mem[a...b)`` signifies the bytes of memory starting at position ``a`` up to
168167
but not including position ``b`` and ``storage[p]`` signifies the storage contents at position ``p``.

docs/bugs_by_version.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,5 +628,9 @@
628628
"0.5.4": {
629629
"bugs": [],
630630
"released": "2019-02-12"
631+
},
632+
"0.5.5": {
633+
"bugs": [],
634+
"released": "2019-03-05"
631635
}
632636
}

docs/contributing.rst

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The option ``--no-smt`` disables the tests that require ``libz3`` and
9090
``--no-ipc`` disables those that require ``aleth``.
9191

9292
If you want to run the ipc tests (that test the semantics of the generated code),
93-
you need to install `aleth <https://github.com/ethereum/aleth/releases/download/v1.5.0-alpha.7/aleth-1.5.0-alpha.7-linux-x86_64.tar.gz>`_ and run it in testing mode: ``aleth --db memorydb --test -d /tmp/testeth``.
93+
you need to install `aleth <https://github.com/ethereum/aleth/releases/download/v1.5.2/aleth-1.5.2-linux-x86_64.tar.gz>`_ and run it in testing mode: ``aleth --db memorydb --test -d /tmp/testeth``.
9494

9595
To run the actual tests, use: ``./scripts/soltest.sh --ipcpath /tmp/testeth/geth.ipc``.
9696

@@ -326,3 +326,82 @@ escaping and without iterated replacements. An area can be delimited by ``<#name
326326
by as many concatenations of its contents as there were sets of variables supplied to the template system,
327327
each time replacing any ``<inner>`` items by their respective value. Top-level variables can also be used
328328
inside such areas.
329+
330+
.. _documentation-style:
331+
332+
Documentation Style Guide
333+
=========================
334+
335+
The following are style recommendations specifically for documentation
336+
contributions to Solidity.
337+
338+
English Language
339+
----------------
340+
341+
Use English, with British English spelling preferred, unless using project or brand names. Try to reduce the usage of
342+
local slang and references, making your language as clear to all readers as possible. Below are some references to help:
343+
344+
* `Simplified technical English <https://en.wikipedia.org/wiki/Simplified_Technical_English>`_
345+
* `International English <https://en.wikipedia.org/wiki/International_English>`_
346+
* `British English spelling <https://en.oxforddictionaries.com/spelling/british-and-spelling>`_
347+
348+
349+
.. note::
350+
351+
While the official Solidity documentation is written in English, there are community contributed :ref:`translations`
352+
in other languages available.
353+
354+
Title Case for Headings
355+
-----------------------
356+
357+
Use `title case <http://titlecase.com>`_ for headings. This means capitalise all principal words in
358+
titles, but not articles, conjunctions, and prepositions unless they start the
359+
title.
360+
361+
For example, the following are all correct:
362+
363+
* Title Case for Headings
364+
* For Headings Use Title Case
365+
* Local and State Variable Names
366+
* Order of Layout
367+
368+
Expand Contractions
369+
-------------------
370+
371+
Use expanded contractions for words, for example:
372+
373+
* "Do not" instead of "Don't".
374+
* "Can not" instead of "Can't".
375+
376+
Active and Passive Voice
377+
------------------------
378+
379+
Active voice is typically recommended for tutorial style documentation as it
380+
helps the reader understand who or what is performing a task. However, as the
381+
Solidity documentation is a mixture of tutorials and reference content, passive
382+
voice is sometimes more applicable.
383+
384+
As a summary:
385+
386+
* Use passive voice for technical reference, for example language definition and internals of the Ethereum VM.
387+
* Use active voice when describing recommendations on how to apply an aspect of Solidity.
388+
389+
For example, the below is in passive voice as it specifies an aspect of Solidity:
390+
391+
Functions can be declared ``pure`` in which case they promise not to read
392+
from or modify the state.
393+
394+
For example, the below is in active voice as it discusses an application of Solidity:
395+
396+
When invoking the compiler, you can specify how to discover the first element
397+
of a path, and also path prefix remappings.
398+
399+
Common Terms
400+
------------
401+
402+
* "Function parameters" and "return variables", not input and output parameters.
403+
404+
Code Examples
405+
-------------
406+
407+
* Ensure that all code examples begin with a ``pragma`` version that spans the largest where the contract code is valid. For example ``pragma solidity >=0.4.0 <0.6.0;``.

docs/control-structures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ You need to use the modifier ``payable`` with the ``info`` function because
9191
otherwise, the ``.value()`` option would not be available.
9292

9393
.. warning::
94-
Be careful that ``feed.info.value(10).gas(800)`` only locally sets the ``value`` and amount of ``gas`` sent with the function call, and the parentheses at the end perform the actual call. So in this case, the function is not called.
94+
Be careful that ``feed.info.value(10).gas(800)`` only locally sets the ``value`` and amount of ``gas`` sent with the function call, and the parentheses at the end perform the actual call. So in this case, the function is not called and the ``value`` and ``gas`` settings are lost.
9595

9696
Function calls cause exceptions if the called contract does not exist (in the
9797
sense that the account does not contain code) or if the called contract itself

0 commit comments

Comments
 (0)