Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article summarizes the changes introduced in Solidity 0.8.28, based on the official release announcement.
Changes
Solidity 0.8.28 introduces:
- Full support for transient storage state variables.
- On-demand JSON generation for the Yul AST.
- Per-contract compilation pipeline configuration.
- Bug fixes and other improvements.
Full Support for Transient Storage State Variables
Solidity 0.8.28 officially supports transient storage state variables. Version 0.8.27 could parse their syntax but could not generate bytecode for them. This release adds full support and enables bytecode generation.
What Is Transient Storage?
Ordinary Solidity storage variables persist on the blockchain. Transient storage provides temporary storage that is cleared at the end of a transaction. Other data locations, such as memory and calldata, also provide temporary data handling but have different lifetimes and semantics.
Transient storage is useful when data needs to be retained temporarily, including across calls within a transaction, and discarded afterward. Using persistent storage for such data would unnecessarily retain it on the blockchain.
Persistent and transient storage layouts are independent. Converting a persistent state variable into a transient one can leave its previous location unused and shift the positions of later persistent variables, potentially breaking the storage layout.
For upgradeable contracts, one way to preserve the layout is to retain a suitably sized placeholder at the original persistent storage location. The resulting layout should be verified for compatibility.
On-demand Yul AST JSON Generation
What Is Yul?
Yul is a low-level intermediate language used to translate complex Solidity code into more efficient code. Its structure facilitates optimization.
What Does On-demand Mean?
Processing or data generation takes place only when needed. Here, the Solidity compiler generates JSON representing the Yul AST (abstract syntax tree) only when explicitly requested.
The Yul AST represents Yul code as a tree, organizing functions, variables, conditional expressions, and other components hierarchically. This allows the compiler to analyze code structure efficiently for optimization and bytecode generation.
The Solidity compiler internally caches outputs such as ABI and metadata. Requesting both simultaneously can therefore avoid redundant generation and improve compilation efficiency.
Previously, large newly introduced outputs such as the Yul AST were cached even when not explicitly requested. In large projects, this could consume substantial memory without providing corresponding performance benefits.
Version 0.8.28 addresses this issue.
- Reduced caching: unnecessary Yul AST generation is avoided, reducing memory consumption by up to 80%.
- Shorter compilation times: avoiding unnecessary generation reduces compilation time by up to 25%.
| File | Time (v0.8.27) | Time (v0.8.28) | Change |
|---|---|---|---|
| openzeppelin | 40 s | 35 s | -13% |
| uniswap-v4 | 157 s | 128 s | -18% |
| eigenlayer | 716 s | 545 s | -24% |
| File | Memory (0.8.27) | Memory (0.8.28) | Change |
|---|---|---|---|
| openzeppelin | 1220 MiB | 506 MiB | -59% |
| uniswap-v4 | 4805 MiB | 1496 MiB | -69% |
| eigenlayer | 20346 MiB | 4455 MiB | -78% |
Per-contract Compilation Pipeline Configuration
The Solidity compiler uses lazy evaluation, executing only stages necessary to produce the requested output. Mandatory parsing and analysis detect errors and provide information such as ABI, metadata, Solidity AST, and storage layout. Code generation and optimization can be skipped when bytecode or IR is not requested.
Previously, the same pipeline was applied to all contracts. Requesting bytecode for one contract could cause bytecode to be generated for all contracts, increasing unnecessary work and compilation time.
Version 0.8.28 removes this limitation, allowing required stages to execute only for specific contracts. When bytecode is needed for one contract but not others, generation is skipped for the others. This reduces unnecessary processing and improves compilation efficiency.
Simple compilations requesting the same output for every contract are affected relatively little. More sophisticated framework workflows, including recompilation after partial code changes, can benefit from faster compilation.
This change applies only to the compiler's Standard JSON interface. Per-contract output selection is not yet supported by the CLI in this release.
Other Changes
The original article also links to the preceding release announcement for additional context.
Conclusion
Solidity 0.8.28 introduces full transient storage variable support and reduces unnecessary compilation work through on-demand Yul AST generation and per-contract pipelines.
Further reading and author links:







