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 Solidity programming language has officially announced the release of the Solidity Compiler v0.8.35. Building upon previous iterations and incorporating feedback from earlier pre-releases, this latest version introduces several significant capabilities aimed at optimizing developer workflows, addressing long-standing compilation bottlenecks, and laying the groundwork for future language architecture. Among the highlights of v0.8.35 are a new compile-time builtin for ERC-7201 namespaced storage layouts, a formalization of the compiler’s experimental features framework, and an advanced experimental SSA-form control-flow graph code generator designed to tackle stack-too-deep errors and sluggish compilation times in the IR pipeline.

Notable Features and Changes

erc7201 Comptime Builtin

One of the standout additions in Solidity 0.8.35 is the introduction of a specialized builtin function: erc7201(string memory id) returns (uint). This function is engineered to compute the base storage slot for a designated namespace string by strictly following the mathematical formula outlined in the ERC-7201 standard. Mechanically, the operation mirrors keccak256(keccak256(id) - 1) & ~0xff. ERC-7201 itself has become an industry standard practice for structuring upgradeable smart contracts, particularly within proxy-based and diamond-style architectures, by effectively sequestering a contract’s state behind a securely hashed namespace to entirely prevent storage collisions.

This new builtin integrates smoothly with the layout at storage layout specifier that was initially rolled out in version 0.8.29 and subsequently expanded in version 0.8.31. Developers can now explicitly tie a contract’s storage to a specific namespace string directly within the code. What makes this implementation truly unique within the evolution of the language is that it marks the first genuine comptime builtin in Solidity. Prior to this release, Solidity’s compile-time evaluator was strictly limited to arithmetic operations performed on rational number literals. While older builtins like keccak256 have historically benefited from constant folding during the optimization stages of code generation—allowing developers to reap runtime gas savings—they lacked the vital type-system benefits required to operate within a true compile-time context, such as determining an array length or acting as a base slot inside a layout specifier.

By allowing the result of erc7201 to be leveraged anywhere a compile-time expression is mandated, this release directly resolves limitations previously flagged by the core team. Observers of the language’s development cycle can anticipate seeing more specialized builtins follow this trajectory as the project steadily moves toward a more robust and capable compile-time evaluation engine.

Formalizing the Experimental Feature Process

Historically, deploying in-development or highly experimental features within the Solidity compiler often required developers to rely on a patchwork of ad-hoc command-line interface flags and various pragma experimental directives. This decentralized approach meant there was no unified, reliable mechanism for a developer to instantly recognize when they were opting into unstable functionality, and metadata signaling often remained inconsistent.

Solidity 0.8.35 introduces a comprehensive formalization of this entire process, complete with a dedicated documentation page outlining the lifecycle and a canonical registry of features currently categorized as experimental. The most prominent user-facing shift involves the introduction of a top-level --experimental master toggle flag for command-line users, alongside an equivalent boolean settings.experimental field within Standard JSON compilation inputs.

Crucially, the --experimental flag acts strictly as a gatekeeper rather than a feature activator on its own; it does not enable any specific functionality by default, but its presence is now strictly mandatory for the compiler to accept any per-feature flags or pragmas. Attempting to invoke an experimental feature without explicitly enabling this master flag will now trigger a hard compilation error. Projects that previously passed individual experimental flags must now include the master toggle to maintain uninterrupted builds.

The core team has emphasized that this update does not represent a backward-compatibility breakage, as experimental features have traditionally been explicitly excluded from standard stability guarantees. Instead, the change provides transparent communication to developers, ensuring that nobody inadvertently compiles code with experimental mechanics that carry no stability guarantees and remain subject to breaking changes even across non-breaking compiler releases. Furthermore, the activation of experimental mode is now permanently recorded within both JSON and CBOR metadata. The CBOR experimental field has been intentionally broadened to capture this state, effectively closing a prior loophole where targeting unreleased EVM versions could result in experimental bytecode generation without toggling the corresponding flag.

Experimental SSA CFG Code Generator

Addressing some of the most persistent pain points reported by smart contract developers, Solidity 0.8.35 delivers an experimental new EVM backend designed specifically for the Intermediate Representation pipeline. This alternative backend generates bytecode directly from a program’s static single-assignment form control-flow graphs—referred to as SSA CFGs, with one generated per function—alongside a precomputed stack layout that the backend dynamically shuffles the underlying EVM stack to match.

For years, two major challenges have plagued developers utilizing the IR pipeline: sluggish compilation speeds and the infamous stack-too-deep errors. Data from recent developer surveys clearly underscores that stack management remains a primary recurring frustration for the community, while compilation via IR has consistently run noticeably slower than the traditional legacy evmasm pipeline. The conventional Yul-to-EVM code transformation relies heavily on heuristics that frequently struggle when confronted with deeply nested expressions and intricate control-flow paths.

By pivoting toward an SSA-based backend, the compiler establishes a much stronger, more predictable foundation for stack scheduling and overall compilation performance. Although this code generator is thoroughly exercised against the comprehensive external-contract semantic test suite during every pull request, it is not yet established as the default for --via-ir, and simple gas performance data alone will not be enough to promote it. Before graduating to default status, the feature will undergo rigorous internal review, extensive fuzzing, and likely an independent external security audit. Developers wishing to test the infrastructure can enable the codegen by combining --experimental with --via-ssa-cfg on the command line, or by setting the appropriate boolean flags within Standard JSON configurations.

Deprecation Warnings for Upcoming 0.9.0 Keywords

Continuing the systematic deprecation trajectory that commenced with version 0.8.31, this release introduces a new batch of warning messages alerting developers to identifiers that are scheduled to be formally promoted to reserved keywords in the upcoming 0.9.0 release. While the previous deprecations primarily focused on the removal of outdated language features, the current round is centered entirely on reserving namespace words.

Solidity source code declarations utilizing identifiers such as at, error, layout, leave, super, this, or transient will now trigger a formal warning from the compiler. Additionally, within standalone or inline Yul assembly blocks, leave is slated to become a Yul keyword, while terms like basefee, blobbasefee, blobhash, clz, mcopy, memoryguard, prevrandao, tload, and tstore will transition into reserved Yul identifiers. Because these latter terms represent built-in opcodes that are normally kept strictly reserved, the growing list of exceptions reflects the unique challenges of managing an extended 0.8.x release cycle under strict backward-compatibility rules that protect existing codebases until the next major version boundary. These notices are currently issued strictly as warnings rather than fatal errors, allowing existing projects to continue compiling while providing a practical grace period for developers to rename affected variables and functions before version 0.9.0 arrives.

--revert-strings strip and Custom Errors

A notable bugfix included in v0.8.35 resolves an unexpected discrepancy within the IR pipeline regarding gas-optimization flags and structured error handling. The compilation flag --revert-strings strip, or its Standard JSON equivalent revertStrings: "strip", is widely utilized by developers seeking to reduce contract bytecode size by omitting human-readable revert reason strings, under the assumption that transaction returndata is primarily intended for user interfaces rather than programmatic consumption by interacting contracts.

The introduction of structured custom errors via syntax like require(condition, CustomError(...)) complicated this operational assumption. Prior to version 0.8.35, the IR pipeline inadvertently stripped the custom-error arguments of require statements alongside standard text strings, causing failed checks to revert with completely empty error data rather than delivering the correctly encoded custom error payload. Because the legacy evmasm pipeline handled this scenario differently, the behavior created an inconsistent developer experience across pipelines. The core team resolved this inconsistency by ensuring that custom errors are preserved, preventing the strip flag from aggressively discarding structured programmatic data. This fix specifically targets require expressions utilizing custom errors under the IR pipeline, addressing a behavior present since the feature’s introduction in version 0.8.26.

ethdebug Output Reorganization

In an effort to improve tooling interoperability and maintain consistency across compiler outputs, Solidity 0.8.35 completely reorganizes the output selection mechanisms for the experimental ethdebug format. The legacy monolithic flags --ethdebug and --ethdebug-runtime have been officially deprecated and replaced by a more granular suite of options: --ethdebug-resources, --ethdebug-compilation, --ethdebug-program, and --ethdebug-program-runtime, alongside matching keys in Standard JSON schemas. Under this new structure, generating ethdebug outputs no longer forces an entire binary compilation pass, and the feature remains explicitly gated behind the master --experimental flag in alignment with the compiler’s updated feature management policy.

How to Install and Upgrade

Developers seeking to integrate Solidity Compiler v0.8.35 into their local development environments or continuous integration pipelines can access the complete release binaries and installation guidelines directly through the official project repository on GitHub. For those compiling the software from source, the development team strongly advises against utilizing the automatically generated source archives provided by GitHub’s default interface. Instead, developers should download the verified solidity_0.8.35.tar.gz source tarball or explicitly check out the tagged v0.8.35 commit via git to ensure a dependable build environment.

Tagged: