Releases: vyperlang/vyper
v0.3.9 ("Common Adder")
What's Changed
Date released: 2023-05-29
This is a patch release fix for v0.3.8. @bout3fiddy discovered a codesize regression for blueprint contracts in v0.3.8 which is fixed in this release. @bout3fiddy also discovered a runtime performance (gas) regression for default functions in v0.3.8 which is fixed in this release.
Fixes:
- initcode codesize blowup (#3450)
- add back global calldatasize check for contracts with default fn (#3463)
Full Changelog: v0.3.8...v0.3.9
v0.3.8
What's Changed
Non-breaking changes and improvements:
transient
storage keyword (#3373)- ternary operators (#3398)
raw_revert()
builtin (#3136)- shift operators (#3019)
- make
send()
gas stipend configurable (#3158) - use new
push0
opcode (#3361) - python 3.11 support (#3129)
- drop support for python 3.8 and 3.9 (#3325)
- build for
aarch64
(#2687)
Major refactoring PRs:
- refactor front-end type system (#2974)
- merge front-end and codegen type systems (#3182)
- simplify
GlobalContext
(#3209) - remove
FunctionSignature
(#3390)
Notable fixes:
- assignment when rhs is complex type and references lhs (#3410)
- uninitialized immutable values (#3409)
- success value when mixing
max_outsize=0
andrevert_on_failure=False
(GHSA-w9g2-3w7p-72g9) - block certain kinds of storage allocator overflows (GHSA-mgv8-gggw-mrg6)
- store-before-load when a dynarray appears on both sides of an assignment (GHSA-3p37-3636-q8wv)
- bounds check for loops of the form
for i in range(x, x+N)
(GHSA-6r8q-pfpv-7cgj) - alignment of call-site posargs and kwargs for internal functions (GHSA-ph9x-4vc9-m39g)
- batch nonpayable check for default functions calldatasize < 4 in (#3104, #3408, cf. GHSA-vxmm-cwh2-q762)
Other docs updates, chores and fixes:
- call graph stability (#3370)
- fix
vyper-serve
output (#3338) - add
custom:
natspec tags (#3403) - add missing pc maps to
vyper_json
output (#3333) - fix constructor context for internal functions (#3388)
- add deprecation warning for
selfdestruct
usage (#3372) - add bytecode metadata option to vyper-json (#3117)
- fix compiler panic when a
break
is outside of a loop (#3177) - fix complex arguments to builtin functions (#3167)
- add support for all types in ABI imports (#3154)
- disable uadd operator (#3174)
- block bitwise ops on decimals (#3219)
- raise
UNREACHABLE
(#3194) - allow enum as mapping key (#3256)
- block boolean
not
operator on numeric types (#3231) - enforce that loop's iterators are valid names (#3242)
- fix typechecker hotspot (#3318)
- rewrite typechecker journal to handle nested commits (#3375)
- fix missing pc map for empty functions (#3202)
- guard against iterating over empty list in for loop (#3197)
- skip enum members during constant folding (#3235)
- bitwise
not
constant folding (#3222) - allow accessing members of constant address (#3261)
- guard against decorators in interface (#3266)
- fix bounds for decimals in some builtins (#3283)
- length of literal empty bytestrings (#3276)
- block
empty()
for HashMaps (#3303) - fix type inference for empty lists (#3377)
- disallow logging from
pure
,view
functions (#3424) - improve optimizer rules for comparison operators (#3412)
- deploy to ghcr on push (#3435)
- add note on return value bounds in interfaces (#3205)
- index
id
param inURI
event ofERC1155ownable
(#3203) - add missing
asset
function toERC4626
built-in interface (#3295) - clarify
skip_contract_check=True
can result in undefined behavior (#3386) - add
custom
NatSpec tag to docs (#3404) - fix
uint256_addmod
doc (#3300) - document optional kwargs for external calls (#3122)
- remove
slice()
length documentation caveats (#3152) - fix docs of
blockhash
to reflect revert behaviour (#3168) - improvements to compiler error messages by (#3121, #3134, #3312, #3304, #3240, #3264, #3343, #3307, #3313 and #3215)
These are really just the highlights, as many other bugfixes, docs updates and refactoring (over 150 commits!) made it into this release! Special thanks to contributions from @tserg, @trocher, @z80dev, @emc415 and @benber86
New Contributors
- @omahs made their first contribution in #3128
- @ObiajuluM made their first contribution in #3124
- @trocher made their first contribution in #3134
- @ozmium22 made their first contribution in #3149
- @ToonVanHove made their first contribution in #3168
- @emc415 made their first contribution in #3158
- @lgtm-com made their first contribution in #3147
- @tdurieux made their first contribution in #3224
- @victor-ego made their first contribution in #3263
- @miohtama made their first contribution in #3257
- @kelvinfan001 made their first contribution in #2687
Full Changelog: v0.3.7...v0.3.8
v0.3.7
What's Changed
Date released: 2022-09-26
Breaking changes:
Non-breaking changes and improvements:
- fix: assert description in Crowdfund.finalize() (#3058)
- fix: change mutability of example ERC721 interface (#3076)
- chore: improve error message for non-checksummed address literal (#3065)
- feat: isqrt built-in (#3074) (#3069)
- feat: add
block.prevrandao
as alias forblock.difficulty
(#3085) - feat: epsilon builtin (#3057)
- feat: extend ecrecover signature to accept additional parameter types (#3084)
- feat: allow constant and immutable variables to be declared public (#3024)
- feat: optionally disable metadata in bytecode (#3107)
Bugfixes:
- fix: empty nested dynamic arrays (#3061)
- fix: foldable builtin default args in imports (#3079) (#3077)
Additional changes and improvements:
- doc: update broken links in SECURITY.md (#3095)
- chore: update discord link in docs (#3031)
- fix: broken links in various READMEs (#3072)
- chore: fix compile warnings in examples (#3033)
- feat: append lineno to the filename in error messages (#3092)
- chore: migrate lark grammar (#3082)
- chore: loosen and upgrade semantic version (#3106)
New Contributors
- @emilianobonassi made their first contribution in #3107
- @unparalleled-js made their first contribution in #3106
- @pcaversaccio made their first contribution in #3085
- @nfwsncked made their first contribution in #3058
- @z80 made their first contribution in #3057
- @Benny made their first contribution in #3024
- @cairo made their first contribution in #3072
- @fiddy made their first contribution in #3069
Special thanks to returning contributors @tserg, @pandadefi, and @delaaxe.
v0.3.6
What's Changed
Date released: 2022-08-07
Bugfixes:
- Fix
in
expressions for list literals when list members are variables (#3035)
New Contributors
Full Changelog: v0.3.5...v0.3.6
v0.3.5
What's Changed
Date released: 2022-08-05
Non-breaking changes and improvements:
- Add blueprint deployer output format (#3001)
- Allow arbitrary data to be passed to
create_from_blueprint
(#2996) - Add CBOR length to bytecode for decoders (#3010)
- Fix compiler panic when accessing enum storage vars via
self
(#2998) - Fix: allow
empty()
in constant definitions and in default argument position (#3008) - Fix: disallow
self
address in pure functions (#3027)
New Contributors
- @merc1er made their first contribution in #3007
- @eltociear made their first contribution in #3015
- @transmissions11 made their first contribution in #3013
- @altugbakan made their first contribution in #3018
- @jaglinux made their first contribution in #3020
Full Changelog: v0.3.4...v0.3.5
v0.3.4
What's Changed
Non-breaking changes and improvements:
- Add enum types (#2874, #2915, #2925, #2977)
- Add
_abi_decode
builtin (#2882) - Add
create_from_blueprint
andcreate_copy_of
builtins (#2895) - Add
default_return_value
kwarg for calls (#2839) - Add
min_value
andmax_value
builtins for numeric types (#2935) - Add
uint2str
builtin (#2879) - Add vyper signature to bytecode (#2860)
Other fixes and improvements:
- Call internal functions from constructor (#2496)
- Arithmetic for new int types (#2843)
- Allow
msg.data
inraw_call
withoutslice
(#2902) - Per-method calldatasize checks (#2911)
- Type inference and annotation of arguments for builtin functions (#2817)
- Allow varargs for
print
(#2833) - Add
error_map
output format for tooling consumption (#2939) - Multiple evaluation of contract address in call (GHSA-4v9q-cgpw-cf38)
- Improve ast output (#2824)
- Allow
@nonreentrant
on view functions (#2921) - Add
shift()
support for signed integers (#2964) - Enable dynarrays of strings (#2922)
- Fix off-by-one bounds check in certain safepow cases (#2983)
- Optimizer improvements (#2647, #2868, #2914, #2843, #2944)
- Reverse order in which exceptions are reported (#2838)
- Fix compile-time blowup for large contracts (#2981)
- Rename
vyper-ir
binary tofang
(#2936)
Many other small bugfixes, optimizations and refactoring also made it into this release! Special thanks to @tserg and @pandadefi for contributing several important bugfixes, refactoring and features to this release!
New Contributors
- @code-review-doctor made their first contribution in #2826
- @big-tech-sux made their first contribution in #2837
- @Doc-Pixel made their first contribution in #2807
- @0xMaka made their first contribution in #2861
- @McCoady made their first contribution in #2884
- @pandadefi made their first contribution in #2874
- @diogoperillo made their first contribution in #2906
- @adam429 made their first contribution in #2946
- @challet made their first contribution in #2978
- @r4VP4 made their first contribution in #2980
- @krakxn made their first contribution in #2990
Full Changelog: v0.3.3...v0.3.4
v0.3.3
What's Changed
This is a bugfix release. It patches an off-by-one error in the storage allocation mechanism for dynamic arrays reported by @haltman-at in #2820
Other fixes and improvements:
- Add a print built-in which allows printing debugging messages in hardhat. (#2818)
- Fix various error messages (#2798, #2805)
New Contributors
Full Changelog: v0.3.2...v0.3.3
v0.3.2
Breaking changes:
- Increase the bounds of the decimal type (#2730)
- Generalize and simplify the semantics of the convert builtin (#2694)
- Restrict hex and bytes literals (#2736, #2872)
Non-breaking changes and improvements:
- Implement dynamic arrays (#2556, #2606, #2615)
- Support all ABIv2 integer and bytes types (#2705)
- Add storage layout override mechanism (#2593)
- Support
<address>.code
attribute (#2583) - Add
tx.gasprice
builtin (#2624) - Allow structs as constant variables (#2617)
- Implement
skip_contract_check
kwarg (#2551) - Support EIP-2678 ethPM manifest files (#2628)
- Add
metadata
output format (#2597) - Allow
msg.*
variables in internal functions (#2632) - Add
unsafe_
arithmetic builtins (#2629) - Add subroutines to Vyper IR (#2598)
- Add
select
opcode to Vyper IR (#2690) - Allow lists of any type as loop variables (#2616)
- Improve suggestions in error messages (#2806)
Notable fixes:
- Clamping of returndata from external calls in complex expressions (GHSA-4mrx-6fxm-8jpg, GHSA-j2x6-9323-fp7h)
- Bytestring equality for (
N<=32
) (GHSA-7vrm-3jc8-5wwm) - Typechecking of constant variables (#2580, #2603)
- Referencing immutables in constructor (#2627)
- Arrays of interfaces in for loops (#2699)
Lots of optimizations, refactoring and other fixes made it into this release! For the full list, please see the changelog.
Special thanks to returning contributors @tserg, @skellet0r and @fubuloubu!
New Contributors
- @hi-ogawa made their first contribution in #2577
- @abdullathedruid made their first contribution in #2593
- @Sud0u53r made their first contribution in #2604
- @davidhq made their first contribution in #2679
- @onlymaresia made their first contribution in #2712
- @hitsuzen-eth made their first contribution in #2729
Full Changelog: v0.3.1...v0.3.2
v0.3.1
Breaking changes:
- Disallow changes to decimal precision when used as a library (#2479)
Non-breaking changes and improvements:
- Add immutable variables (#2466)
- Add uint8 type (#2477)
- Add gaslimit and basefee env variables (#2495)
- Enable checkable raw_call (#2482)
- Propagate revert data when external call fails (#2531)
- Improve LLL annotations (#2486)
- Optimize short-circuiting boolean operations (#2467, #2493)
- Optimize identity precompile usage (#2488)
- Remove loaded limits for int128 and address (#2506)
- Add machine readable ir_json format (#2510)
- Optimize raw_call for the common case when the input is in memory (#2481)
- Remove experimental OVM transpiler (#2532)
- Add CLI flag to disable optimizer (#2522)
- Add docs for LLL syntax and semantics (#2494)
Fixes:
- Allow non-constant revert reason strings (#2509)
- Allow slices of complex expressions (#2500)
- Remove seq_unchecked from LLL codegen (#2485)
- Fix external calls with default parameters (#2526)
- Enable lists of structs as function arguments (#2515)
- Fix .balance on constant addresses (#2533)
- Allow variable indexing into constant/literal arrays (#2534)
- Fix allocation of unused storage slots (#2439, #2514)
Special thanks to @skellet0r for some major features in this release!
v0.3.0
Breaking changes:
- Change ABI encoding of single-struct return values to be compatible with Solidity (#2457)
- Drop Python 3.6 support (#2462)
Non-breaking changes and improvements:
- Rewrite internal calling convention (#2447)
- Allow any ABI-encodable type as function arguments and return types (#2154, #2190)
- Add support for deterministic deployment of minimal proxies using CREATE2 (#2460)
- Optimize code for certain copies (#2468)
- Add -o CLI flag to redirect output to a file (#2452)
- Other docs updates (#2450)
Fixes:
- _abi_encode builtin evaluates arguments multiple times (#2459)
- ABI length is too short for nested tuples (#2458)
- Returndata is not clamped for certain numeric types (#2454)
__default__
functions do not respect nonreentrancy keys (#2455)- Clamps for bytestrings in initcode are broken (#2456)
- Missing clamps for decimal args in external functions (GHSA-c7pr-343r-5c46)
- Memory corruption when returning a literal struct with a private function call inside of it (GHSA-xv8x-pr4h-73jv)
Special thanks to contributions from @skellet0r and @benjyz for this release!