Release Notes¶
Release audits can be found here.
v0.4.3 (“Buttermilk Racer”)¶
Date released: 2025-06-19¶
v0.4.3 introduces the @raw_return decorator which allows contracts to return bytes directly without ABI-encoding, which enables new proxy contract use cases. The default EVM version has been updated to prague, and several improvements have been made to the Venom optimizer pipeline.
Audits: ChainSecurity, Anatomist
Breaking changes¶
feat[tool]!: make
praguethe default evm version (#4633)
Other new features and improvements¶
Tooling / CLI¶
Venom improvements¶
Docs¶
Test suite and CI improvements¶
v0.4.2 (“Lernaean Hydra”)¶
Date released: 2025-05-31¶
v0.4.2 includes a new raw_create() builtin which allows users to build more generic factories in Vyper. It also moves the sqrt() builtin to a pure Vyper module, involving a refactor which will allow more stdlib functionality to be written in Vyper in the future.
Additionally, Venom has undergone more improvements, including a CSE elimination pass, dead-store elimination pass, as well as moving more items in the calling convention to the stack in the venom pipeline. Benchmark contracts are now typically 5% smaller.
Two low severity GHSAs have been patched in this release.
Audits: ChainSecurity, Anatomist
Breaking and notable changes¶
feat[lang]!: move sqrt to new stdlib
mathmodule (#4520)fix[lang]!: ban calling nonreentrant functions from nonreentrant functions (#4574)
fix[lang]!: forbid calling
__default__(#4371)feat[lang]!: remove deprecated bitwise builtins (#4552)
feat[tool]!: rename
--venomto--venom-experimental(#4662)refactor[tool]!: update storage layout format (#4495)
Other new features and improvements¶
feat[lang]: nonreentrancy by default (#4563)
feat[lang]: add
raw_create()builtin (#4204)feat[lang]: remove one-warning limit from builtins (#4542)
feat[lang]: enable bitwise ops for
bytesMtypes (#4538)fix[lang]: extend
as_wei_valueto all numeric types (#3498)feat[lang]: bubble up create revertdata (#4540)
fix[codegen]: fix overcopying of bytes in
make_setter(#4419)fix[ux]: don’t warn for logs with 0 positional args (#4501)
Tooling / CLI¶
Bugfixes¶
fix[codegen]: disallow
slice()with length 0 for ad-hoc locations (#4645)fix[codegen]: fix bytes copying routines for 0-length case (#4649)
fix[codegen]: fix removal of side effects in concat (#4644)
fix[codegen]: interleaved effects eval for some builtins (#4156)
fix[lang]: block modules in structs (#4566)
fix[lang]: filter oob array access during folding (#4571)
fix[lang]: disallow some builtins in
purefunctions (#3157)fix[lang]: only reserve builtins at the top level (#4578)
fix[tool]: fix layout export with nonreentrancy pragma on (#4621)
fix[lang]: disallow staticcall in pure context (#4619)
fix[lang]: disallow duplicate getter annotations (#4623)
fix[lang]: disable nonreentrant behavior of immutable and constant getters (#4622)
fix[lang]: fix invalid memory read in
raw_create(#4624)fix[parser]: block value assignment in for targets (#4492)
fix[ux]: fold
keccakandsha256of constant hexbytes (#4536)fix[ux]: typechecking for loop annotation of list variable (#4550)
Patched security advisories (GHSAs)¶
concat()builtin may elide side-effects for zero-length arguments (GHSA-vgf2-gvx8-xwc3)slice()may elide side-effects when output length is 0 (GHSA-4w26-8p97-f4jp)
Venom improvements¶
feat[venom]: add dead store elimination pass (#4556)
feat[venom]: generalize DSE to more locations (#4652)
feat[venom]: improve memmerge pass (#4422)
feat[venom]: implement new calling convention (#4482)
perf[venom]: improve CSE elimination speed (#4607)
feat[venom]: disable legacy optimizer in venom pipeline (#4411)
feat[venom]: mark loads as non-volatile (#4388)
feat[venom]: improve
dload/mstoremerging (#4570)refactor[venom]: add dom walk property (#4546)
feat[venom]: add memory SSA analysis (#4555)
feat[venom]: improvements for iszero handling and memmerge (#4469)
refactor[venom]: update more passes to use
InstUpdater(#4516)fix[venom]: fix var defined check for unreachable blocks (#4518)
feat[venom]: tune function inliner (#4584)
feat[venom]: add assert optimizer (#4585)
fix[venom]: revert-to-assert should invalidate dfg (#4586)
feat[venom]: add common subexpression elimination (#4241)
fix[venom]: fix
.nameinvalidation inMakeSSA(#4545)refactor[venom]: add annotation to
append_instruction(#4583)fix[venom]: fix handling of params in
venom_to_assembly(#4587)refactor[venom]: extract liveness and cfg data structures (#4595)
fix[venom]: fix
DominatorTreeAnalysis.dominates()(#4615)fix[venom]: fix callsite phis after inlining (#4666)
refactor[venom]: rename “store”-related passes (#4627)
feat[venom]: add phi simplification pass (#4628)
feat[venom]: add
callocainstruction (#4376)feat[venom]: allow SCCP to run without removing allocas (#4655)
feat[venom]: improve phi elimination pass (#4635)
feat[venom]: allow labels to be assigned to variables (#4514)
perf[venom]: optimize time spent in
SimplifyCFG(#4658)feat[venom]: remove
dloadfrom list of volatile instructions (#4659)perf[venom]: improve performance of
MakeSSA(#4491)feat[test]: add tests for venom dload lowering pass (#4471)
feat[venom]: add varname freshener (#4484)
refactor[test]: add more tests with hevm venom harness (#4493)
feat[venom]: add basic semantic check machinery to venom (#4483)
fix[venom]: fix sccp resolution of truthy
jnz(#4505)feat[test]: add hevm to
get_contractharness (#4499)feat[venom]: parse hex literals in text format (#4532)
refactor[venom]: simplify
SimplifyCFGpass (#4528)refactor[venom]: use
InstUpdaterin more passes (#4508)feat[venom]: make
reverta bb terminator (#4529)
Docs¶
Test suite and CI improvements¶
feat[lang]: remove
@externaldecorator from builtin interfaces (#4562)fix[test]: fix warnings in thirdparty tests (#4547)
chore[tool]: widen version bounds for
packaging(#4590)refactor[test]: remove
selfdestructfrom example contracts (#4537)fix[ci]: suppress hypothesis health check (#4533)
feat[test]: add more example contracts (#4500)
feat[test]: add negative hevm tests (#4504)
chore[tool]: widen version bounds for
asttokens(#4592)chore[test]: add test for struct member names (#3527)
Misc / Refactor¶
refactor[parser]: refactor pragma parsing (#4530)
refactor[parser]: put settings on Module AST node (#4569)
chore[lang]: remove
sha3andimportlib_metadataimports (#4588)refactor[stdlib]: refactor
math.sqrtimplementation (#4575)refactor[codegen]: refactor
get_type_for_exact_size()(#4632)refactor[lang]: refactor decorator parsing (#4490)
v0.4.1 (“Tokara Habu”)¶
Date released: 2025-03-01¶
v0.4.1 is primarily a polishing release, focusing on bug fixes, UX improvements, and security-related fixes (with four low-to-moderate severity GHSA reports published). However, a substantial amount of effort has also been invested in improving the Venom pipeline, resulting in better performance and code generation from the Venom pipeline. Venom can be enabled by passing the --venom or --experimental-codegen flag to the Vyper compiler (they are aliases of each other). Venom code can now also be compiled directly, using the venom binary (included in this release).
Breaking changes¶
Other new features and improvements¶
feat[lang]: add
module.__at__()to cast to interface (#4090)feat[lang]: use keyword arguments for event instantiation (#4257)
feat[lang]: add native hex string literals (#4271)
feat[lang]: introduce
manaas an alias forgas(#3713)feat[lang]: support top level
"abi"key in json interfaces (#4279)feat[lang]: support flags from imported interfaces (#4253)
feat[ux]: allow “compiling”
.vyifiles (#4290)feat[ux]: improve hint for events kwarg upgrade (#4275)
Tooling / CLI¶
feat[tool]: add
-Werrorand-Wnoneoptions (#4447)feat[tool]: support storage layouts via
jsonand.vyzinputs (#4370)feat[tool]: add integrity hash to initcode (#4234)
fix[ci]: fix commithash calculation for pypi release (#4309)
fix[tool]: include structs in
-f interfaceoutput (#4294)feat[tool]: separate import resolution pass (#4229)
feat[tool]: add all imported modules to
-f annotated_astoutput (#4209)fix[tool]: add missing internal functions to metadata (#4328)
fix[tool]: update VarAccess pickle implementation (#4270)
fix[tool]: fix output formats for .vyz files (#4338)
fix[tool]: add missing user errors to error map (#4286)
fix[ci]: fix README encoding in
setup.py(#4348)refactor[tool]: refactor
compile_from_zip()(#4366)
Bugfixes¶
fix[lang]: add
raw_log()constancy check (#4201)fix[lang]: use folded node for typechecking (#4365)
fix[ux]: fix error message for “staticall” typo (#4438)
fix[lang]: fix certain varinfo comparisons (#4164)
fix[codegen]: fix
abi_encodebuffer size in external calls (#4202)fix[lang]: fix
==and!=bytesM folding (#4254)fix[lang]: fix
.vyifunction body check (#4177)fix[venom]: invalid jump error (#4214)
fix[lang]: fix precedence in floordiv hint (#4203)
fix[lang]: define rounding mode for sqrt (#4486)
fix[codegen]: disable augassign with overlap (#4487)
fix[codegen]: relax the filter for augassign oob check (#4497)
fix[lang]: fix panic in call cycle detection (#4200)
fix[tool]: update
InterfaceT.__str__implementation (#4205)fix[tool]: fix classification of AST nodes (#4210)
fix[tool]: keep
experimentalCodegenblank in standard json input (#4216)fix[ux]: fix relpath compiler panic on windows (#4228)
fix[ux]: fix empty hints in error messages (#4351)
fix[ux]: fix validation for
abi_encode()method_idkwarg (#4369)fix[ux]: fix false positive for overflow in type checker (#4385)
fix[ux]: add missing filename to syntax exceptions (#4343)
fix[ux]: improve error message on failed imports (#4409)
fix[parser]: fix bad tokenization of hex strings (#4406)
fix[lang]: fix encoding of string literals (#3091)
fix[codegen]: fix assertions for certain precompiles (#4451)
fix[lang]: allow
print()schema larger than 32 bytes (#4456)fix[codegen]: fix iteration over constant literals (#4462)
fix[codegen]: fix gas usage of iterators (#4485)
fix[codegen]: cache result of iter eval (#4488)
fix[lang]: fix recursive interface imports (#4303)
fix[tool]: roll back OS used to build binaries (#4494)
Patched security advisories (GHSAs)¶
success of certain precompiles not checked (GHSA-vgf2-gvx8-xwc3)
AugAssign evaluation order causing OOB write within object (GHSA-4w26-8p97-f4jp)
sqrtdoesn’t define rounding behavior (GHSA-2p94-8669-xg86)multiple eval in
forlist iterator (GHSA-h33q-mhmp-8p67)
Venom improvements¶
feat[venom]: add venom parser (#4381)
feat[venom]: new
DFTPassalgorithm (#4255)feat[venom]: only
stack_reorderbefore join points (#4247)feat[venom]: add function inliner (#4478)
feat[venom]: add binop optimizations (#4281)
feat[venom]: offset instruction (#4180)
feat[venom]: make dft-pass commutative aware (#4358)
perf[venom]: add
OrderedSet.last()(#4236)feat[venom]: improve liveness computation time (#4086)
fix[venom]: fix invalid
phis after SCCP (#4181)fix[venom]: clean up sccp pass (#4261)
refactor[venom]: remove
dup_requirementsanalysis (#4262)fix[venom]: remove duplicate volatile instructions (#4263)
fix[venom]: fix
_stack_reorder()routine (#4220)feat[venom]: store expansion pass (#4068)
feat[venom]: add effects to instructions (#4264)
feat[venom]: add small heuristic for cleaning input stack (#4251)
refactor[venom]: refactor module structure (#4295)
refactor[venom]: refactor sccp pass to use dfg (#4329)
refactor[venom]: update translator for
deployinstruction (#4318)feat[venom]: make cfg scheduler “stack aware” (#4356)
feat[venom]: improve liveness computation (#4330)
refactor[venom]: optimize lattice evaluation (#4368)
perf[venom]: improve OrderedSet operations (#4246)
fix[venom]: promote additional memory locations to variables (#4039)
feat[venom]: add codesize optimization pass (#4333)
fix[venom]: fix unused variables pass (#4259)
refactor[venom]: move commutative instruction set (#4307)
fix[venom]: add
make_ssapass after algebraic optimizations (#4292)feat[venom]: reduce legacy opts when venom is enabled (#4336)
fix[venom]: fix duplicate allocas (#4321)
fix[venom]: add missing extcodesize+hash effects (#4373)
refactor[ux]: add
venomasexperimental-codegenalias (#4337)feat[venom]: allow alphanumeric variables and source comments (#4403)
feat[venom]: cleanup variable version handling (#4404)
feat[venom]: merge memory writes (#4341)
refactor[venom]: make venom repr parseable (#4402)
feat[venom]: propagate
dloadinstruction to venom (#4410)feat[venom]: remove special cases in store elimination (#4413)
feat[venom]: update text format for data section (#4414)
feat[venom]: add load elimination pass (#4265)
fix[venom]: fix
MakeSSAwith existing phis (#4423)refactor[venom]: refactor mem2var (#4421)
fix[venom]: fix store elimination pass (#4428)
refactor[venom]: add
make_nop()helper function (#4470)feat[venom]: improve load elimination (#4407)
refactor[venom]: replace
bb.mark_for_removalwithmake_nop(#4474)
Docs¶
chore[docs]: add
method_idtoabi_encodesignature (#4355)chore[docs]: mention the
--venomflag in venom docs (#4353)feat[docs]: add bug bounty program to security policy (#4230)
feat[docs]: add installation via pipx and uv (#4274)
chore[docs]: add binary installation methods (#4258)
chore[docs]: update
sourceMapfield descriptions (#4170)chore[docs]: remove experimental note for cancun (#4183)
chore[venom]: expand venom docs (#4314)
chore[docs]: abi function signature for default arguments (#4415)
feat[docs]: add Telegram badge to README.md (#4342)
chore[docs]: update readme about testing (#4448)
chore[docs]:
nonpayableinternalfunction behaviour (#4416)chore[docs]: add
FUNDING.jsonfor drips funding (#4167)chore[docs]: add giveth to
FUNDING.yml(#4466)chore[tool]: update
FUNDING.jsonfor optimism RPGF (#4218)chore[tool]: mention that output format is comma separated (#4467)
Test suite improvements¶
refactor[venom]: add new venom test machinery (#4401)
feat[ci]: use
coverage combineto reduce codecov uploads (#4452)feat[test]: add hevm harness for venom passes (#4460)
fix[test]: fix test in grammar fuzzer (#4150)
chore[test]: fix a type hint (#4173)
chore[ci]: add auto-labeling workflow (#4276)
fix[test]: fix some clamper tests (#4300)
refactor[test]: add some sanity checks to
abi_decodetests (#4096)chore[ci]: enable Python
3.13tests (#4386)chore[ci]: update codecov github action to v5 (#4437)
chore[ci]: bump upload-artifact action to v4 (#4445)
chore[ci]: separate codecov upload into separate job (#4455)
chore[ci]: improve coverage jobs (#4457)
chore[ci]: update ubuntu image for
buildjob (#4473)
Misc / Refactor¶
refactor[parser]: remove
ASTTokens(#4364)refactor[codegen]: remove redundant
IRnode.from_list(#4151)feat[ux]: move exception hint to the end of the message (#4154)
fix[ux]: improve error message for bad hex literals (#4244)
refactor[lang]: remove translated fields for constant nodes (#4287)
refactor[ux]: refactor preparser (#4293)
refactor[codegen]: add profiling utils (#4412)
refactor[lang]: remove VyperNode
__hash__()and__eq__()implementations (#4433)
v0.4.0 (“Nagini”)¶
Date released: 2024-06-20¶
v0.4.0 represents a major overhaul to the Vyper language. Notably, it overhauls the import system and adds support for code reuse. It also adds a new, experimental backend to Vyper which lays the foundation for improved analysis, optimization and integration with third party tools.
Audits: ChainSecurity, ChainSecurity 2nd audit, ChainSecurity 3rd audit, Statemind, OtterSec, OtterSec 2nd audit
Breaking Changes¶
feat[tool]!: make cancun the default evm version (#4029)
feat[lang]: remove named reentrancy locks (#3769)
feat[lang]!: change the signature of
block.prevrandao(#3879)feat[lang]!: change ABI type of
decimaltoint168(#3696)feat[lang]: rename
_abi_encodeand_abi_decode(#4097)feat[lang]!: add feature flag for decimals (#3930)
feat[lang]!: make internal decorator optional (#4040)
feat[lang]: protect external calls with keyword (#2938)
introduce floordiv, ban regular div for integers (#2937)
feat[lang]: use keyword arguments for struct instantiation (#3777)
feat: require type annotations for loop variables (#3596)
feat: replace
enumwithflagkeyword (#3697)feat: remove builtin constants (#3350)
feat: drop istanbul and berlin support (#3843)
feat: allow range with two arguments and bound (#3679)
fix[codegen]: range bound check for signed integers (#3814)
feat: default code offset = 3 (#3454)
feat: rename
vyper.interfacestoethereum.ercs(#3741)chore: add prefix to ERC interfaces (#3804)
chore[ux]: compute natspec as part of standard pipeline (#3946)
feat: deprecate
vyper-serve(#3666)
Module system¶
refactor: internal handling of imports (#3655)
feat: implement “stateless” modules (#3663)
feat[lang]: export interfaces (#3919)
feat[lang]: singleton modules with ownership hierarchy (#3729)
feat[lang]: implement function exports (#3786)
feat[lang]: auto-export events in ABI (#3808)
fix: allow using interface defs from imported modules (#3725)
feat: add support for constants in imported modules (#3726)
fix[lang]: prevent modules as storage variables (#4088)
fix[ux]: improve initializer hint for unimported modules (#4145)
feat: add python
sys.pathto vyper path (#3763)feat[ux]: improve error message for importing ERC20 (#3816)
fix[lang]: fix importing of flag types (#3871)
feat: search path resolution for cli (#3694)
fix[lang]: transitive exports (#3888)
fix[ux]: error messages relating to initializer issues (#3831)
fix[lang]: recursion in
usesanalysis for nonreentrant functions (#3971)fix[ux]: fix
useserror message (#3926)fix[lang]: fix
usesanalysis for nonreentrant functions (#3927)fix[lang]: fix a hint in global initializer check (#4089)
fix[lang]: builtin type comparisons (#3956)
fix[tool]: fix
combined_jsonoutput for CLI (#3901)fix[tool]: compile multiple files (#4053)
refactor: reimplement AST folding (#3669)
refactor: constant folding (#3719)
fix[lang]: typecheck hashmap indexes with folding (#4007)
fix[lang]: fix array index checks when the subscript is folded (#3924)
fix[lang]: pure access analysis (#3895)
Venom¶
feat: implement new IR for vyper (venom IR) (#3659)
feat[ir]: add
make_ssapass to venom pipeline (#3825)feat[venom]: implement
mem2varandsccppasses (#3941)feat[venom]: add store elimination pass (#4021)
feat[venom]: add
extract_literalspass (#4067)feat[venom]: optimize branching (#4049)
feat[venom]: avoid last
swapfor commutative ops (#4048)feat[venom]: “pickaxe” stack scheduler optimization (#3951)
feat[venom]: add algebraic optimization pass (#4054)
feat: Implement target constrained venom jump instruction (#3687)
feat: remove
deployinstruction from venom (#3703)fix[venom]: liveness analysis in some loops (#3732)
feat: add more venom instructions (#3733)
refactor[venom]: use venom pass instances (#3908)
refactor[venom]: refactor venom operand classes (#3915)
refactor[venom]: introduce
IRContextandIRAnalysisCache(#3983)feat: add utility functions to
OrderedSet(#3833)feat[venom]: optimize
get_basic_block()(#4002)fix[venom]: fix branch eliminator cases in sccp (#4003)
fix[codegen]: same symbol jumpdest merge (#3982)
fix[venom]: fix eval of
expin sccp (#4009)refactor[venom]: remove unused method in
make_ssa.py(#4012)fix[venom]: fix return opcode handling in mem2var (#4011)
fix[venom]: fix
cfgoutput format (#4010)chore[venom]: fix output formatting of data segment in
IRContext(#4016)feat[venom]: optimize mem2var and store/variable elimination pass sequences (#4032)
fix[venom]: fix some sccp evaluations (#4028)
fix[venom]: add
unique_symbolscheck to venom pipeline (#4149)feat[venom]: remove redundant store elimination pass (#4036)
fix[venom]: remove some dead code in
venom_to_assembly(#4042)feat[venom]: improve unused variable removal pass (#4055)
fix[venom]: remove liveness requests (#4058)
fix[venom]: fix list of volatile instructions (#4065)
fix[venom]: remove dominator tree invalidation for store elimination pass (#4069)
fix[venom]: move loop invariant assertion to entry block (#4098)
fix[venom]: clear
out_varsduring calculation (#4129)fix[venom]: alloca for default arguments (#4155)
Refactor ctx.add_instruction() and friends (#3685)
fix: type annotation of helper function (#3702)
feat[ir]: emit
djumpin dense selector table (#3849)chore: move venom tests to
tests/unit/compiler(#3684)
Other new features¶
Docs¶
chore[docs]: add docs for v0.4.0 features (#3947)
chore[docs]:
implementsdoes not check event declarations (#4052)docs: adopt a new theme:
shibuya(#3754)chore[docs]: add evaluation order warning for builtins (#4158)
Update
FUNDING.yml(#3636)docs: fix nit in v0.3.10 release notes (#3638)
docs: add note on
pragmaparsing (#3640)docs: retire security@vyperlang.org (#3660)
feat[docs]: add more detail to modules docs (#4087)
docs: update resources section (#3656)
docs: add script to help working on the compiler (#3674)
docs: add warnings at the top of all example token contracts (#3676)
docs: typo in
on_chain_market_maker.vy(#3677)docs: clarify
address.codehashfor empty account (#3711)docs: indexed arguments for events are limited (#3715)
docs: Fix typos (#3747)
docs: Upgrade dependencies and fixes (#3745)
docs: add missing cli flags (#3736)
chore: fix formatting and docs for new struct instantiation syntax (#3792)
docs: floordiv (#3797)
docs: add missing
annotated_astflag (#3813)docs: update logo in readme, remove competition reference (#3837)
docs: add rationale for floordiv rounding behavior (#3845)
chore[docs]: amend
revert_on_failurekwarg docs for create builtins (#3921)fix[docs]: fix clipped
endAuctionmethod in example section (#3969)refactor[docs]: refactor security policy (#3981)
fix: edit link to style guide (#3658)
Add Vyper online compiler tooling (#3680)
chore: fix typos (#3749)
Bugfixes¶
fix[codegen]: fix
raw_log()when topics are non-literals (#3977)fix[codegen]: fix transient codegen for
sliceandextract32(#3874)fix[codegen]: bounds check for signed index accesses (#3817)
fix: disallow
value=passing for delegate and static raw_calls (#3755)fix[codegen]: fix double evals in sqrt, slice, blueprint (#3976)
fix[codegen]: fix double eval in dynarray append/pop (#4030)
fix[codegen]: fix double eval of start in range expr (#4033)
fix[codegen]: overflow check in
slice()(#3818)fix: concat buffer bug (#3738)
fix[codegen]: fix
make_setteroverlap with internal calls (#4037)fix[codegen]: fix
make_setteroverlap indynarray_append(#4059)fix[codegen]:
make_setteroverlap in the presence ofstaticcall(#4128)fix[codegen]: fix
_abi_decodebuffer overflow (#3925)fix[codegen]: zero-length dynarray
abi_decodevalidation (#4060)fix[codegen]: recursive dynarray oob check (#4091)
fix[codegen]: add back in
returndatasizecheck (#4144)fix: block memory allocation overflow (#3639)
fix[codegen]: panic on potential eval order issue for some builtins (#4157)
fix[codegen]: panic on potential subscript eval order issue (#4159)
add comptime check for uint2str input (#3671)
fix: dead code analysis inside for loops (#3731)
fix[ir]: fix a latent bug in
sha3_64codegen (#4063)fix:
opcodesandopcodes_runtimeoutputs (#3735)fix: bad assertion in expr.py (#3758)
fix: iterator modification analysis (#3764)
feat: allow constant interfaces (#3718)
fix: assembly dead code eliminator (#3791)
fix: prevent range over decimal (#3798)
fix: mutability check for interface implements (#3805)
fix[codegen]: fix non-memory reason strings (#3877)
fix[ux]: fix compiler hang for large exponentiations (#3893)
fix[lang]: allow type expressions inside pure functions (#3906)
fix[ux]: raise
VersionExceptionwith source info (#3920)fix[lang]: fix
powfolding when args are not literals (#3949)fix[codegen]: fix some hardcoded references to
STORAGElocation (#4015)
Patched security advisories (GHSAs)¶
Bounds check on built-in
slice()function can be overflowed (GHSA-9x7f-gwxq-6f2c)concatbuilt-in can corrupt memory (GHSA-2q8v-3gqq-4f8p)raw_callvalue=kwargs not disabled for static and delegate calls (GHSA-x2c2-q32w-4w6m)negative array index bounds checks (GHSA-52xq-j7v9-v4v2)
range(start, start + N)reverts for negative numbers (GHSA-ppx5-q359-pvwj)incorrect topic logging in
raw_log(GHSA-xchq-w5r3-4wg3)double eval of the
slicestart/length args in certain cases (GHSA-r56x-j438-vw5m)multiple eval of
sqrt()built in argument (GHSA-5jrj-52x8-m64h)double eval of raw_args in
create_from_blueprint(GHSA-3whq-64q2-qfj6)sha3codegen bug (GHSA-6845-xw22-ffxv)extract32can read dirty memory (GHSA-4hwq-4cpm-8vmx)_abi_decodeMemory Overflow (GHSA-9p8r-4xp4-gw5w)External calls can overflow return data to return input buffer (GHSA-gp3w-2v2m-p686)
Tooling¶
feat[tool]: archive format (#3891)
feat[tool]: add source map for constructors (#4008)
feat: add short options
-vand-Oto the CLI (#3695)feat: Add
bbandbb_runtimeoutput options (#3700)fix: remove hex-ir from format cli options list (#3657)
fix: pickleability of
CompilerData(#3803)feat[tool]: validate AST nodes early in the pipeline (#3809)
feat[tool]: delay global constraint check (#3810)
feat[tool]: export variable read/write access (#3790)
feat[tool]: improvements to AST annotation (#3829)
feat[tool]: add
node_idmap to source map (#3811)chore[tool]: add help text for
hex-irCLI flag (#3942)refactor[tool]: refactor storage layout export (#3789)
fix[tool]: fix cross-compilation issues, add windows CI (#4014)
fix[tool]: star option in
outputSelection(#4094)
Performance¶
Testing suite improvements¶
refactor[test]: bypass
eth-testerand interface with evm backend directly (#3846)feat: Refactor assert_tx_failed into a context (#3706)
feat[test]: implement
abi_decodespec test (#4095)feat[test]: add more coverage to
abi_decodefuzzer tests (#4153)feat[ci]: enable cancun testing (#3861)
fix: add missing test for memory allocation overflow (#3650)
chore: fix test for
slice(#3633)add abi_types unit tests (#3662)
refactor: test directory structure (#3664)
chore: test all output formats (#3683)
chore: deduplicate test files (#3773)
feat[test]: add more transient storage tests (#3883)
chore[ci]: fix apt-get failure in era pipeline (#3821)
chore[ci]: enable python3.12 tests (#3860)
chore[ci]: refactor jobs to use gh actions (#3863)
chore[ci]: use
--dist workstealfrom latestxdist(#3869)chore: run mypy as part of lint rule in Makefile (#3771)
chore[test]: always specify the evm backend (#4006)
chore: update lint dependencies (#3704)
chore: add color to mypy output (#3793)
chore: remove tox rules for lint commands (#3826)
chore[ci]: roll back GH actions/artifacts version (#3838)
chore: Upgrade GitHub action dependencies (#3807)
chore[ci]: pin eth-abi for decode regression (#3834)
fix[ci]: release artifacts (#3839)
chore[ci]: merge mypy job into lint (#3840)
test: parametrize CI over EVM versions (#3842)
feat[ci]: add PR title validation (#3887)
fix[test]: fix failure in grammar fuzzing (#3892)
feat[test]: add
xfail_strict, clean upsetup.cfg(#3889)fix[ci]: pin hexbytes to pre-1.0.0 (#3903)
chore[test]: update hexbytes version and tests (#3904)
fix[test]: fix a bad bound in decimal fuzzing (#3909)
fix[test]: fix a boundary case in decimal fuzzing (#3918)
feat[ci]: update pypi release pipeline to use OIDC (#3912)
chore[ci]: reconfigure single commit validation (#3937)
chore[ci]: downgrade codecov action to v3 (#3940)
feat[ci]: add codecov configuration (#4057)
feat[test]: remove memory mocker (#4005)
refactor[test]: change fixture scope in examples (#3995)
fix[test]: fix call graph stability fuzzer (#4064)
chore[test]: add macos to test matrix (#4025)
refactor[test]: change default expected exception type (#4004)
Misc / refactor¶
feat[ir]: add
eval_oncesanity fences to more builtins (#3835)fix: reorder compilation of branches in stmt.py (#3603)
refactor[codegen]: make settings into a global object (#3929)
chore: improve exception handling in IR generation (#3705)
refactor: merge
annotation.pyandlocal.py(#3456)chore[ux]: remove deprecated python AST classes (#3998)
refactor[ux]: remove deprecated
VyperNodeproperties (#3999)feat: remove Index AST node (#3757)
refactor: for loop target parsing (#3724)
chore: improve diagnostics for invalid for loop annotation (#3721)
refactor: builtin functions inherit from
VyperType(#3559)fix: remove .keyword from Call AST node (#3689)
improvement: assert descriptions in Crowdfund finalize() and participate() (#3064)
feat: improve panics in IR generation (#3708)
feat: improve warnings, refactor
vyper_warn()(#3800)fix[ir]: unique symbol name (#3848)
refactor: remove duplicate terminus checking code (#3541)
refactor:
ExprVisitortype validation (#3739)chore: improve exception for type validation (#3759)
fix: fuzz test not updated to use TypeMismatch (#3768)
chore: fix StringEnum._generate_next_value_ signature (#3770)
chore: improve some error messages (#3775)
refactor:
get_search_paths()for vyper cli (#3778)chore: replace occurrences of ‘enum’ by ‘flag’ (#3794)
chore: add another borrowship test (#3802)
chore[ux]: improve an exports error message (#3822)
chore: improve codegen test coverage report (#3824)
chore: improve syntax error messages (#3885)
chore[tool]: remove
vyper-servefromsetup.py(#3936)fix[ux]: replace standard strings with f-strings (#3953)
chore[ir]: sanity check types in for range codegen (#3968)
v0.3.10 (“Black Adder”)¶
Date released: 2023-10-04¶
v0.3.10 is a performance focused release that additionally ships numerous bugfixes. It adds a codesize optimization mode (#3493), adds new vyper-specific #pragma directives (#3493), uses Cancun’s MCOPY opcode for some compiler generated code (#3483), and generates selector tables which now feature O(1) performance (#3496).
Audits: OtterSec, CodeHawks, ChainSecurity
Breaking changes:¶
Non-breaking changes and improvements:¶
Notable fixes:¶
fix
ecrecover()behavior when signature is invalid (GHSA-f5x6-7qgp-jhf3, #3586)fix: memory allocation in certain builtins using
msize(#3610)fix:
_abi_decode()input validation in certain complex expressions (#3626)fix: pycryptodome for arm builds (#3485)
let params of internal functions be mutable (#3473)
typechecking of folded builtins in (#3490)
update tload/tstore opcodes per latest 1153 EIP spec (#3484)
fix: raw_call type when max_outsize=0 is set (#3572)
fix: implements check for indexed event arguments (#3570)
fix: type-checking for
_abi_decode()arguments (#3626)
Other docs updates, chores and fixes:¶
relax restrictions on internal function signatures (#3573)
note on security advisory in release notes for versions
0.2.15,0.2.16, and0.3.0(#3553)fix: yanked version in release notes (#3545)
update release notes on yanked versions (#3547)
improve error message for conflicting methods IDs (#3491)
document epsilon builtin (#3552)
relax version pragma parsing (#3511)
fix: issue with finding installed packages in editable mode (#3510)
add note on security advisory for
ecrecoverin docs (#3539)add
asmoption to cli help (#3585)add message to error map for repeat range check (#3542)
fix: public constant arrays (#3536)
v0.3.9 (“Common Adder”)¶
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.
Audits: ChainSecurity
Fixes:
v0.3.8¶
Date released: 2023-05-23
Audits: ChainSecurity, ChainSecurity 2nd audit
Non-breaking changes and improvements:
transientstorage keyword (#3373)ternary operators (#3398)
raw_revert()builtin (#3136)shift operators (#3019)
make
send()gas stipend configurable (#3158)use new
push0opcode (#3361)python 3.11 support (#3129)
drop support for python 3.8 and 3.9 (#3325)
build for
aarch64(#2687)
Note that with the addition of push0 opcode, shanghai is now the default compilation target for vyper. When deploying to a chain which does not support shanghai, it is recommended to set --evm-version to paris, otherwise it could result in hard-to-debug errors.
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=0andrevert_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 (#3104, #3408, cf. GHSA-vxmm-cwh2-q762)
Other docs updates, chores and fixes:
call graph stability (#3370)
fix
vyper-serveoutput (#3338)add
custom:natspec tags (#3403)add missing pc maps to
vyper_jsonoutput (#3333)fix constructor context for internal functions (#3388)
add deprecation warning for
selfdestructusage (#3372)add bytecode metadata option to vyper-json (#3117)
fix compiler panic when a
breakis 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
notoperator 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
notconstant 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,viewfunctions (#3424)improve optimizer rules for comparison operators (#3412)
deploy to ghcr on push (#3435)
add note on return value bounds in interfaces (#3205)
index
idparam inURIevent ofERC1155ownable(#3203)add missing
assetfunction toERC4626built-in interface (#3295)clarify
skip_contract_check=Truecan result in undefined behavior (#3386)add
customNatSpec tag to docs (#3404)fix
uint256_addmoddoc (#3300)document optional kwargs for external calls (#3122)
remove
slice()length documentation caveats (#3152)fix docs of
blockhashto reflect revert behaviour (#3168)improvements to compiler error messages (#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 pull requests!) made it into this release! For the full list, please see the changelog. Special thanks to contributions from @tserg, @trocher, @z80dev, @emc415 and @benber86 in this release!
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)
v0.3.7¶
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: add
block.prevrandaoas 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¶
Date released: 2022-08-07
Bugfixes:
Fix
inexpressions when list members are variables (#3035)
v0.3.5¶
THIS RELEASE HAS BEEN PULLED
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
selfaddress in pure functions (#3027)
v0.3.4¶
Date released: 2022-07-27
Audits: ChainSecurity
Non-breaking changes and improvements:
Add
_abi_decodebuiltin (#2882)Add
create_from_blueprintandcreate_copy_ofbuiltins (#2895)Add
default_return_valuekwarg for calls (#2839)Add
min_valueandmax_valuebuiltins for numeric types (#2935)Add
uint2strbuiltin (#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.datainraw_callwithoutslice(#2902)Per-method calldatasize checks (#2911)
Type inference and annotation of arguments for builtin functions (#2817)
Allow varargs for
print(#2833)Add
error_mapoutput format for tooling consumption (#2939)Multiple evaluation of contract address in call (GHSA-4v9q-cgpw-cf38)
Improve ast output (#2824)
Allow
@nonreentranton 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)
Reverse order in which exceptions are reported (#2838)
Fix compile-time blowup for large contracts (#2981)
Rename
vyper-irbinary 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!
v0.3.3¶
Date released: 2022-04-22
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:
v0.3.2¶
Date released: 2022-04-17
Breaking changes:
Increase the bounds of the
decimaltype (#2730)Generalize and simplify the semantics of the
convertbuiltin (#2694)
Non-breaking changes and improvements:
Support all ABIv2 integer and bytes types (#2705)
Add storage layout override mechanism (#2593)
Support
<address>.codeattribute (#2583)Add
tx.gaspricebuiltin (#2624)Allow structs as constant variables (#2617)
Implement
skip_contract_checkkwarg (#2551)Support EIP-2678 ethPM manifest files (#2628)
Add
metadataoutput format (#2597)Allow
msg.*variables in internal functions (#2632)Add
unsafe_arithmetic builtins (#2629)Add subroutines to Vyper IR (#2598)
Add
selectopcode 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)
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 @tserg for typechecker fixes and significant testing of new features! Additional contributors to this release include @abdullathedruid, @hi-ogawa, @skellet0r, @fubuloubu, @onlymaresia, @SwapOperator, @hitsuzen-eth, @Sud0u53r, @davidhq.
v0.3.1¶
Date released: 2021-12-01
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 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)
Special thanks to @skellet0r for some major features in this release!
v0.3.0¶
⚠️ A critical security vulnerability has been discovered in this version and we strongly recommend using version 0.3.1 or higher. For more information, please see the Security Advisory GHSA-5824-cm3x-3c38.
Date released: 2021-10-04
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!
v0.2.16¶
⚠️ A critical security vulnerability has been discovered in this version and we strongly recommend using version 0.3.1 or higher. For more information, please see the Security Advisory GHSA-5824-cm3x-3c38.
Date released: 2021-08-27
Non-breaking changes and improvements:
Expose _abi_encode as a user-facing builtin (#2401)
Export the storage layout as a compiler output option (#2433)
Add experimental OVM backend (#2416)
Allow any ABI-encodable type as event arguments (#2403)
Optimize int128 clamping (#2411)
Fixes:
Disallow nonreentrant decorator on constructors (#2426)
Fix bounds checks when handling msg.data (#2419)
Allow interfaces in lists, structs and maps (#2397)
Fix trailing newline parse bug (#2412)
Special thanks to contributions from @skellet0r, @sambacha and @milancermak for this release!
v0.2.15¶
⚠️ A critical security vulnerability has been discovered in this version and we strongly recommend using version 0.3.1 or higher. For more information, please see the Security Advisory GHSA-5824-cm3x-3c38.
Date released: 23-07-2021
Non-breaking changes and improvements - Optimization when returning nested tuples (#2392)
Fixes: - Annotated kwargs for builtins (#2389) - Storage slot allocation bug (#2391)
v0.2.14¶
THIS RELEASE HAS BEEN PULLED
Date released: 20-07-2021
Non-breaking changes and improvements: - Reduce bytecode by sharing code for clamps (#2387)
Fixes: - Storage corruption from re-entrancy locks (#2379)
v0.2.13¶
THIS RELEASE HAS BEEN PULLED
Date released: 06-07-2021
Non-breaking changes and improvements:
v0.2.12¶
Date released: 16-04-2021
This release fixes a memory corruption bug (#2345) that was introduced in the v0.2.x series and was not fixed in VVE-2020-0004. Read about it further in VVE-2021-0001.
Non-breaking changes and improvements:
v0.2.11¶
Date released: 27-02-2021
This is a quick patch release to fix a memory corruption bug that was introduced in v0.2.9 (#2321) with excessive memory deallocation when releasing internal variables
v0.2.10¶
THIS RELEASE HAS BEEN PULLED
Date released: 17-02-2021
This is a quick patch release to fix incorrect generated ABIs that was introduced in v0.2.9 (#2311) where storage variable getters were incorrectly marked as nonpayable instead of view
v0.2.9¶
THIS RELEASE HAS BEEN PULLED
Date released: 16-02-2021
Non-breaking changes and improvements: - Add license to wheel, Anaconda support (#2265) - Consider events during type-check with implements: (#2283) - Refactor ABI generation (#2284) - Remove redundant checks in parser/signatures (#2288) - Streamling ABI-encoding logic for tuple return types (#2302) - Optimize function ordering within bytecode (#2303) - Assembly-level optimizations (#2304) - Optimize nonpayable assertion (#2307) - Optimize re-entrancy locks (#2308)
Fixes: - Change forwarder proxy bytecode to ERC-1167 (#2281) - Reserved keywords check update (#2286) - Incorrect type-check error in literal lists (#2309)
Tons of Refactoring work courtesy of (@iamdefinitelyahuman)!
v0.2.8¶
Date released: 04-12-2020
Non-breaking changes and improvements:
AST updates to provide preliminary support for Python 3.9 (#2225)
Support for the
not incomparator (#2232)Lift restriction on calldata variables shadowing storage variables (#2226)
Optimize
shiftbytecode when 2nd arg is a literal (#2201)Warn when EIP-170 size limit is exceeded (#2208)
Fixes:
Allow use of
sliceon a calldatabytes32(#2227)Explicitly disallow iteration of a list of structs (#2228)
Improved validation of address checksums (#2229)
Bytes are always represented as hex within the AST (#2231)
Allow
emptyas an argument within a function call (#2234)Allow
emptystatic-sized array as an argument within alogstatement (#2235)Compile-time issue with
Bytesvariables as a key in a mapping (#2239)
v0.2.7¶
Date released: 10-14-2020
This is a quick patch release to fix a runtime error introduced in v0.2.6 (#2188) that could allow for memory corruption under certain conditions.
Non-breaking changes and improvements:
Optimizations around
assertandraise(#2198)Simplified internal handling of memory variables (#2194)
Fixes:
v0.2.6¶
THIS RELEASE HAS BEEN PULLED
Date released: 10-10-2020
Non-breaking changes and improvements:
Release and reuse memory slots within the same function (#2188)
Allow implicit use of
uint256as iterator type in range-based for loops (#2180)Optimize clamping logic for
int128(#2179)Calculate array index offsets at compile time where possible (#2187)
Improved exception for invalid use of dynamically sized struct (#2189)
Improved exception for incorrect arg count in function call (#2178)
Improved exception for invalid subscript (#2177)
Fixes:
v0.2.5¶
Date released: 30-09-2020
Non-breaking changes and improvements:
Improve exception on incorrect interface (#2131)
Standalone binary preparation (#2134)
Improve make freeze (#2135)
Remove Excessive Scoping Rules on Local Variables (#2166)
Optimize nonpayable check for contracts that do not accept ETH (#2172)
Optimize safemath on division-by-zero with a literal divisor (#2173)
Optimize multiple sequential memory-zeroings (#2174)
Optimize size-limit checks for address and bool types (#2175)
Fixes:
Constant folding on lhs of assignments (#2137)
ABI issue with bytes and string arrays inside tuples (#2140)
Returning struct from a external function gives error (#2143)
Error messages with struct display all members (#2160)
The returned struct value from the external call doesn’t get stored properly (#2164)
Improved exception on invalid function-scoped assignment (#2176)
v0.2.4¶
Date released: 03-08-2020
Non-breaking changes and improvements:
Improve EOF Exceptions (#2115)
Improve exception messaging for type mismatches (#2119)
Ignore trailing newline tokens (#2120)
Fixes:
v0.2.3¶
Date released: 16-07-2020
Non-breaking changes and improvements:
Show contract names in raised exceptions (#2103)
Adjust function offsets to not include decorators (#2102)
Raise certain exception types immediately during module-scoped type checking (#2101)
Fixes:
v0.2.2¶
Date released: 04-07-2020
Fixes:
v0.2.1¶
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:
@publicand@privatefunction decorators have been renamed to@externaland@internal(VIP #2065)The
@constantdecorator has been renamed to@view(VIP #2040)Type units have been removed (VIP #1881)
Event declaration syntax now resembles that of struct declarations (VIP #1864)
logis now a statement (VIP #1864)Mapping declaration syntax changed to
HashMap[key_type, value_type](VIP #1969)Interfaces are now declared via the
interfacekeyword instead ofcontract(VIP #1825)bytesandstringtypes are now written asBytesandString(#2080)bytesandstringliterals must now be bytes or regular strings, respectively. They are no longer interchangeable. (VIP #1876)assert_modifiablehas been removed, you can now directly perform assertions on calls (#2050)valueis no longer an allowable variable name in a function input (VIP #1877)The
slicebuiltin function expectsuint256for thestartandlengthargs (VIP #1986)lenreturn type is nowuint256(VIP #1979)valueandgaskwargs for external function calls must be given asuint256(VIP #1878)The
outsizekwarg inraw_callhas been renamed tomax_outsize(#1977)The
typekwarg inextract32has been renamed tooutput_type(#2036)Public array getters now use
uint256for their input argument(s) (VIP #1983)Public struct getters now return all values of a struct (#2064)
RLPListhas been removed (VIP #1866)
The following non-breaking VIPs and features were implemented:
Implement boolean condition short circuiting (VIP #1817)
Add the
emptybuiltin 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
@puredecorator (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_idoptional (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_callcan now be used to perform aSTATICCALL(#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
incomparator (#2070)Prevent modification of a storage array during iteration via
forloop (#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)!
NOTE: v0.2.0 was not used due to a conflict in PyPI with a previous release. Both tags v0.2.0 and v0.2.1 are identical.
v0.1.0-beta.17¶
Date released: 24-03-2020
The following VIPs and features were implemented for Beta 17:
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:
EVM Ruleset Switch (VIP #1230)
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
implementsstatement (#1774)Fixed how certain values compared when using
minandmax(#1790)Removed unnecessary overflow checks on
addmodandmulmod(#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-jsoncompatibility withsolcsettings (#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)
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
bytes32inraw_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
sqrton certain datatypes (#1679)Prevent shadowing of internal variables (#1601)
Reject unary subtraction on unsigned types (#1638)
Disallow
orelsesyntax inforloops (#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-jsoncompilation mode (VIP #1520)Environment variables and constants can now be used as default parameters (VIP #1525)
Require uninitialized memory be set on creation (VIP #1493)
Some of the bug and stability fixes:
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/@constantlogical 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.clirearchitecture 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)
Array copy optimisation (#1487)
Fixing
@nonreentrantdecorator for return statements (#1532)sha3builtin function removed (#1328)Disallow conflicting method IDs (#1530)
Equality operator for strings and bytes (#1507)
Change in
compile_codesinterface 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 .. rangeexpression. (#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>, UNREACHABLEstatement. (#711)
Special thanks to (Charles Cooper), for some excellent contributions this release.
v0.1.0-beta.9¶
Date released: 12-03-2019
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_ofhas been renamed tocreate_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 ERC20to use.2019.01.30: Byte array literals need to be annotated using
b"", strings are represented as “”.2018.12.12: Disallow use of
None, disallow use ofdel, implementedclear()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_valueto beuint256.2018.04.03: Changed bytes declaration from
bytes <= ntobytes[n].2018.03.27: Renaming
signed256toint256.2018.03.22: Add modifiable and static keywords for external contract calls.
2018.03.20: Renaming
__log__toevent.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_valueto use quotes for units.2017.12.25: Change name from Viper to Vyper.
2017.12.22: Add
continuefor loops2017.11.29:
@internalrenamed to@private.2017.11.15: Functions require either
@internalor@publicdecorators.2017.07.25: The
def foo() -> num(const): ...syntax no longer works; you now need to dodef foo() -> num: ...with a@constantdecorator on the previous line.2017.07.25: Functions without a
@payabledecorator 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