Releases: ConsenSysDiligence/scribble
v0.5.5
This is a patch release that changes scribble behavior to not always generate bytecode when compiling.
Specifically in files and flat mode, ir/bytecode generation will not be performed, thus avoiding unrelated failures due to stack limitation violations without proper optimizer settings for example.
Note that if we are compiling in json mode then bytecode generation will still be performed on the final flattened and instrumented code.
v0.5.4
This PR adds:
Language Features:
- Support for assertions in side functions with the new
#assert
CLI:
- Adds a new
--compiler-settingsflag that allows arbitrary settings to be passed to the underlying solidity compiler (e.g.--compiler-settings '{"optimizer": {"enabled": true, "runs": 200}}'. Note the use of single and double quotes) - Change debug event signatures format in instrumentation metadata to be more generic, and handle cases where multiple shadowing identifiers are present in annotations
Bug Fixes:
- Fix crash when instrumenting code with public variable accessor calls
- Fix crash when tuples in ternary operators are encountered
- Fix crash on circular imports
- Fix crash when both InheritanceSpecifiers and ModifierInvocations for the same base contract are present
- Fix incorrect handling of imports in Scribble
- Fix bug in arming code with cutom maps and solidty < 0.8.6
v0.5.3
v0.5.2
This release brings:
-
Support for Solidity 0.8.4, 0.8.5 and 0.8.6
-
Extends the universal quantification support to work over maps. (i.e.
forall (address a in m) ...wheremis a map works now) -
Adds the new builtin
unchecked_sum()function, which returns the sum of all values in a numeric map/array. As the name suggests, the sum may overflow, and should be used with carefully. -
The debug events emitted with
--debug-eventshave been changed to a new simpler format, and now support arrays as well as include more identifiers. (foralliterator vars, path identifiers appearing inif_assigned, etc.). -
Fixed a bug in debug events where identifiers appearing inside of
old(...)expressions had their new value reported erroneously. -
Cleanup of
InstrumentationContextand smaller fixes.
v0.5.1
This release brings:
-
Quantification over numeric ranges/arrays:
The language now has a
forallconstruct that allows to compute a universally quantified expression over numeric ranges/indices in an array. For example:
forall (uint x in 5...10) x >0
Is a predicate that evalutes to true IFF for all values in the range from 5 (inclusive) to 10 (exclusive), its true that they are positive. (which is obviously true). Since iterating over arrays is a common use-case for this construct we have the following syntactic shortcut:
forall (uint i in arr) arr[i] > 0
The above expression is equivalent to the following form:
forall (uint i in 0...arr.length) arr[i] > 0
- Fix a bug which produces invalid code when instrumenting a constructor in Solidity 0.8.x
v0.5.0
NOTE: THIS IS A BREAKING RELEASE
In this release we change the annotation syntax to support a # prefix before annotation keywords invariant/if_succeeds/if_updated/define.
So for example if_succeeds x > 0 should now be #if_succeeds x > 0.
The old-style annotations without a # is deprecated, but will still be supported. You will get warning on stderr for each instance of an annotation without a #.
This change makes it easier to discern annotations from other text in a docstrings, for other tools (such as IDE plugins)
v0.4.4
v0.4.3
v0.4.2
This release includes several one feature and several bug fixes.
Feature:
if_succedsannotations are now allowed on contract definitions. They are automatically applied to all public/view non-pure functions in this contract, and all inheriting contracts.
Bug fixes:
v0.4.1
This version brings support for Solidity versions 0.8.0-0.8.3. Namely:
- Add support for unchecked blocks
- Ensure that when wrapping unchecked state variable updates, an updated block is emitted in the wrapper
- Make sure that all Scribble arithmetic is unchecked. When designing scribble we aim to minimize the set of possible exceptions coming from Scribble instrumentation. The tradeoff here is that users need to think more carefully when writing arithmetic in Scribble as its unchecked.