github vyperlang/vyper v0.4.1

2 days ago

What's Changed

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

  • feat[lang]!: make @external modifier optional in .vyi files (#4178)
  • feat[codegen]!: check returndatasize even when skip_contract_check is set (#4148)
  • fix[stdlib]!: fix IERC4626 signatures (#4425)
  • fix[lang]!: disallow absolute relative imports (#4268)

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 mana as an alias for gas (#3713)
  • feat[lang]: support top level "abi" key in json interfaces (#4279)
  • feat[lang]: support flags from imported interfaces (#4253)
  • feat[ux]: allow "compiling" .vyi files (#4290)
  • feat[ux]: improve hint for events kwarg upgrade (#4275)

Tooling / CLI

  • feat[tool]: add -Werror and -Wnone options (#4447)
  • feat[tool]: support storage layouts via json and .vyz inputs (#4370)
  • feat[tool]: add integrity hash to initcode (#4234)
  • fix[ci]: fix commithash calculation for pypi release (#4309)
  • fix[tool]: include structs in -f interface output (#4294)
  • feat[tool]: separate import resolution pass (#4229)
  • feat[tool]: add all imported modules to -f annotated_ast output (#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_encode buffer size in external calls (#4202)
  • fix[lang]: fix == and != bytesM folding (#4254)
  • fix[lang]: fix .vyi function 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 experimentalCodegen blank 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_id kwarg (#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)

Venom improvements

  • feat[venom]: add venom parser (#4381)
  • feat[venom]: new DFTPass algorithm (#4255)
  • feat[venom]: only stack_reorder before 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_requirements analysis (#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 deploy instruction (#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_ssa pass 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 venom as experimental-codegen alias (#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 dload instruction 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 MakeSSA with 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_removal with make_nop (#4474)

Docs

  • chore[docs]: add method_id to abi_encode signature (#4355)
  • chore[docs]: mention the --venom flag 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 sourceMap field 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]: nonpayable internal function behaviour (#4416)
  • chore[docs]: add FUNDING.json for drips funding (#4167)
  • chore[docs]: add giveth to FUNDING.yml (#4466)
  • chore[tool]: update FUNDING.json for 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 combine to 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_decode tests (#4096)
  • chore[ci]: enable Python 3.13 tests (#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 build job (#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)

New Contributors

Full Changelog: v0.4.0...v0.4.1

Don't miss a new vyper release

NewReleases is sending notifications on new releases.