Release Notes

v0.2.0

Date released: 03-07-2020

This is a major breaking release of the Vyper compiler and language. It is also the first release following our versioning scheme (#1887).

Breaking changes:

  • @public and @private function decorators have been renamed to @external and @internal (VIP #2065)
  • The @constant decorator has been renamed to @view (VIP #2040)
  • Type units have been removed (VIP #1881)
  • Event declaraion syntax now resembles that of struct declarations (VIP #1864)
  • log is now a statement (VIP #1864)
  • Mapping declaration syntax changed to HashMap[key_type, value_type] (VIP #1969)
  • Interfaces are now declared via the interface keyword instead of contract (VIP #1825)
  • bytes and string types are now written as Bytes and String (#2080)
  • bytes and string literals must now be bytes or regular strings, respectively. They are no longer interchangeable. (VIP #1876)
  • assert_modifiable has been removed, you can now directly perform assertions on calls (#2050)
  • value is no longer an allowable variable name in a function input (VIP #1877)
  • The slice builtin function expects uint256 for the start and length args (VIP #1986)
  • len return type is now uint256 (VIP #1979)
  • value and gas kwargs for external function calls must be given as uint256 (VIP #1878)
  • The outsize kwarg in raw_call has been renamed to max_outsize (#1977)
  • The type kwarg in extract32 has been renamed to output_type (#2036)
  • Public array getters now use uint256 for their input argument(s) (VIP #1983)
  • Public struct getters now return all values of a struct (#2064)
  • RLPList has been removed (VIP #1866)

The following non-breaking VIPs and features were implemented:

  • Implement boolean condition short circuiting (VIP #1817)
  • Add the empty builtin function for zero-ing a value (#1676)
  • Refactor of the compiler process resulting in an almost 5x performance boost! (#1962)
  • Support ABI State Mutability Fields in Interface Definitions (VIP #2042)
  • Support @pure decorator (VIP #2041)
  • Overflow checks for exponentiation (#2072)
  • Validate return data length via RETURNDATASIZE (#2076)
  • Improved constant folding (#1949)
  • Allow raise without reason string (VIP #1902)
  • Make the type argument in method_id optional (VIP #1980)
  • Hash complex types when used as indexed values in an event (#2060)
  • Ease restrictions on calls to self (#2059)
  • Remove ordering restrictions in module-scope of contract (#2057)
  • raw_call can now be used to perform a STATICCALL (#1973)
  • Optimize precompiles to use STATICCALL (#1930)

Some of the bug and stability fixes:

  • Arg clamping issue when using multidimensional arrays (#2071)
  • Support calldata arrays with the in comparator (#2070)
  • Prevent modification of a storage array during iteration via for loop (#2028)
  • Fix memory length of revert string (#1982)
  • Memory offset issue when returning tuples from private functions (#1968)
  • Issue with arrays as default function arguments (#2077)
  • Private function calls no longer generate a call signature (#2058)

Significant codebase refactor, thanks to (@iamdefinitelyahuman)!

v0.1.0-beta.17

Date released: 24-03-2020

The following VIPs and features were implemented for Beta 17:

  • raw_call and slice argument updates (VIP #1879)
  • NatSpec support (#1898)

Some of the bug and stability fixes:

  • ABI interface fixes (#1842)
  • Modifications to how ABI data types are represented (#1846)
  • Generate method identifier for struct return type (#1843)
  • Return tuple with fixed array fails to compile (#1838)
  • Also lots of refactoring and doc updates!

This release will be the last to follow our current release process. All future releases will be governed by the versioning scheme (#1887). The next release will be v0.2.0, and contain many breaking changes.

v0.1.0-beta.16

Date released: 09-01-2020

Beta 16 was a quick patch release to fix one issue: (#1829)

v0.1.0-beta.15

Date released: 06-01-2020

NOTE: we changed our license to Apache 2.0 (#1772)

The following VIPs were implemented for Beta 15:

Some of the bug and stability fixes:

  • Removed all traces of Javascript from the codebase (#1770)
  • Ensured sufficient gas stipend for precompiled calls (#1771)
  • Allow importing an interface that contains an implements statement (#1774)
  • Fixed how certain values compared when using min and max (#1790)
  • Removed unnecessary overflow checks on addmod and mulmod (#1786)
  • Check for state modification when using tuples (#1785)
  • Fix Windows path issue when importing interfaces (#1781)
  • Added Vyper grammar, currently used for fuzzing (#1768)
  • Modify modulus calculations for literals to be consistent with the EVM (#1792)
  • Explicitly disallow the use of exponentiation on decimal values (#1792)
  • Add compile-time checks for divide by zero and modulo by zero (#1792)
  • Fixed some issues with negating constants (#1791)
  • Allow relative imports beyond one parent level (#1784)
  • Implement SHL/SHR for bitshifting, using Constantinople rules (#1796)
  • vyper-json compatibility with solc settings (#1795)
  • Simplify the type check when returning lists (#1797)
  • Add branch coverage reporting (#1743)
  • Fix struct assignment order (#1728)
  • Added more words to reserved keyword list (#1741)
  • Allow scientific notation for literals (#1721)
  • Avoid overflow on sqrt of Decimal upper bound (#1679)
  • Refactor ABI encoder (#1723)
  • Changed opcode costs per EIP-1884 (#1764)

Special thanks to (@iamdefinitelyahuman) for lots of updates this release!

v0.1.0-beta.14

Date released: 13-11-2019

Some of the bug and stability fixes:

  • Mucho Documentation and Example cleanup!
  • Python 3.8 support (#1678)
  • Disallow scientific notation in literals, which previously parsed incorrectly (#1681)
  • Add implicit rewrite rule for bytes[32] -> bytes32 (#1718)
  • Support bytes32 in raw_log (#1719)
  • Fixed EOF parsing bug (#1720)
  • Cleaned up arithmetic expressions (#1661)
  • Fixed off-by-one in check for homogeneous list element types (#1673)
  • Fixed stack valency issues in if and for statements (#1665)
  • Prevent overflow when using sqrt on certain datatypes (#1679)
  • Prevent shadowing of internal variables (#1601)
  • Reject unary substraction on unsigned types (#1638)
  • Disallow orelse syntax in for loops (#1633)
  • Increased clarity and efficiency of zero-padding (#1605)

v0.1.0-beta.13

Date released: 27-09-2019

The following VIPs were implemented for Beta 13:

  • Add vyper-json compilation mode (VIP #1520)
  • Environment variables and constants can now be used as default parameters (VIP #1525)
  • Require unitialized memory be set on creation (VIP #1493)

Some of the bug and stability fixes:

  • Type check for default params and arrays (#1596)
  • Fixed bug when using assertions inside for loops (#1619)
  • Fixed zero padding error for ABI encoder (#1611)
  • Check calldatasize before calldataload for function selector (#1606)

v0.1.0-beta.12

Date released: 27-08-2019

The following VIPs were implemented for Beta 12:

  • Support for relative imports (VIP #1367)
  • Restricted use of environment variables in private functions (VIP #1199)

Some of the bug and stability fixes:

  • @nonreentrant/@constant logical inconsistency (#1544)
  • Struct passthrough issue (#1551)
  • Private underflow issue (#1470)
  • Constancy check issue (#1480)
  • Prevent use of conflicting method IDs (#1530)
  • Missing arg check for private functions (#1579)
  • Zero padding issue (#1563)
  • vyper.cli rearchitecture of scripts (#1574)
  • AST end offsets and Solidity-compatible compressed sourcemap (#1580)

Special thanks to (@iamdefinitelyahuman) for lots of updates this release!

v0.1.0-beta.11

Date released: 23-07-2019

Beta 11 brings some performance and stability fixes.

  • Using calldata instead of memory parameters. (#1499)
  • Reducing of contract size, for large parameter functions. (#1486)
  • Improvements for Windows users (#1486) (#1488)
  • Array copy optimisation (#1487)
  • Fixing @nonreentrant decorator for return statements (#1532)
  • sha3 builtin function removed (#1328)
  • Disallow conflicting method IDs (#1530)
  • Additional convert() supported types (#1524) (#1500)
  • Equality operator for strings and bytes (#1507)
  • Change in compile_codes interface function (#1504)

Thanks to all the contributors!

v0.1.0-beta.10

Date released: 24-05-2019

  • Lots of linting and refactoring!
  • Bugfix with regards to using arrays as parameters to private functions (#1418). Please check your contracts, and upgrade to latest version, if you do use this.
  • Slight shrinking in init produced bytecode. (#1399)
  • Additional constancy protection in the for .. range expression. (#1397)
  • Improved bug report (#1394)
  • Fix returning of External Contract from functions (#1376)
  • Interface unit fix (#1303)
  • Not Equal (!=) optimisation (#1303) 1386
  • New assert <condition>, UNREACHABLE statement. (#711)

Special thanks to (Charles Cooper), for some excellent contributions this release.

v0.1.0-beta.9

Date released: 12-03-2019

  • Add support for list constants (#1211)
  • Add sha256 function (#1327)
  • Renamed create_with_code_of to create_forwarder_to (#1177)
  • @nonreentrant Decorator (#1204)
  • Add opcodes and opcodes_runtime flags to compiler (#1255)
  • Improved External contract call interfaces (#885)

Prior to v0.1.0-beta.9

Prior to this release, we managed our change log in a different fashion. Here is the old changelog:

  • 2019.04.05: Add stricter checking of unbalanced return statements. (#590)
  • 2019.03.04: create_with_code_of has been renamed to create_forwarder_to. (#1177)
  • 2019.02.14: Assigning a persistent contract address can only be done using the bar_contact = ERC20(<address>) syntax.
  • 2019.02.12: ERC20 interface has to be imported using from vyper.interfaces import ERC20 to use.
  • 2019.01.30: Byte array literals need to be annoted using b"", strings are represented as “”.
  • 2018.12.12: Disallow use of None, disallow use of del, implemented clear() built-in function.
  • 2018.11.19: Change mapping syntax to use map(). (VIP564)
  • 2018.10.02: Change the convert style to use types instead of string. (VIP1026)
  • 2018.09.24: Add support for custom constants.
  • 2018.08.09: Add support for default parameters.
  • 2018.06.08: Tagged first beta.
  • 2018.05.23: Changed wei_value to be uint256.
  • 2018.04.03: Changed bytes declaration from bytes <= n to bytes[n].
  • 2018.03.27: Renaming signed256 to int256.
  • 2018.03.22: Add modifiable and static keywords for external contract calls.
  • 2018.03.20: Renaming __log__ to event.
  • 2018.02.22: Renaming num to int128, and num256 to uint256.
  • 2018.02.13: Ban functions with payable and constant decorators.
  • 2018.02.12: Division by num returns decimal type.
  • 2018.02.09: Standardize type conversions.
  • 2018.02.01: Functions cannot have the same name as globals.
  • 2018.01.27: Change getter from get_var to var.
  • 2018.01.11: Change version from 0.0.2 to 0.0.3
  • 2018.01.04: Types need to be specified on assignment (VIP545).
  • 2017.01.02 Change as_wei_value to use quotes for units.
  • 2017.12.25: Change name from Viper to Vyper.
  • 2017.12.22: Add continue for loops
  • 2017.11.29: @internal renamed to @private.
  • 2017.11.15: Functions require either @internal or @public decorators.
  • 2017.07.25: The def foo() -> num(const): ... syntax no longer works; you now need to do def foo() -> num: ... with a @constant decorator on the previous line.
  • 2017.07.25: Functions without a @payable decorator now fail when called with nonzero wei.
  • 2017.07.25: A function can only call functions that are declared above it (that is, A can call B only if B appears earlier in the code than A does). This was introduced