github ethereum/solidity v0.8.1
Version 0.8.1

latest releases: v0.8.25, v0.8.24, v0.8.23...
3 years ago

Solidity 0.8.1 introduces many new features for the SMTChecker, updates the emscripten version for building soljson.js to 2.0.12, allows to catch panic errors and adds other small improvements.

For a detailed explanation of the new features and changes, please see the blog post.

Language Features:

  • Possibility to use catch Panic(uint code) to catch a panic failure from an external call.

Compiler Features:

  • Code Generator: Reduce the cost of <address>.code.length by using extcodesize directly.
  • Command Line Interface: Allow = as separator between library name and address in --libraries commandline option.
  • Command Line Interface: New option --model-checker-targets allows specifying which targets should be checked. The valid options are all, constantCondition, underflow, overflow, divByZero, balance, assert, popEmptyArray, where the default is all. Multiple targets can be chosen at the same time, separated by a comma without spaces: underflow,overflow,assert.
  • Command Line Interface: Only accept library addresses with a prefix of 0x in --libraries commandline option.
  • Optimizer: Add rule to replace iszero(sub(x,y)) by eq(x,y).
  • Parser: Report meaningful error if parsing a version pragma failed.
  • SMTChecker: Output internal and trusted external function calls in a counterexample's transaction trace.
  • SMTChecker: Show msg.value in counterexample transaction traces when greater than 0.
  • SMTChecker: Show contract name in counterexample function call.
  • SMTChecker: Support ABI functions as uninterpreted functions.
  • SMTChecker: Support try/catch statements.
  • SMTChecker: Synthesize untrusted functions called externally.
  • SMTChecker: Use checked arithmetic by default and support unchecked blocks.
  • Standard JSON: New option modelCheckerSettings.targets allows specifying which targets should be checked. The valid options are all, constantCondition, underflow, overflow, divByZero, balance, assert, popEmptyArray, where the default is all. Multiple targets can be chosen at the same time, separated by a comma without spaces: underflow,overflow,assert.

Bugfixes:

  • Code Generator: Fix length check when decoding malformed error data in catch clause.
  • Control Flow Graph: Fix missing error caused by read from/write to uninitialized variables.
  • SMTChecker: Fix false negatives in overriding modifiers and functions.
  • SMTChecker: Fix false negatives in the presence of inline assembly.
  • SMTChecker: Fix false negatives when analyzing external function calls.
  • SMTChecker: Fix internal error on block.chainid.
  • SMTChecker: Fix internal error on pushing string literal to bytes array.
  • SMTChecker: Fix missing type constraints for block variables.
  • Type Checker: Fix infinite loop when accessing circular constants from inline assembly.
  • Type Checker: Fix internal error caused by constant structs containing mappings.
  • Type System: Disallow implicit conversion from uintN to intM when M > N, and by extension, explicit conversion between the same types is also disallowed.

Build System:

  • Update the soljson.js build to emscripten 2.0.12 and boost 1.75.0.

We especially thank all the contributors that made this release possible:

a3d4, Alex Beregszaszi, Alexander Arlt, az1az1, Bhargava Shastry, BinacsLee, Daniel Kirchner, Dmytro, Đorđe Mijović, Greg Stretton, Harikrishnan Mulackal, Harry Altman, Hui Yu, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann, smareasy,
Suriyaa Sundararuban,

If you want to perform a source build, please only use solidity_0.8.0.tar.gz and not the zip provided by github directly.

Don't miss a new solidity release

NewReleases is sending notifications on new releases.