Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
318 commits
Select commit Hold shift + click to select a range
ded7258
Swap key/value of methodIdentifiers
axic Mar 29, 2017
b7368ce
Fix input selector for evm
axic Mar 29, 2017
594f207
The metadata output is serialised
axic Mar 29, 2017
b62a694
Move the IR out of the EVM block in JSON IO
axic Apr 7, 2017
fea26bc
Rename legacyAssemblyJSON to legacyAssembly
axic Apr 7, 2017
c22ba03
Support selecting group of outputs
axic Apr 7, 2017
92fd66e
Document formattedMessage
axic Apr 7, 2017
e6f1335
Fix PostTypeChecker retaining state across contracts
federicobond Apr 8, 2017
623b8eb
Pull out ReadFile from CompilerStack
axic Apr 10, 2017
9fe2065
Merge pull request #2097 from ethereum/json-interface-docs
chriseth Apr 10, 2017
8cbe87b
Merge pull request #2111 from ethereum/readfile
chriseth Apr 10, 2017
b1db6ea
Introduce formatExceptionInformation
axic Mar 29, 2017
a182dfe
Remove empty wrapper formatError from jsonCompiler
axic Apr 10, 2017
bd48f18
Merge pull request #2098 from ethereum/sourceformatter
axic Apr 10, 2017
4d715e9
Implement missing assembly output functions and do not use PushString…
chriseth Apr 11, 2017
291ece2
List of known bugs.
chriseth Apr 12, 2017
a7e605a
Create and update bugs by version list.
chriseth Apr 12, 2017
feacfcf
Typo and more explanation.
chriseth Apr 12, 2017
10c3236
Prefix all optimizer bug names by Optimizer.
chriseth Apr 12, 2017
8ebea78
Initialize local variables.
chriseth Apr 12, 2017
e622110
Move gasEstimate into CompilerStack
axic Apr 10, 2017
d90fd43
Use new gasEstimate in jsonCompiler
axic Apr 10, 2017
328f2b0
Use new gasEstimate in CLI
axic Apr 10, 2017
3fbb48b
Exclude fallback function from the internal functions in estimateGas
axic Apr 10, 2017
fe4fcca
The gasEstimates objects must always be present in the jsonCompiler e…
axic Apr 11, 2017
54dcb0e
Keep gas values as a string in CompilerStack::gasEstimate
axic Apr 12, 2017
138c952
Merge pull request #2114 from ethereum/compilerstack-gasestimate
axic Apr 13, 2017
66165ff
Update common-patterns.rst
nrchandan Apr 14, 2017
98242f5
minor: fix formatting and grammar
Apr 15, 2017
ab0a0ab
Update index.rst
apmilen Apr 15, 2017
fb58809
Update contracts.rst
zoeyTM Apr 18, 2017
11d30ec
Some changes after review.
chriseth Apr 18, 2017
8e180d9
Merge pull request #2126 from dapphub/develop
chriseth Apr 18, 2017
fd109bb
Update bugs.rst
chriseth Apr 18, 2017
4694eae
Run bytecode upload only if encrypted variables are available.
chriseth Apr 18, 2017
d093f42
Merge pull request #2127 from morgansliman/patch-1
chriseth Apr 18, 2017
82628a8
Merge pull request #2125 from abrahamsangha/fix-typo-solidity-by-example
chriseth Apr 18, 2017
6ad7dcf
Merge pull request #2119 from ethereum/bugList
chriseth Apr 18, 2017
1927148
Merge pull request #2128 from ethereum/bytecodeNoPull
pirapira Apr 18, 2017
937397e
Merge pull request #2122 from nrchandan/patch-1
chriseth Apr 18, 2017
3cacea7
Merge pull request #2117 from ethereum/implementAsmOut
pirapira Apr 18, 2017
8bf8420
Support --allow-paths in the CLI
axic Apr 19, 2017
6468955
Merge pull request #2133 from ethereum/allow-path
chriseth Apr 20, 2017
bf074f3
Fix source index allocation in CompilerStack. Depending on compiler(o…
axic Apr 20, 2017
965de29
Merge pull request #2143 from ethereum/ast-index-fix
chriseth Apr 20, 2017
8c9e57f
Add --standard-json to solc
axic Feb 9, 2017
5754b13
Add StandardCompiler skeleton
axic Feb 9, 2017
985db17
Initial implementation of StandardCompiler
axic Feb 10, 2017
4f3c763
Export StandardCompiler as compileStandard in soljson
axic Mar 16, 2017
418759e
Catch exceptions of StandardCompiler
axic Mar 17, 2017
13fa440
Parse optimizer settings in StandardCompiler
axic Mar 17, 2017
81775b2
Parse libraries in StandardCompiler
axic Mar 17, 2017
ce87984
Parse remappings in StandardCompiler
axic Mar 17, 2017
f8cb076
Add formatFatalError() to StandardCompiler
axic Mar 21, 2017
4eaee77
Capture error messages from the JSON parser
axic Mar 29, 2017
115458c
Output legacyAssembly in StandardCompiler
axic Mar 29, 2017
50bb24a
Include source mapping identifier
axic Mar 29, 2017
5aec120
Support the AST output
axic Mar 29, 2017
2c15e2b
Fail if no sources are given
axic Mar 29, 2017
b3c6b1e
Refactor formatError
axic Mar 29, 2017
f25efce
Support proper error reporting in StandardCompiler
axic Mar 29, 2017
63b6d00
Support methodIdentifiers
axic Mar 29, 2017
a87dd17
Move opcodes inside the bytecode section
axic Mar 29, 2017
2df52ed
Support new assembly output
axic Mar 29, 2017
ad1fe86
Support linkReferences
axic Mar 30, 2017
ef559de
Properly split contract filename and name
axic Mar 30, 2017
df7e703
Support the metadata.useLiteralContent setting
axic Mar 30, 2017
77d5148
Reject import URLs for now
axic Mar 30, 2017
b513db7
Support gas estimates in StandardCompiler
axic Apr 10, 2017
aa0776d
Support Why3 in StandardCompiler
axic Apr 11, 2017
413c146
Enclose local functions in a namespace
axic Apr 19, 2017
6d13260
Pull out collectEVMObject
axic Apr 19, 2017
f71b465
Ensure the language field is present in the JSON
axic Apr 19, 2017
10ec334
Add basic tests for StandardCompiler
axic Apr 19, 2017
137ef78
Trigger cases by the JSON (and not string) interface
axic Apr 19, 2017
a24ac2f
Add compilation test and verify output
axic Apr 19, 2017
6ae7a87
Rename ast to legacyAST in StandardCompiler
axic Apr 19, 2017
5732ffd
Update changelog
axic Apr 19, 2017
c29da75
Add test for bytecode
axic Apr 20, 2017
74373ec
Add test for legacyAST
axic Apr 20, 2017
b30fad4
Check for path permissions before opening file in the CLI file reader
axic Apr 20, 2017
2ccbc08
Merge pull request #1639 from ethereum/json-interface-api
axic Apr 20, 2017
ed64c84
Merge pull request #2145 from ethereum/cli-readfile-permissions
axic Apr 20, 2017
4566b4b
Pass readFileCallback to StandardCompiler in CLI
axic Apr 19, 2017
3fb0072
Added link to example for ecrecover
zoeyTM Apr 21, 2017
9bc9fe6
Warn about side-effect free statements.
chriseth Apr 21, 2017
1ac7056
Correct syntax and link to question.
chriseth Apr 21, 2017
e3eea9f
Merge pull request #2151 from morgansliman/patch-2
chriseth Apr 21, 2017
937695b
Change error message.
chriseth Apr 21, 2017
c5f182d
Merge pull request #2150 from ethereum/jsonio-support-readcallback
chriseth Apr 21, 2017
8de02c7
Support URL sources in StandardCompiler
axic Apr 19, 2017
aad64d8
Test for side-effect free condition.
chriseth Apr 21, 2017
c76e0a5
Changed const reference to value.
chriseth Apr 21, 2017
aa44166
Merge pull request #2144 from ethereum/jsonio-url-sources
axic Apr 22, 2017
b7951be
Add exception guard to ReadFileCallback in CLI
axic Apr 20, 2017
c82a203
Document that the ReadFileCallback should not emit exceptions
axic Apr 21, 2017
cd5fc7a
Update atom-ethereum-interface name change
0mkara Apr 23, 2017
a9f4215
Merge pull request #2155 from ethereum/guard-readcallback
chriseth Apr 24, 2017
e24c35b
Be a bit more verbose and capture Boost exceptions in StandardCompiler
axic Apr 23, 2017
4a3fb96
Enable standard json in the docs
axic Apr 24, 2017
3cd02ca
Change error type names to not include spaces
axic Apr 24, 2017
43eb839
Do not fail if parsing failed in StandardCompiler
axic Apr 24, 2017
017fede
Add missing space.
chriseth Apr 24, 2017
388486b
Merge pull request #2162 from ethereum/chriseth-patch-1
axic Apr 24, 2017
4a9ba5b
Verify supplied hash in JSON I/O
axic Apr 22, 2017
2c3fea5
Merge pull request #2159 from ethereum/jsonio-source-verify
chriseth Apr 24, 2017
d3b8d5f
Merge pull request #2161 from ethereum/jsonio-cleanup
chriseth Apr 24, 2017
4eae971
Export compileStandard on emscripten
axic Apr 24, 2017
6202664
Merge pull request #2163 from ethereum/jsonio-enable-emscripten
chriseth Apr 24, 2017
9577f87
More pure tests.
chriseth Apr 24, 2017
0b2a05c
Merge pull request #2160 from 0mkara/patch-2
chriseth Apr 24, 2017
4d111e3
Merge pull request #2152 from ethereum/warnRevert
chriseth Apr 24, 2017
2f66c69
Do not crash on invalid JSON input
axic Apr 24, 2017
5e7a643
Catch jsoncpp exceptions
axic Apr 24, 2017
c3b839c
Merge pull request #2164 from ethereum/jsonio-catch-internal-exceptions
chriseth Apr 25, 2017
8387d0d
test: add a test about gas costs of EXP
pirapira Jan 5, 2017
00b15d5
Add a failing test about the gas cost of BALANCE
pirapira Jan 5, 2017
259c551
test: add a failing test case about the gas cost of SUICIDE opcode
pirapira Jan 5, 2017
7da9ba6
test: add a test case about the gas cost of EXTCODESIZE
pirapira Jan 5, 2017
f2775f8
libevmadm: EIP150.a changes on EXTCODE, EXTCODESIZE and BALANCE
pirapira Jan 16, 2017
e54a3ea
libevmasm: EIP150.a changes on SLOAD, CALL, CALLCODE, DELEGATECALL an…
pirapira Jan 16, 2017
4e24639
libevmasm: EIP150.c gas change
pirapira Jan 16, 2017
56e4b82
libevmasm: reflect EIP 160 gas schedule change
pirapira Jan 17, 2017
a1da033
Changelog: add a point about fee schedule update
pirapira Jan 17, 2017
f6f271d
test: change RPC settings to see if they have effects during testing
pirapira Jan 18, 2017
362813f
libevmasm: add a break
pirapira Feb 9, 2017
1caf1f0
Test using eth from docker.
chriseth Feb 8, 2017
ed32a57
Run tests in docker only on Travis
axic Feb 13, 2017
cc1d5e4
Do not install eth from PPA for CI.
chriseth Feb 17, 2017
dae5f7d
Fix test script.
chriseth Feb 20, 2017
ed5b63f
A bit more time for mining.
chriseth Feb 20, 2017
5176784
libevmasm: fix sloadGas in another file
pirapira Feb 24, 2017
cee54de
test: fix invalid signatures
pirapira Feb 24, 2017
3c4c4ab
Remove a test about SELFDESTRUCT because the test harness obtains ref…
pirapira Feb 25, 2017
ff00a14
Increase mining timeout to 2 minutes
axic Mar 16, 2017
e1689b6
Also increase socket read timeout.
chriseth Mar 20, 2017
38211fd
Just bigger numbers
pirapira Apr 11, 2017
cdc64e3
Use fixed binary for eth.
chriseth Apr 18, 2017
8758d9f
Install eth (including dependencies).
chriseth Apr 19, 2017
89bb8cb
Update shasum to new eth version.
chriseth Apr 25, 2017
72fdf75
Register functions.
chriseth Feb 17, 2017
5d6747e
Refactor assembly analysis into scope filling and checking.
chriseth Feb 17, 2017
e0849f2
Split external identifier access into resolving and code generation.
chriseth Mar 14, 2017
c6fa78c
Use actual type checking phase of assembler.
chriseth Mar 21, 2017
c4a0826
Add some missing error locations.
chriseth Mar 22, 2017
f13c8af
Make tests comply with stack height checks.
chriseth Mar 22, 2017
580921b
Perform stack height checks in assembly analysis phase.
chriseth Mar 22, 2017
4755757
Remove some errors checks from code generation (was moved to analysis…
chriseth Mar 22, 2017
3f1f031
Use raw string for tests.
chriseth Mar 22, 2017
83bf34c
Review comments and cleanup.
chriseth Mar 22, 2017
3471783
Review comments.
chriseth Apr 11, 2017
b622c2e
Only run stack filler on AST elements that are or contain declarations.
chriseth Apr 11, 2017
f19e6a0
Check again that instruction argument count is correct.
chriseth Apr 11, 2017
dfaab73
Only allow access to local variables and only if they have a stack si…
chriseth Apr 11, 2017
4afd54b
Convert storge access tests to new explicit slot / offset access.
chriseth Apr 12, 2017
dfb7d5e
Move analysis out of code generator.
chriseth Apr 12, 2017
5f4b68e
Another stack check.
chriseth Apr 21, 2017
478f299
Storage access from inline assembly.
chriseth Apr 21, 2017
978884d
Build fix.
chriseth Apr 21, 2017
fa467c3
Fix test build
axic Apr 21, 2017
0ebaf22
Fix refactoring error.
chriseth Apr 24, 2017
3df7b06
Pass internal resolver to assembly analyzer.
chriseth Apr 24, 2017
e841b23
Special case for storage types with offset zero.
chriseth Apr 25, 2017
1d712c7
Fix storage access tests.
chriseth Apr 25, 2017
e64a03d
Changelog entry.
chriseth Apr 25, 2017
6c9dcaf
Mention the order of the ABI in metadata
axic Apr 25, 2017
8a5feb8
Explain that bytecode depends on metadata
axic Apr 25, 2017
a46a059
Document storage variable access.
chriseth Apr 26, 2017
6821838
Store stack height in analysis phase.
chriseth Apr 26, 2017
ea6d925
Option to disable/remove all tests that require IPC.
chriseth Apr 26, 2017
b024fce
Do not run IPC tests on windows.
chriseth Apr 26, 2017
efa9c76
Update Changelog.md
chriseth Apr 26, 2017
3cbdf6d
Merge pull request #1577 from ethereum/gas_table
chriseth Apr 26, 2017
c02bcae
Merge pull request #2168 from ethereum/docs-metadata-clarify
axic Apr 26, 2017
f3ec2ba
Refactor to combined scope and stack height info.
chriseth Apr 26, 2017
d7b3ce2
Check stack height during code generation.
chriseth Apr 26, 2017
2002447
Mention requirement changes in changelog
axic Apr 26, 2017
2c1fb46
Merge pull request #1711 from ethereum/asmfunctions
chriseth Apr 26, 2017
35f1cf9
Remove parentheses from around function return parameters
axic Apr 26, 2017
99a7aef
refactoring parse() into two separate functions
djudjuu Apr 26, 2017
5fd7942
documentation, checks and renaming
djudjuu Apr 27, 2017
abe77f4
Merge pull request #2184 from ethereum/julia-parentheses
axic Apr 27, 2017
cd29a03
Update the gasEstimates in JSON I/O
axic Apr 27, 2017
122dc65
Merge pull request #2188 from ethereum/docs-jsonio
axic Apr 27, 2017
54210ea
Add recomputation check for number representation.
chriseth Apr 3, 2017
c1e14d0
Use OptimizerException to report error
chriseth Apr 27, 2017
0e91b8f
Do not use the member in checkRepresentation
axic Apr 27, 2017
b48bc81
Add flag for JULIA parsing
axic Apr 26, 2017
8b79517
Do not validate identifiers against EVM instructions in JULIA
axic Apr 27, 2017
16276ab
Catch assembler exceptions and throw readable Solidity exceptions
axic Apr 27, 2017
2c8b770
Merge pull request #2187 from ethereum/testOptimizer
axic Apr 27, 2017
b0485e3
Make assembler errors fatal
axic Apr 27, 2017
99dd28d
Add constant optimizer testing to the fuzz tester.
chriseth Apr 6, 2017
3a93aec
Make the fuzzer quiet
chriseth Apr 27, 2017
28902f9
Add --standard-json option to solfuzzer
axic Apr 26, 2017
a8cf9f8
Merge pull request #2183 from ethereum/fuzzer-jsonio
chriseth Apr 27, 2017
3926e87
Merge pull request #2190 from ethereum/catch-asm-exceptions
chriseth Apr 27, 2017
01b60a4
Add flag for JULIA parsing
axic Apr 26, 2017
8020144
Do not validate identifiers against EVM instructions in JULIA
axic Apr 27, 2017
20206a0
Disallow assign from stack in Julia (=: var)
axic Apr 27, 2017
6776be3
Merge pull request #2189 from ethereum/julia-instructions
chriseth Apr 27, 2017
f9bccab
Merge pull request #2193 from ethereum/julia-assign-stack
chriseth Apr 27, 2017
45f8c5a
enumchecks not working
djudjuu Apr 28, 2017
fc3f40f
Add warning about SAR in docs
chfast Apr 28, 2017
a6306a1
error fixed
djudjuu Apr 28, 2017
f33614e
Merge pull request #2171 from ethereum/splitParseAndAnalyze
chriseth Apr 28, 2017
e9954eb
conditional reset of compilerState-Enum
djudjuu Apr 28, 2017
e544698
Deprecate use of unary '+'
roadriverrail Apr 29, 2017
4658c4f
Added Doxity in the Solidity Tools section
AdrianClv Apr 29, 2017
fabf15d
Update units-and-global-variables.rst
FedericoCapello May 1, 2017
daa8db8
Correct form-from typo in layout-of-source-files.rst
JohnAllen May 1, 2017
5aeb635
Merge pull request #2200 from AdrianClv/develop
axic May 2, 2017
f77f212
Merge pull request #2203 from JohnAllen/develop
axic May 2, 2017
2891b98
Merge pull request #2110 from federicobond/fix-posttypechecker
chriseth May 2, 2017
e2f00c9
Stricter tests for constant optimization.
chriseth Apr 3, 2017
5c4f3f6
Fix number representation bug.
chriseth Apr 3, 2017
d87eb97
Add entry to bug list.
chriseth Apr 27, 2017
d8b76e1
Merge pull request #2172 from ethereum/docs-sar
chriseth May 2, 2017
f42a9a9
Merge pull request #2198 from ethereum/conditionalCompilerStateReset
chriseth May 2, 2017
9687068
Style and stricter tests.
chriseth May 2, 2017
2871663
Remove why3 from standard compiler
axic May 2, 2017
1b15291
Merge pull request #2201 from FedericoCapello/patch-1
chriseth May 2, 2017
084ab41
Merge pull request #2210 from ethereum/jsonio-remove-why3
chriseth May 2, 2017
acab525
Merge pull request #2199 from roadriverrail/no_unary_plus
chriseth May 2, 2017
ed3ab35
Follow the JSON I/O spec closely
axic May 2, 2017
b976d53
Add parentheses for readability.
chriseth May 2, 2017
c09f071
Merge pull request #2211 from ethereum/jsonio-fixes
axic May 2, 2017
794a390
Fix keys for bugs.json.
chriseth May 3, 2017
a40c8cf
Warn on unused local variables
roadriverrail Apr 14, 2017
a6faa5a
Treat returns with expressions as return param use
roadriverrail Apr 28, 2017
e0266b7
Refactor: Combine bool and function pointer.
chriseth May 2, 2017
1f058ea
Revert changes to standard token.
chriseth May 2, 2017
e3ed362
More strict tests.
chriseth May 2, 2017
230f51e
Cleanup, style and additional test.
chriseth May 2, 2017
f3bb735
Fix tests.
chriseth May 3, 2017
1aa0f77
Merge pull request #2139 from roadriverrail/warn_unused
chriseth May 3, 2017
00933b9
Merge pull request #2206 from ethereum/fixoptimizer
chriseth May 3, 2017
2b4b86a
Update common-patterns.rst
Apr 19, 2017
7e838fd
Cleanup to make the docs more consistent.
chriseth May 2, 2017
d58a4e0
Corrections and some style.
chriseth May 2, 2017
e9458be
Parentheses.
chriseth May 3, 2017
dbbd8d6
Finalize changelog.
chriseth May 3, 2017
b6c37dd
Merge pull request #2215 from ethereum/changelog
chriseth May 3, 2017
bd6e891
Fix return value in the fuzzer.
chriseth May 3, 2017
d92fbe6
Merge pull request #2216 from ethereum/compilerfix
chriseth May 3, 2017
4af0451
Merge pull request #2207 from ethereum/wski-develop
chriseth May 3, 2017
9fd34bf
Update bug list.
chriseth May 3, 2017
a0967a4
Merge pull request #2217 from ethereum/buglist
chriseth May 3, 2017
9df7a6f
Update permalink for optimizer bug and fix release date.
chriseth May 3, 2017
34b28ed
Merge pull request #2218 from ethereum/buglist
chriseth May 3, 2017
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.commit_hash.txt
.prerelease.txt
commit_hash.txt
prerelease.txt

# Compiled Object files
*.slo
Expand Down
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ env:
- SOLC_INSTALL_DEPS_TRAVIS=On
- SOLC_RELEASE=On
- SOLC_TESTS=On
- SOLC_STOREBYTECODE=Off
- SOLC_DOCKER=Off

matrix:
Expand All @@ -61,13 +62,15 @@ matrix:
compiler: gcc
env:
- ZIP_SUFFIX=ubuntu-trusty
- SOLC_STOREBYTECODE=On

- os: linux
dist: trusty
sudo: required
compiler: clang
env:
- ZIP_SUFFIX=ubuntu-trusty-clang
- SOLC_STOREBYTECODE=On

# Documentation target, which generates documentation using Phoenix / ReadTheDocs.
- os: linux
Expand Down Expand Up @@ -113,6 +116,8 @@ matrix:
- SOLC_INSTALL_DEPS_TRAVIS=Off
- SOLC_RELEASE=Off
- SOLC_TESTS=Off
- ZIP_SUFFIX=emscripten
- SOLC_STOREBYTECODE=On

# OS X Mavericks (10.9)
# https://en.wikipedia.org/wiki/OS_X_Mavericks
Expand Down Expand Up @@ -175,18 +180,20 @@ cache:
install:
- test $SOLC_INSTALL_DEPS_TRAVIS != On || (scripts/install_deps.sh)
- test "$TRAVIS_OS_NAME" != "linux" || (scripts/install_cmake.sh)
- if [ "$TRAVIS_BRANCH" = release ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt
- test $SOLC_DOCKER != On || (docker build -t ethereum/solc:build -f scripts/Dockerfile .)

before_script:
- test $SOLC_EMSCRIPTEN != On || (scripts/build_emscripten.sh)
- test $SOLC_DOCKER != On || (scripts/docker_build.sh)
- test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE
&& scripts/release.sh $ZIP_SUFFIX
&& scripts/create_source_tarball.sh)

script:
- test $SOLC_DOCS != On || (scripts/docs.sh)
- test $SOLC_TESTS != On || (cd $TRAVIS_BUILD_DIR && scripts/tests.sh)
- test $SOLC_STOREBYTECODE != On || (cd $TRAVIS_BUILD_DIR && scripts/bytecodecompare/storebytecode.sh)

deploy:
# This is the deploy target for the Emscripten build.
Expand Down Expand Up @@ -223,11 +230,8 @@ deploy:

overwrite: true
file_glob: true
file:
- $TRAVIS_BUILD_DIR/solidity*.zip
- $TRAVIS_BUILD_DIR/solidity*tar.gz
file: $TRAVIS_BUILD_DIR/upload/*
skip_cleanup: true
on:
all_branches: true
tags: true
condition: $SOLC_RELEASE == On
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(EthPolicy)
eth_policy()

# project name and version should be set after cmake_policy CMP0048
set(PROJECT_VERSION "0.4.10")
set(PROJECT_VERSION "0.4.11")
project(solidity VERSION ${PROJECT_VERSION})

# Let's find our dependencies
Expand Down
24 changes: 24 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
### 0.4.11 (2017-05-03)

Features:
* Implement the Standard JSON Input / Output API
* Support ``interface`` contracts.
* C API (``jsonCompiler``): Add the ``compileStandard()`` method to process a Standard JSON I/O.
* Commandline interface: Add the ``--standard-json`` parameter to process a Standard JSON I/O.
* Commandline interface: Support ``--allow-paths`` to define trusted import paths. Note: the
path(s) of the supplied source file(s) is always trusted.
* Inline Assembly: Storage variable access using ``_slot`` and ``_offset`` suffixes.
* Inline Assembly: Disallow blocks with unbalanced stack.
* Static analyzer: Warn about statements without effects.
* Static analyzer: Warn about unused local variables, parameters, and return parameters.
* Syntax checker: issue deprecation warning for unary '+'

Bugfixes:
* Assembly output: Implement missing AssemblyItem types.
* Compiler interface: Fix a bug where source indexes could be inconsistent between Solidity compiled
with different compilers (clang vs. gcc) or compiler settings. The bug was visible in AST
and source mappings.
* Gas Estimator: Reflect the most recent fee schedule.
* Type system: Contract inheriting from base with unimplemented constructor should be abstract.
* Optimizer: Number representation bug in the constant optimizer fixed.

### 0.4.10 (2017-03-15)

Features:
Expand Down
18 changes: 13 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ branches:
os: Visual Studio 2015
configuration:
- RelWithDebInfo
environment:
# This is used for pushing to solidity-test-bytecodes
priv_key:
secure: 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
# NB: Appveyor cache is disabled, because it is proving very unreliable.
# We can re-enable it when we find a way to mitigate the unreliability
# issues. Have automated builds be reliable is the more important thing.
Expand All @@ -43,7 +47,14 @@ configuration:
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
- ps: $fileContent += $env:priv_key.Replace(' ', "`n")
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
- git submodule update --init --recursive
- ps: $prerelease = "nightly."
- ps: $prerelease += Get-Date -format "yyyy.M.d"
- ps: Set-Content prerelease.txt $prerelease
- scripts/install_deps.bat
- set ETHEREUM_DEPS_PATH=%APPVEYOR_BUILD_FOLDER%\deps\install
before_build:
Expand All @@ -54,15 +65,12 @@ build_script:
- msbuild solidity.sln /p:Configuration=%CONFIGURATION% /m:%NUMBER_OF_PROCESSORS% /v:minimal
- cd %APPVEYOR_BUILD_FOLDER%
- scripts\release.bat %CONFIGURATION%
- scripts\bytecodecompare\storebytecode.bat %CONFIGURATION% %APPVEYOR_REPO_COMMIT%

test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- cd deps\install\x64\eth
- ps: $ethProc = Start-Process eth.exe --test
- ps: Start-Sleep -s 100
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
- copy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" .
- soltest.exe --show-progress -- --ipcpath \\.\pipe\geth.ipc
- soltest.exe --show-progress -- --no-ipc

artifacts:
- path: solidity-windows.zip
Expand Down
27 changes: 13 additions & 14 deletions docs/assembly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ differs from standalone assembly and then specify assembly itself.

TODO: Write about how scoping rules of inline assembly are a bit different
and the complications that arise when for example using internal functions
of libraries. Furhermore, write about the symbols defined by the compiler.
of libraries. Furthermore, write about the symbols defined by the compiler.

Inline Assembly
===============
Expand All @@ -29,7 +29,7 @@ arising when writing manual assembly by the following features:
* labels: ``let x := 10 repeat: x := sub(x, 1) jumpi(repeat, eq(x, 0))``
* loops: ``for { let i := 0 } lt(i, x) { i := add(i, 1) } { y := mul(2, y) }``
* switch statements: ``switch x case 0: { y := mul(x, 2) } default: { y := 0 }``
* function calls: ``function f(x) -> (y) { switch x case 0: { y := 1 } default: { y := mul(x, f(sub(x, 1))) } }``
* function calls: ``function f(x) -> y { switch x case 0: { y := 1 } default: { y := mul(x, f(sub(x, 1))) } }``

.. note::
Of the above, loops, function calls and switch statements are not yet implemented.
Expand Down Expand Up @@ -323,9 +323,12 @@ Access to External Variables and Functions
------------------------------------------

Solidity variables and other identifiers can be accessed by simply using their name.
For storage and memory variables, this will push the address and not the value onto the
stack. Also note that non-struct and non-array storage variable addresses occupy two slots
on the stack: One for the address and one for the byte offset inside the storage slot.
For memory variables, this will push the address and not the value onto the
stack. Storage variables are different: Values in storage might not occupy a
full storage slot, so their "address" is composed of a slot and a byte-offset
inside that slot. To retrieve the slot pointed to by the variable ``x``, you
used ``x_slot`` and to retrieve the byte-offset you used ``x_offset``.

In assignments (see below), we can even use local Solidity variables to assign to.

Functions external to inline assembly can also be accessed: The assembly will
Expand All @@ -340,17 +343,13 @@ changes during the call, and thus references to local variables will be wrong.

.. code::

pragma solidity ^0.4.0;
pragma solidity ^0.4.11;

contract C {
uint b;
function f(uint x) returns (uint r) {
assembly {
b pop // remove the offset, we know it is zero
sload
x
mul
=: r // assign to return variable r
r := mul(x, sload(b_slot)) // ignore the offset, we know it is zero
}
}
}
Expand Down Expand Up @@ -567,7 +566,7 @@ The following example implements the power function by square-and-multiply.
.. code::

assembly {
function power(base, exponent) -> (result) {
function power(base, exponent) -> result {
switch exponent
0: { result := 1 }
1: { result := base }
Expand Down Expand Up @@ -702,12 +701,12 @@ The following assembly will be generated::
}
default: { jump(invalidJumpLabel) }
// memory allocator
function $allocate(size) -> (pos) {
function $allocate(size) -> pos {
pos := mload(0x40)
mstore(0x40, add(pos, size))
}
// the contract function
function f(x) -> (y) {
function f(x) -> y {
y := 1
for { let i := 0 } lt(i, x) { i := add(i, 1) } {
y := mul(2, y)
Expand Down
103 changes: 103 additions & 0 deletions docs/bugs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
[
{
"name": "ConstantOptimizerSubtraction",
"summary": "In some situations, the optimizer replaces certain numbers in the code with routines that compute different numbers.",
"description": "The optimizer tries to represent any number in the bytecode by routines that compute them with less gas. For some special numbers, an incorrect routine is generated. This could allow an attacker to e.g. trick victims about a specific amount of ether, or function calls to call different functions (or none at all).",
"link": "https://blog.ethereum.org/2017/05/03/solidity-optimizer-bug/",
"fixed": "0.4.11",
"severity": "low",
"conditions": {
"optimizer": true
}
},
{
"name": "IdentityPrecompileReturnIgnored",
"summary": "Failure of the identity precompile was ignored.",
"description": "Calls to the identity contract, which is used for copying memory, ignored its return value. On the public chain, calls to the identity precompile can be made in a way that they never fail, but this might be different on private chains.",
"severity": "low",
"fixed": "0.4.7"
},
{
"name": "OptimizerStateKnowledgeNotResetForJumpdest",
"summary": "The optimizer did not properly reset its internal state at jump destinations, which could lead to data corruption.",
"description": "The optimizer performs symbolic execution at certain stages. At jump destinations, multiple code paths join and thus it has to compute a common state from the incoming edges. Computing this common state was simplified to just use the empty state, but this implementation was not done properly. This bug can cause data corruption.",
"severity": "medium",
"introduced": "0.4.5",
"fixed": "0.4.6",
"conditions": {
"optimizer": true
}
},
{
"name": "HighOrderByteCleanStorage",
"summary": "For short types, the high order bytes were not cleaned properly and could overwrite existing data.",
"description": "Types shorter than 32 bytes are packed together into the same 32 byte storage slot, but storage writes always write 32 bytes. For some types, the higher order bytes were not cleaned properly, which made it sometimes possible to overwrite a variable in storage when writing to another one.",
"link": "https://blog.ethereum.org/2016/11/01/security-alert-solidity-variables-can-overwritten-storage/",
"severity": "high",
"introduced": "0.1.6",
"fixed": "0.4.4"
},
{
"name": "OptimizerStaleKnowledgeAboutSHA3",
"summary": "The optimizer did not properly reset its knowledge about SHA3 operations resulting in some hashes (also used for storage variable positions) not being calculated correctly.",
"description": "The optimizer performs symbolic execution in order to save re-evaluating expressions whose value is already known. This knowledge was not properly reset across control flow paths and thus the optimizer sometimes thought that the result of a SHA3 operation is already present on the stack. This could result in data corruption by accessing the wrong storage slot.",
"severity": "medium",
"fixed": "0.4.3",
"conditions": {
"optimizer": true
}
},
{
"name": "LibrariesNotCallableFromPayableFunctions",
"summary": "Library functions threw an exception when called from a call that received Ether.",
"description": "Library functions are protected against sending them Ether through a call. Since the DELEGATECALL opcode forwards the information about how much Ether was sent with a call, the library function incorrectly assumed that Ether was sent to the library and threw an exception.",
"severity": "low",
"introduced": "0.4.0",
"fixed": "0.4.2"
},
{
"name": "SendFailsForZeroEther",
"summary": "The send function did not provide enough gas to the recipient if no Ether was sent with it.",
"description": "The recipient of an Ether transfer automatically receives a certain amount of gas from the EVM to handle the transfer. In the case of a zero-transfer, this gas is not provided which causes the recipient to throw an exception.",
"severity": "low",
"fixed": "0.4.0"
},
{
"name": "DynamicAllocationInfiniteLoop",
"summary": "Dynamic allocation of an empty memory array caused an infinite loop and thus an exception.",
"description": "Memory arrays can be created provided a length. If this length is zero, code was generated that did not terminate and thus consumed all gas.",
"severity": "low",
"fixed": "0.3.6"
},
{
"name": "OptimizerClearStateOnCodePathJoin",
"summary": "The optimizer did not properly reset its internal state at jump destinations, which could lead to data corruption.",
"description": "The optimizer performs symbolic execution at certain stages. At jump destinations, multiple code paths join and thus it has to compute a common state from the incoming edges. Computing this common state was not done correctly. This bug can cause data corruption, but it is probably quite hard to use for targeted attacks.",
"severity": "low",
"fixed": "0.3.6",
"conditions": {
"optimizer": true
}
},
{
"name": "CleanBytesHigherOrderBits",
"summary": "The higher order bits of short bytesNN types were not cleaned before comparison.",
"description": "Two variables of type bytesNN were considered different if their higher order bits, which are not part of the actual value, were different. An attacker might use this to reach seemingly unreachable code paths by providing incorrectly formatted input data.",
"severity": "medium/high",
"fixed": "0.3.3"
},
{
"name": "ArrayAccessCleanHigherOrderBits",
"summary": "Access to array elements for arrays of types with less than 32 bytes did not correctly clean the higher order bits, causing corruption in other array elements.",
"description": "Multiple elements of an array of values that are shorter than 17 bytes are packed into the same storage slot. Writing to a single element of such an array did not properly clean the higher order bytes and thus could lead to data corruption.",
"severity": "medium/high",
"fixed": "0.3.1"
},
{
"name": "AncientCompiler",
"summary": "This compiler version is ancient and might contain several undocumented or undiscovered bugs.",
"description": "The list of bugs is only kept for compiler versions starting from 0.3.0, so older versions might contain undocumented bugs.",
"severity": "high",
"fixed": "0.3.0"
}
]
Loading