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 (https://github.com/vyperlang/vyper/pull/4178)
* feat[codegen]!: check `returndatasize` even when `skip_contract_check` is set (https://github.com/vyperlang/vyper/pull/4148)
* fix[stdlib]!: fix `IERC4626` signatures (https://github.com/vyperlang/vyper/pull/4425)
* fix[lang]!: disallow absolute relative imports (https://github.com/vyperlang/vyper/pull/4268)
Other new features and improvements
* feat[lang]: add `module.__at__()` to cast to interface (https://github.com/vyperlang/vyper/pull/4090)
* feat[lang]: use keyword arguments for event instantiation (https://github.com/vyperlang/vyper/pull/4257)
* feat[lang]: add native hex string literals (https://github.com/vyperlang/vyper/pull/4271)
* feat[lang]: introduce `mana` as an alias for `gas` (https://github.com/vyperlang/vyper/pull/3713)
* feat[lang]: support top level `"abi"` key in json interfaces (https://github.com/vyperlang/vyper/pull/4279)
* feat[lang]: support flags from imported interfaces (https://github.com/vyperlang/vyper/pull/4253)
* feat[ux]: allow "compiling" `.vyi` files (https://github.com/vyperlang/vyper/pull/4290)
* feat[ux]: improve hint for events kwarg upgrade (https://github.com/vyperlang/vyper/pull/4275)
Tooling / CLI
* feat[tool]: add `-Werror` and `-Wnone` options (https://github.com/vyperlang/vyper/pull/4447)
* feat[tool]: support storage layouts via `json` and `.vyz` inputs (https://github.com/vyperlang/vyper/pull/4370)
* feat[tool]: add integrity hash to initcode (https://github.com/vyperlang/vyper/pull/4234)
* fix[ci]: fix commithash calculation for pypi release (https://github.com/vyperlang/vyper/pull/4309)
* fix[tool]: include structs in `-f interface` output (https://github.com/vyperlang/vyper/pull/4294)
* feat[tool]: separate import resolution pass (https://github.com/vyperlang/vyper/pull/4229)
* feat[tool]: add all imported modules to `-f annotated_ast` output (https://github.com/vyperlang/vyper/pull/4209)
* fix[tool]: add missing internal functions to metadata (https://github.com/vyperlang/vyper/pull/4328)
* fix[tool]: update VarAccess pickle implementation (https://github.com/vyperlang/vyper/pull/4270)
* fix[tool]: fix output formats for .vyz files (https://github.com/vyperlang/vyper/pull/4338)
* fix[tool]: add missing user errors to error map (https://github.com/vyperlang/vyper/pull/4286)
* fix[ci]: fix README encoding in `setup.py` (https://github.com/vyperlang/vyper/pull/4348)
* refactor[tool]: refactor `compile_from_zip()` (https://github.com/vyperlang/vyper/pull/4366)
Bugfixes
* fix[lang]: add `raw_log()` constancy check (https://github.com/vyperlang/vyper/pull/4201)
* fix[lang]: use folded node for typechecking (https://github.com/vyperlang/vyper/pull/4365)
* fix[ux]: fix error message for \"staticall\" typo (https://github.com/vyperlang/vyper/pull/4438)
* fix[lang]: fix certain varinfo comparisons (https://github.com/vyperlang/vyper/pull/4164)
* fix[codegen]: fix `abi_encode` buffer size in external calls (https://github.com/vyperlang/vyper/pull/4202)
* fix[lang]: fix `==` and `!=` bytesM folding (https://github.com/vyperlang/vyper/pull/4254)
* fix[lang]: fix `.vyi` function body check (https://github.com/vyperlang/vyper/pull/4177)
* fix[venom]: invalid jump error (https://github.com/vyperlang/vyper/pull/4214)
* fix[lang]: fix precedence in floordiv hint (https://github.com/vyperlang/vyper/pull/4203)
* fix[lang]: define rounding mode for sqrt (https://github.com/vyperlang/vyper/pull/4486)
* fix[codegen]: disable augassign with overlap (https://github.com/vyperlang/vyper/pull/4487)
* fix[codegen]: relax the filter for augassign oob check (https://github.com/vyperlang/vyper/pull/4497)
* fix[lang]: fix panic in call cycle detection (https://github.com/vyperlang/vyper/pull/4200)
* fix[tool]: update `InterfaceT.__str__` implementation (https://github.com/vyperlang/vyper/pull/4205)
* fix[tool]: fix classification of AST nodes (https://github.com/vyperlang/vyper/pull/4210)
* fix[tool]: keep `experimentalCodegen` blank in standard json input (https://github.com/vyperlang/vyper/pull/4216)
* fix[ux]: fix relpath compiler panic on windows (https://github.com/vyperlang/vyper/pull/4228)
* fix[ux]: fix empty hints in error messages (https://github.com/vyperlang/vyper/pull/4351)
* fix[ux]: fix validation for `abi_encode()` `method_id` kwarg (https://github.com/vyperlang/vyper/pull/4369)
* fix[ux]: fix false positive for overflow in type checker (https://github.com/vyperlang/vyper/pull/4385)
* fix[ux]: add missing filename to syntax exceptions (https://github.com/vyperlang/vyper/pull/4343)
* fix[ux]: improve error message on failed imports (https://github.com/vyperlang/vyper/pull/4409)
* fix[parser]: fix bad tokenization of hex strings (https://github.com/vyperlang/vyper/pull/4406)
* fix[lang]: fix encoding of string literals (https://github.com/vyperlang/vyper/pull/3091)
* fix[codegen]: fix assertions for certain precompiles (https://github.com/vyperlang/vyper/pull/4451)
* fix[lang]: allow `print()` schema larger than 32 bytes (https://github.com/vyperlang/vyper/pull/4456)
* fix[codegen]: fix iteration over constant literals (https://github.com/vyperlang/vyper/pull/4462)
* fix[codegen]: fix gas usage of iterators (https://github.com/vyperlang/vyper/pull/4485)
* fix[codegen]: cache result of iter eval (https://github.com/vyperlang/vyper/pull/4488)
* fix[lang]: fix recursive interface imports (https://github.com/vyperlang/vyper/pull/4303)
* fix[tool]: roll back OS used to build binaries (https://github.com/vyperlang/vyper/pull/4494)
Patched security advisories (GHSAs)
* success of certain precompiles not checked ([GHSA-vgf2-gvx8-xwc3](https://github.com/vyperlang/vyper/security/advisories/GHSA-vgf2-gvx8-xwc3)
* AugAssign evaluation order causing OOB write within object ([GHSA-4w26-8p97-f4jp](https://github.com/vyperlang/vyper/security/advisories/GHSA-4w26-8p97-f4jp)
* `sqrt` doesn\'t define rounding behavior ([GHSA-2p94-8669-xg86](https://github.com/vyperlang/vyper/security/advisories/GHSA-2p94-8669-xg86)
* multiple eval in `for` list iterator ([GHSA-h33q-mhmp-8p67](https://github.com/vyperlang/vyper/security/advisories/GHSA-h33q-mhmp-8p67)
Venom improvements
* feat[venom]: add venom parser (https://github.com/vyperlang/vyper/pull/4381)
* feat[venom]: new `DFTPass` algorithm (https://github.com/vyperlang/vyper/pull/4255)
* feat[venom]: only `stack_reorder` before join points (https://github.com/vyperlang/vyper/pull/4247)
* feat[venom]: add function inliner (https://github.com/vyperlang/vyper/pull/4478)
* feat[venom]: add binop optimizations (https://github.com/vyperlang/vyper/pull/4281)
* feat[venom]: offset instruction (https://github.com/vyperlang/vyper/pull/4180)
* feat[venom]: make dft-pass commutative aware (https://github.com/vyperlang/vyper/pull/4358)
* perf[venom]: add `OrderedSet.last()` (https://github.com/vyperlang/vyper/pull/4236)
* feat[venom]: improve liveness computation time (https://github.com/vyperlang/vyper/pull/4086)
* fix[venom]: fix invalid `phi`s after SCCP (https://github.com/vyperlang/vyper/pull/4181)
* fix[venom]: clean up sccp pass (https://github.com/vyperlang/vyper/pull/4261)
* refactor[venom]: remove `dup_requirements` analysis (https://github.com/vyperlang/vyper/pull/4262)
* fix[venom]: remove duplicate volatile instructions (https://github.com/vyperlang/vyper/pull/4263)
* fix[venom]: fix `_stack_reorder()` routine (https://github.com/vyperlang/vyper/pull/4220)
* feat[venom]: store expansion pass (https://github.com/vyperlang/vyper/pull/4068)
* feat[venom]: add effects to instructions (https://github.com/vyperlang/vyper/pull/4264)
* feat[venom]: add small heuristic for cleaning input stack (https://github.com/vyperlang/vyper/pull/4251)
* refactor[venom]: refactor module structure (https://github.com/vyperlang/vyper/pull/4295)
* refactor[venom]: refactor sccp pass to use dfg (https://github.com/vyperlang/vyper/pull/4329)
* refactor[venom]: update translator for `deploy` instruction (https://github.com/vyperlang/vyper/pull/4318)
* feat[venom]: make cfg scheduler "stack aware" (https://github.com/vyperlang/vyper/pull/4356)
* feat[venom]: improve liveness computation (https://github.com/vyperlang/vyper/pull/4330)
* refactor[venom]: optimize lattice evaluation (https://github.com/vyperlang/vyper/pull/4368)
* perf[venom]: improve OrderedSet operations (https://github.com/vyperlang/vyper/pull/4246)
* fix[venom]: promote additional memory locations to variables (https://github.com/vyperlang/vyper/pull/4039)
* feat[venom]: add codesize optimization pass (https://github.com/vyperlang/vyper/pull/4333)
* fix[venom]: fix unused variables pass (https://github.com/vyperlang/vyper/pull/4259)
* refactor[venom]: move commutative instruction set (https://github.com/vyperlang/vyper/pull/4307)
* fix[venom]: add `make_ssa` pass after algebraic optimizations (https://github.com/vyperlang/vyper/pull/4292)
* feat[venom]: reduce legacy opts when venom is enabled (https://github.com/vyperlang/vyper/pull/4336)
* fix[venom]: fix duplicate allocas (https://github.com/vyperlang/vyper/pull/4321)
* fix[venom]: add missing extcodesize+hash effects (https://github.com/vyperlang/vyper/pull/4373)
* refactor[ux]: add `venom` as `experimental-codegen` alias (https://github.com/vyperlang/vyper/pull/4337)
* feat[venom]: allow alphanumeric variables and source comments (https://github.com/vyperlang/vyper/pull/4403)
* feat[venom]: cleanup variable version handling (https://github.com/vyperlang/vyper/pull/4404)
* feat[venom]: merge memory writes (https://github.com/vyperlang/vyper/pull/4341)
* refactor[venom]: make venom repr parseable (https://github.com/vyperlang/vyper/pull/4402)
* feat[venom]: propagate `dload` instruction to venom (https://github.com/vyperlang/vyper/pull/4410)
* feat[venom]: remove special cases in store elimination (https://github.com/vyperlang/vyper/pull/4413)
* feat[venom]: update text format for data section (https://github.com/vyperlang/vyper/pull/4414)
* feat[venom]: add load elimination pass (https://github.com/vyperlang/vyper/pull/4265)
* fix[venom]: fix `MakeSSA` with existing phis (https://github.com/vyperlang/vyper/pull/4423)
* refactor[venom]: refactor mem2var (https://github.com/vyperlang/vyper/pull/4421)
* fix[venom]: fix store elimination pass (https://github.com/vyperlang/vyper/pull/4428)
* refactor[venom]: add `make_nop()` helper function (https://github.com/vyperlang/vyper/pull/4470)
* feat[venom]: improve load elimination (https://github.com/vyperlang/vyper/pull/4407)
* refactor[venom]: replace `bb.mark_for_removal` with `make_nop` (https://github.com/vyperlang/vyper/pull/4474)
Docs
* chore[docs]: add `method_id` to `abi_encode` signature (https://github.com/vyperlang/vyper/pull/4355)
* chore[docs]: mention the `--venom` flag in venom docs (https://github.com/vyperlang/vyper/pull/4353)
* feat[docs]: add bug bounty program to security policy (https://github.com/vyperlang/vyper/pull/4230)
* feat[docs]: add installation via pipx and uv (https://github.com/vyperlang/vyper/pull/4274)
* chore[docs]: add binary installation methods (https://github.com/vyperlang/vyper/pull/4258)
* chore[docs]: update `sourceMap` field descriptions (https://github.com/vyperlang/vyper/pull/4170)
* chore[docs]: remove experimental note for cancun (https://github.com/vyperlang/vyper/pull/4183)
* chore[venom]: expand venom docs (https://github.com/vyperlang/vyper/pull/4314)
* chore[docs]: abi function signature for default arguments (https://github.com/vyperlang/vyper/pull/4415)
* feat[docs]: add Telegram badge to README.md (https://github.com/vyperlang/vyper/pull/4342)
* chore[docs]: update readme about testing (https://github.com/vyperlang/vyper/pull/4448)
* chore[docs]: `nonpayable` `internal` function behaviour (https://github.com/vyperlang/vyper/pull/4416)
* chore[docs]: add `FUNDING.json` for drips funding (https://github.com/vyperlang/vyper/pull/4167)
* chore[docs]: add giveth to `FUNDING.yml` (https://github.com/vyperlang/vyper/pull/4466)
* chore[tool]: update `FUNDING.json` for optimism RPGF (https://github.com/vyperlang/vyper/pull/4218)
* chore[tool]: mention that output format is comma separated (https://github.com/vyperlang/vyper/pull/4467)
Test suite improvements
* refactor[venom]: add new venom test machinery (https://github.com/vyperlang/vyper/pull/4401)
* feat[ci]: use `coverage combine` to reduce codecov uploads (https://github.com/vyperlang/vyper/pull/4452)
* feat[test]: add hevm harness for venom passes (https://github.com/vyperlang/vyper/pull/4460)
* fix[test]: fix test in grammar fuzzer (https://github.com/vyperlang/vyper/pull/4150)
* chore[test]: fix a type hint (https://github.com/vyperlang/vyper/pull/4173)
* chore[ci]: add auto-labeling workflow (https://github.com/vyperlang/vyper/pull/4276)
* fix[test]: fix some clamper tests (https://github.com/vyperlang/vyper/pull/4300)
* refactor[test]: add some sanity checks to `abi_decode` tests (https://github.com/vyperlang/vyper/pull/4096)
* chore[ci]: enable Python `3.13` tests (https://github.com/vyperlang/vyper/pull/4386)
* chore[ci]: update codecov github action to v5 (https://github.com/vyperlang/vyper/pull/4437)
* chore[ci]: bump upload-artifact action to v4 (https://github.com/vyperlang/vyper/pull/4445)
* chore[ci]: separate codecov upload into separate job (https://github.com/vyperlang/vyper/pull/4455)
* chore[ci]: improve coverage jobs (https://github.com/vyperlang/vyper/pull/4457)
* chore[ci]: update ubuntu image for `build` job (https://github.com/vyperlang/vyper/pull/4473)
Misc / Refactor
* refactor[parser]: remove `ASTTokens` (https://github.com/vyperlang/vyper/pull/4364)
* refactor[codegen]: remove redundant `IRnode.from_list` (https://github.com/vyperlang/vyper/pull/4151)
* feat[ux]: move exception hint to the end of the message (https://github.com/vyperlang/vyper/pull/4154)
* fix[ux]: improve error message for bad hex literals (https://github.com/vyperlang/vyper/pull/4244)
* refactor[lang]: remove translated fields for constant nodes (https://github.com/vyperlang/vyper/pull/4287)
* refactor[ux]: refactor preparser (https://github.com/vyperlang/vyper/pull/4293)
* refactor[codegen]: add profiling utils (https://github.com/vyperlang/vyper/pull/4412)
* refactor[lang]: remove VyperNode `__hash__()` and `__eq__()` implementations (https://github.com/vyperlang/vyper/pull/4433)
New Contributors
* rimrakhimov made their first contribution in https://github.com/vyperlang/vyper/pull/4170
* ZhipengXue97 made their first contribution in https://github.com/vyperlang/vyper/pull/4173
* HodanPlodky made their first contribution in https://github.com/vyperlang/vyper/pull/4180
* sandbubbles made their first contribution in https://github.com/vyperlang/vyper/pull/4294
* rafael-abuawad made their first contribution in https://github.com/vyperlang/vyper/pull/4342
* Philogy made their first contribution in https://github.com/vyperlang/vyper/pull/4381
**Full Changelog**: https://github.com/vyperlang/vyper/compare/v0.4.0...v0.4.1