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

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

The development team has officially announced the release of the Solidity Compiler version v0.8.35, bringing significant upgrades to the Ethereum ecosystem’s most widely used smart contract development tool. Building upon previous iterations and drawing from insights gathered in recent developer surveys, this latest version introduces powerful new features designed to streamline storage management, formalize experimental development processes, and tackle some of the most persistent bottlenecks in the Intermediate Representation (IR) compilation pipeline.

Among the standout additions in v0.8.35 is the introduction of a new builtin function, erc7201, which computes the base slot of an ERC-7201 namespaced storage layout directly from its namespace string. Alongside this feature, the release establishes a formal lifecycle and governance model for experimental compiler functionalities, highlighted by an innovative Static Single Assignment (SSA) control-flow graph code generator. Furthermore, the update addresses several critical bugfixes, continues preparations for the upcoming 0.9.0 release through targeted keyword deprecation warnings, and reorganizes ethdebug output selection to provide greater developer granularity.

Notable Features and Changes

The erc7201 Comptime Builtin

Solidity 0.8.35 introduces the erc7201 function signature, allowing developers to compute the base storage slot for a namespace string cleanly and natively. The computation follows the formula defined in the official ERC-7201 standard, equivalent to hashing the string and applying bitwise operations to isolate the storage slot. ERC-7201 has become a cornerstone practice for placing smart contract state behind hashed namespaces, effectively preventing storage collisions in proxy-based and diamond-style upgradeable architectural patterns.

This new builtin pairs seamlessly with the storage layout specifiers introduced in version 0.8.29 and subsequently expanded in 0.8.31. What makes erc7201 uniquely powerful is that it marks the first compile-time (comptime) builtin in the Solidity language. Historically, Solidity’s comptime evaluator was limited exclusively to arithmetic operations performed on rational number literals. While traditional builtins like keccak256 undergo constant folding during the optimization stage—yielding gas savings—they lacked the type-system capability required in a comptime context such as a layout specifier or an array length definition.

By functioning as the language’s first true comptime builtin, erc7201 can be utilized anywhere a compile-time expression is mandatory. This addition directly resolves limitations previously highlighted by the compiler team during the 0.8.31 release cycle, setting a strong precedent for future comptime enhancements.

Formalizing the Experimental Feature Process

In past releases, deploying in-development compiler features often required navigating a patchwork of ad-hoc command-line interface flags and pragma experimental directives. This decentralized approach lacked a consistent signaling mechanism, leaving developers with minimal visibility into the stability status of the features they were opting into.

Version 0.8.35 rectifies this by establishing a formal, documented lifecycle and a canonical registry for all experimental features. Central to this new framework is the top-level --experimental command-line flag, or its equivalent boolean settings.experimental field within Standard JSON inputs. Operating as a master toggle, the flag does not enable any specific feature on its own; rather, it serves as a mandatory gatekeeper that must be active for any per-feature flags or pragmas to be accepted by the compiler.

Attempting to use experimental features without the master flag now triggers a hard error. Developers who previously relied on individual flags will need to incorporate --experimental into their build pipelines to maintain continuity. This shift does not represent a backwards-compatibility break, as experimental features have consistently been excluded from formal stability guarantees. Instead, it introduces necessary transparency, ensuring that no developer unknowingly adopts unstable functionalities that carry no stability guarantees and remain subject to breaking changes even across minor compiler releases.

Additionally, compilation metadata has been updated to reflect these choices. Both JSON and CBOR metadata now record whether experimental mode was enabled during a build. The CBOR experimental field has been broadened to capture this state, successfully closing a previous oversight where targeting unreleased EVM environments could generate experimental bytecode without explicitly flipping the tracking flags.

Experimental SSA CFG Code Generator

Addressing two of the most significant and long-standing pain points in smart contract development—compilation speed and stack-too-deep errors—Solidity 0.8.35 delivers an experimental new EVM backend for the IR pipeline. Operating from the program’s Static Single Assignment (SSA) form control-flow graphs, or SSA CFGs, the backend generates bytecode utilizing precomputed stack layouts. The backend subsequently shuffles the physical EVM stack to align with these precomputed arrangements.

Stack-too-deep errors consistently ranked as the most commonly reported recurring issue in the recent Solidity Developer Survey, while compilation via IR has historically lagged behind the traditional evmasm pipeline in terms of raw speed. The legacy Yul-to-EVM code transformation relies heavily on heuristics that frequently struggle when processing deeply nested expressions and intricate control flow. By introducing an SSA-based backend, the compiler establishes a much more robust mathematical foundation for stack scheduling and overall performance optimization.

Developers can experiment with this new code generator by passing --experimental --via-ssa-cfg via the command line, or by configuring settings.experimental: true alongside settings.viaSSACFG: true in Standard JSON inputs. Both configurations inherently imply --via-ir. Although the codegen undergoes rigorous testing against the complete external-contract semantic test suite during every pull request, it is not yet enabled by default for --via-ir. The development team emphasizes that raw gas optimization data alone will not suffice for promotion; the feature will undergo extensive review, dedicated fuzzing, and external security audits prior to becoming standard.

Deprecation Warnings for Upcoming 0.9.0 Keywords

Continuing the deprecation trajectory initiated in version 0.8.31, the 0.8.35 release introduces warnings for a new set of identifiers that are scheduled to be promoted to reserved keywords in the forthcoming 0.9.0 release. While earlier deprecations focused primarily on retiring obsolete features, this current batch centers entirely on claiming specific names to prevent future namespace collisions.

Solidity declarations utilizing identifiers such as at, error, layout, leave, super, this, or transient will now generate compiler warnings. Within Yul contexts—including both standalone scripts and inline assembly blocks—leave will transition into a Yul keyword, while basefee, blobbasefee, blobhash, clz, mcopy, memoryguard, prevrandao, tload, and tstore will become reserved Yul identifiers. Because these latter terms represent established Yul builtins that are typically kept reserved, their delayed reservation reflects the unique complexities of managing the extended 0.8.x release lifecycle under strict backwards-compatibility policies.

These notices are currently emitted as non-blocking warnings rather than critical errors. Existing codebases will continue to compile successfully, granting developers a transitional window to refactor and rename affected declarations before version 0.9.0 converts these warnings into compilation failures.

Revert Strings, Custom Errors, and ethdebug Reorganization

Version 0.8.35 resolves a subtle inconsistency within the IR compilation pipeline concerning --revert-strings strip (or revertStrings: "strip" in Standard JSON configurations). Designed to optimize gas consumption by omitting descriptive revert reason strings while still preserving execution halts, the feature historically interacted unexpectedly with custom errors.

Because require statements paired with custom errors—introduced in version 0.8.26—encode structured data rather than simple human-readable strings, the IR pipeline previously stripped custom error arguments alongside standard strings. This resulted in failed transactions reverting with empty error data rather than the intended custom error payload. The legacy evmasm pipeline did not exhibit this behavior, creating a pipeline discrepancy. The development team resolved this inconsistency by ensuring that custom errors are preserved, aligning the IR pipeline’s behavior without expanding the scope of string stripping.

Finally, the release reorganizes ethdebug output selection to align with standard compiler output patterns. The former --ethdebug and --ethdebug-runtime flags have been replaced by granular options: --ethdebug-resources, --ethdebug-compilation, --ethdebug-program, and --ethdebug-program-runtime, with corresponding keys available in Standard JSON. These outputs no longer force full binary compilations automatically, and ethdebug remains explicitly experimental, requiring the master --experimental flag to operate.

How to Install and Upgrade

Developers seeking to upgrade their development environments to Solidity Compiler v0.8.35 can consult the official installation instructions provided in the language documentation. Pre-compiled binaries and release packages are accessible directly through the project’s GitHub repository. Developers building directly from source are advised to utilize the official source tarball rather than the automatically generated GitHub source archives to ensure build integrity.

Tagged:

Leave a Reply

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