Home / Smart Contract Auditing / Solidity Compiler v0.8.35 Released with ERC-7201 Comptime Builtin and Experimental SSA CFG Generator

Solidity Compiler v0.8.35 Released with ERC-7201 Comptime Builtin and Experimental SSA CFG Generator

The development team behind the widely used smart contract programming language has officially announced the release of Solidity Compiler version v0.8.35. This latest update introduces several significant advancements designed to streamline developer workflows, improve optimization pipelines, and lay robust architectural groundwork for future major versions. Among the core additions are a compile-time builtin for ERC-7201 namespaced storage layouts, a formalization of experimental compiler features supported by a new top-level master toggle flag, an experimental Static Single-Assignment control-flow graph (SSA CFG) code generator aimed at combating long-standing compilation bottlenecks, and a series of critical bug fixes and deprecation warnings ahead of the upcoming 0.9.0 release.

Some of these advanced features were initially previewed earlier in the year through the v0.8.35-pre.1 pre-release, giving early adopters an opportunity to test preliminary builds. With the official rollout, developers can now integrate these tools into their production and staging environments, provided they adhere to the newly established experimental safety guidelines.

Notable Features and Changes

The erc7201 Comptime Builtin

A primary highlight of Solidity 0.8.35 is the introduction of a new builtin function named erc7201. Designed to accept a namespace string and return a calculated storage slot integer, the function implements the formula defined in the ERC-7201 standard. This formula computes the base storage slot as equivalent to keccak256(keccak256(id) - 1) & ~0xff. ERC-7201 has become an industry standard for formalizing the practice of placing a contract’s state behind a hashed namespace, thereby preventing storage collisions in proxy-based and diamond-style upgradeable smart contract architectures.

This new builtin pairs seamlessly with the layout at storage layout specifier introduced in version 0.8.29 and subsequently extended in 0.8.31. Developers can define contracts using syntax such as contract MyContract layout at erc7201("openzeppelin.storage.MyContract") uint256 x; uint256 y; .

What makes the erc7201 function fundamentally unique is that it marks the very first compile-time (comptime) builtin in the history of the language. Previously, Solidity’s comptime evaluator was strictly limited to arithmetic operations performed on rational number literals. While older builtins like keccak256 benefited from constant folding during the optimization stage—meaning developers received gas savings without type-system benefits—they could not be utilized within a comptime context like a storage layout specifier or an array length definition. The erc7201 builtin breaks this barrier, and the development team anticipates introducing additional comptime builtins as they gradually expand the capabilities of the language’s evaluation engine.

Formalizing the Experimental Feature Process

In past releases, introducing in-development features often relied on a fragmented mix of ad-hoc command-line interface flags and pragma experimental directives. This decentralized approach lacked a consistent way for developers to signal or realize that they were opting into unstable functionality, resulting in patchy metadata and potential unpredictability.

Version 0.8.35 addresses this by formalizing the experimental feature process through a comprehensive documentation update and strict compiler enforcement. Utilizing any experimental feature now requires the inclusion of a new top-level --experimental flag on the command line, or the corresponding boolean settings.experimental field within Standard JSON input structures. Serving as a master toggle, --experimental does not independently activate any specific feature, but rather acts as a mandatory gatekeeper that must be satisfied for individual per-feature flags or pragmas to be accepted by the compiler.

Attempting to use experimental features without the master flag now triggers a hard compilation error. Developers who previously passed affected flags directly will need to update their build pipelines to include the master flag. This policy change emphasizes that experimental features carry no stability guarantees and remain subject to breaking changes even during non-breaking compiler releases. Furthermore, whether a contract has been compiled with experimental mode enabled is now permanently recorded within both JSON and CBOR metadata outputs, closing a previous loophole where targeting unreleased Ethereum Virtual Machine versions could inadvertently produce experimental bytecode without explicit flag indication.

Experimental SSA CFG Code Generator

Solidity 0.8.35 also delivers an experimental new EVM backend for the Intermediate Representation (IR) pipeline. This new code generator constructs bytecode directly from a program’s Static Single-Assignment form control-flow graphs, generating an SSA CFG for each function alongside a precomputed stack layout that the backend subsequently uses to shuffle the EVM stack.

This architectural shift directly targets two of the most persistent pain points reported by developers: slow compilation times and frustrating stack-too-deep errors. According to recent developer surveys, stack-too-deep errors remain the single most commonly encountered recurring issue for smart contract engineers. Meanwhile, compilation via the IR pipeline has historically been measurably slower than the traditional legacy evmasm pipeline. The conventional Yul-to-EVM code transformation relies heavily on heuristics that often struggle when processing deeply nested expressions and complex control-flow patterns. By moving to an SSA-based backend, the compiler gains a much stronger structural foundation for efficient stack scheduling and execution performance, representing the long-term solution to these pipeline limitations.

The experimental code generator can be enabled via the command line using --experimental --via-ssa-cfg, or through Standard JSON by combining settings.experimental: true with settings.viaSSACFG: true. Both configurations automatically imply --via-ir. Although the code generator is continuously tested against the extensive external-contract semantic test suite during development, it remains an early experimental release. It is not yet set as the default behavior for --via-ir, and thorough reviews, fuzzing, and external security audits will be completed before it eventually replaces the existing default pipeline.

Deprecation Warnings for Upcoming 0.9.0 Keywords

Continuing the systematic deprecation path initiated in version 0.8.31, the 0.8.35 release introduces new warning messages for various identifiers that are scheduled to be promoted to reserved keywords in the upcoming major 0.9.0 release. While earlier deprecations primarily focused on removing obsolete features, this current batch focuses entirely on claiming names to prevent future namespace conflicts.

Solidity declarations that utilize identifiers such as at, error, layout, leave, super, this, or transient will now generate compiler warnings. Additionally, within standalone or inline Yul assembly blocks, the identifier leave will become a formal Yul keyword, while terms like basefee, blobbasefee, blobhash, clz, mcopy, memoryguard, prevrandao, tload, and tstore will transition into reserved Yul identifiers. Because these reserved terms represent standard Yul builtins, keeping them unrestricted until now was an artifact of the extended 0.8.x release cycle, governed by strict backwards-compatibility policies. These notices are currently issued as warnings rather than fatal errors, affording development teams a structured window of time to safely rename affected declarations before version 0.9.0 converts the warnings into strict compilation failures.

Revert Strings Strip and Custom Errors

Another notable improvement in this release resolves an inconsistency involving the --revert-strings strip compilation setting, known as revertStrings: "strip" in Standard JSON. This optimization option reduces overall bytecode size by stripping out revert reason strings while still allowing transactions to revert safely, based on the assumption that return data strings serve primarily as human-readable messages rather than structured data dependencies for interacting contracts.

However, the introduction of conditional syntax combining requirements with custom errors—such as require(condition, CustomError(...))—complicated this dynamic because custom errors encode structured binary data. Prior to version 0.8.35, the IR pipeline incorrectly stripped the custom error arguments of require statements alongside regular text strings, causing failed checks to revert with empty error data instead of the properly encoded custom error payload. The traditional evmasm pipeline did not share this behavior, creating an unwanted discrepancy between compilation pipelines. To resolve this, developers elected to preserve the structured custom error data rather than expanding the strip setting into a broader deletion mode. This fix corrects behavior for require() statements across the IR pipeline and has been fully integrated into this version.

Ethdebug Output Reorganization

Finally, this release restructures the ethdebug output selection mechanism to provide greater granularity and align its behavior with other compiler outputs. The previous --ethdebug and --ethdebug-runtime flags have been formally replaced by four distinct options: --ethdebug-resources, --ethdebug-compilation, --ethdebug-program, and --ethdebug-program-runtime, with equivalent keys introduced for Standard JSON users. Under the updated design, generating ethdebug outputs no longer forces a full binary compilation pass. Furthermore, the ethdebug tooling remains classified as experimental, requiring the primary --experimental master flag to be enabled just like other unstable compiler features.

How to Install and Upgrade

Developers wishing to update their development environments to the latest Solidity compiler release can access comprehensive installation instructions through the official project documentation website. Official release binaries can be downloaded directly from the official GitHub repository under the v0.8.35 tag.

Teams choosing to compile the software directly from source code are advised to avoid using the automatically generated source archives provided by GitHub. Instead, maintainers recommend utilizing the verified solidity_0.8.35.tar.gz source tarball or checking out the specific v0.8.35 tag through Git to ensure build integrity. The development team extends its appreciation to all community contributors and external testers whose ongoing feedback and code contributions helped bring this comprehensive release to fruition.

Tagged:

Leave a Reply

Your email address will not be published. Required fields are marked *