Skip to content

Releases: tronprotocol/solidity

0.8.31_Heraclitus_v4.8.2.1

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 28 Aug 07:13
c2812a3

TRON Solidity compiler 0.8.31 is based on Ethereum Solidity 0.8.31 and retains TRON-specific behavior.

Major changelog from Ethereum

Language Features:

  • Yul: Introduce builtin clz(x) for counting the number of leading zero bits in a 256-bit word.

Compiler Features:

  • Custom Storage Layout: Allow using constant state variables in the base slot expression.
  • DocString Parser: Warn about deprecation of inline assembly special comment memory-safe-assembly.
  • ethdebug: Experimental upstream support for instructions and source locations under EOF. This EOF-dependent feature remains unavailable in the TRON Solidity compiler.
  • EVM: Set the default EVM version to osaka.
  • Syntax Checker: Warn about deprecation of ABI coder v1.
  • Syntax Checker: Warn about deprecation of virtual modifiers.
  • Type Checker: Warn about deprecation of send and transfer functions on instances of address.
  • Type Checker: Warn about deprecation of comparisons between variables of contract types.

Bugfixes:

  • Assembler: Fix inconsistent --asm-json output between target architectures caused by IDs for deeply nested subassemblies not using a fixed-width type.
  • Yul Optimizer: Fix an edge case where ExpressionSimplifier could produce invalid Yul by substituting expressions containing out-of-scope variables.

Build System:

  • Enable Linux ARM64 binaries for testing and releases.
  • Ubuntu PPA Packages: Discontinue the PPA as a binary distribution channel.
  • Update minimum requirements to Boost 1.83.0 for non-Windows builds, GCC 13.3, and Clang 18.1.3. This fixes infinite recursion in boost::rational comparison affecting binaries built with GCC versions before 14.0 and Boost versions before 1.75.

0.8.30_Heraclitus_v4.8.2.1

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 12 Aug 07:09
343938e

TRON Solidity compiler 0.8.30 is fully compatible with Ethereum Solidity 0.8.30.

Security and Correctness Fixes from TRON

Security Fixes:

  • General: Backport the fixes for SOL-2025-1 through SOL-2026-3, covering storage-array operations at the 2^256 boundary, persistent/transient storage helper collisions, unsound Yul memory spilling for intersecting recursive cycles, and inheritance-order mutation while reporting storage-end diagnostics.

Compiler Features:

  • ABI: Make named-argument calls usable for TRON multisignature and vote-query builtins by assigning unique, valid parameter names.

Bugfixes:

  • AST Import: Reject unsupported Ethereum denominations (wei, gwei, and ether) in imported Solidity ASTs, matching source-parser behavior.
  • Code Generator: Align TRON builtin behavior between legacy and via-IR pipelines, including multisignature precompile handling, supported-target checks, address validation, and token ID bounds.
  • Gas Estimator: Align opcode, memory, MCOPY, NATIVEVOTE, CREATE2, and EXP estimates with TVM pricing and the 3 MiB memory limit.
  • Language Server: Avoid recursively scanning the filesystem root when no workspace root is available.
  • SMTChecker: Model TRON transaction fields and state-changing builtins conservatively, and preserve library DELEGATECALL transaction-context semantics.
  • Standard JSON Interface: Validate malformed containers, scalar fields, debug-info components, metadata settings, and SMT response maps as structured JSONError results.

Major changelog from Ethereum

Compiler Features:

  • EVM: Set the default EVM version to prague.
  • NatSpec: Capture NatSpec documentation of enum values in the AST.

Bugfixes:

  • SMTChecker: Do not consider loop conditions as constant-condition verification targets, preventing incorrect reports and internal compiler errors.
  • SMTChecker: Fix incorrect analysis when only a subset of contracts is selected with --model-checker-contracts.
  • SMTChecker: Fix an internal compiler error when a string literal initializes a user-defined type based on fixed bytes.

0.8.29_Pyrrho_v4.8.2

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 27 Jul 02:46
c4efc24

TRON Solidity compiler 0.8.29 is fully compatible with Ethereum Solidity 0.8.29.

New Features from TRON

Compiler Features:

  • General: Disable the experimental EOF backend for the TRON Solidity compiler. Requests through --experimental-eof-version, Standard JSON settings.eofVersion or the compiler API are rejected with a TRON-specific diagnostic.

Major changelog from Ethereum

Language Features:

  • Allow relocating contract storage to an arbitrary location.

Compiler Features:

  • Error Reporting: Errors reported during code generation now point at the location of the contract when more fine-grained location is not available.
  • ethdebug: Experimental support for instructions and source locations.
  • EVM: Support for the EVM version "Osaka".
  • EVM Assembly Import: Allow enabling opcode-based optimizer.
  • General: The experimental EOF backend implements a subset of EOF sufficient to compile arbitrary high-level Solidity syntax via IR with optimization enabled.
  • SMTChecker: Support block.blobbasefee and blobhash.
  • SMTChecker: The option --model-checker-print-query no longer requires --model-checker-solvers smtlib2.
  • SMTChecker: Z3 is now a runtime dependency, not a build dependency (except for emscripten build).
  • Yul Parser: Make name clash with a builtin a non-fatal error.

Bugfixes:

  • Commandline Interface: Report StackTooDeep errors in compiler mode as proper errors instead of printing diagnostic information meant for internal compiler errors.
  • Error Reporting: Fix error locations not being shown for source files with empty names.
  • General: Fix internal compiler error when requesting IR AST outputs for interfaces and abstract contracts.
  • Metadata: Fix custom cleanup sequence missing from metadata when other optimizer settings have default values.
  • SMTChecker: Fix internal compiler error when analyzing overflowing expressions or bitwise negation of unsigned types involving constants.
  • SMTChecker: Fix reporting on targets that are safe in the context of one contract but unsafe in the context of another contract.
  • SMTChecker: Fix SMT logic error when analyzing cross-contract getter call with BMC.
  • SMTChecker: Fix SMT logic error when contract deployment involves string literal to fixed bytes conversion.
  • SMTChecker: Fix SMT logic error when external call has extra effectless parentheses.
  • SMTChecker: Fix SMT logic error when initializing a fixed-sized-bytes array using string literals.
  • SMTChecker: Fix SMT logic error when translating invariants involving array store and select operations.
  • SMTChecker: Fix wrong encoding of string literals as arguments of ecrecover precompile.
  • Standard JSON Interface: Fix generatedSources and sourceMap being generated internally even when not requested.
  • TypeChecker: Fix spurious compilation errors due to incorrect computation of contract storage size which erroneously included transient storage variables.
  • Yul: Fix internal compiler error when a code generation error should be reported instead.
  • Yul Optimizer: Fix failing debug assertion due to dereferencing of an empty optional value.

Build System:

  • Linux release builds are fully static again and no longer depend on glibc.
  • Switch from C++17 to C++20 as the target standard.

Solc-Js:

  • The wrapper now requires at least Node.js v12.

0.8.28_Hypatia_v4.8.1.1

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 15 Jul 03:47
9c4253d

TRON Solidity compiler 0.8.28 is fully compatible with Ethereum Solidity 0.8.28.

New Features from TRON

Compiler Features:

  • TypeChecker: The "only available for objects of type address payable" hint now also covers the payable-only members freeze, unfreeze, delegateResource and unDelegateResource, instead of falling back to a generic "member not found" error.
  • ViewPureChecker: The error reported when reading a payable-only member from a non-payable function or modifier now mentions msg.tokenid and msg.tokenvalue, not only msg.value.

Bugfixes:

  • Optimizer: Fix freezeExpireTime being classified as a movable expression. When compiling with --experimental-via-ir --optimize, its result could be cached and reused across an intervening freeze / unfreeze call, producing code that reads a stale stake expiration time.
  • Optimizer: Fix isContract missing from the movability and determinism classifications, and fix the memory range reported for vote, which could let the unused-store eliminator drop the writes that build its array arguments.
  • Code Generator: Fix internal compiler error when calling getchainparameter on the default (legacy) pipeline.
  • SMTChecker: Fix internal compiler error when analyzing a contract that calls validatemultisign, batchvalidatesign, verifyMintProof, verifyBurnProof, verifyTransferProof or pedersenHash.
  • AST Import: Fix --import-ast failing with "Unknown subdenomination" on contracts using sun or trx literals.
  • GasMeter: Account for the memory expansion of the two array arguments of vote in gas estimation.

Major changelog from Ethereum

Language Features:

  • Transient storage state variables of value types are now fully supported.

Compiler Features:

  • General: Generate JSON representations of Yul ASTs only on demand to reduce memory usage.
  • Standard JSON Interface: Bytecode or IR can now be requested for a subset of all contracts without triggering unnecessary code generation for other contracts.

Bugfixes:

  • SMTChecker: Fix SMT logic error when assigning to an array of addresses.
  • Yul AST: Fix shifted native source locations when debug info selection included code snippets.

Build System:

  • Removed the USE_LD_GOLD option and default to the compiler's default linker. For custom linkers, CMAKE_CXX_FLAGS can be used.

0.8.27_Democritus_v4.8.1

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 23 Jun 06:30
19164be

TRON Solidity compiler 0.8.27 is fully compatible with Ethereum Solidity 0.8.27.

New Features from TRON

Bugfixes:

  • Analyzer: Remove the broken global freeze, unfreeze and freezeExpireTime builtins, which triggered an internal compiler error (ICE) when used. The corresponding member functions on address (a.freeze(...), a.unfreeze(...), a.freezeExpireTime(...)) remain available and are the supported way to call these TRON instructions.

Major changelog from Ethereum

Language Features:

  • Accept declarations of state variables with transient data location (parser support only, no code generation yet).
  • Make require(bool, Error) available when using the legacy pipeline.
  • Yul: Parsing rules for source location comments have been relaxed: whitespace between the location components as well as single-quoted code snippets are now allowed.

Compiler Features:

  • Commandline Interface: Add --transient-storage-layout output.
  • Commandline Interface: Allow the use of --asm-json output option in assembler mode to export EVM assembly of the contracts in JSON format.
  • Commandline Interface: Do not perform IR optimization when only unoptimized IR is requested.
  • Constant Optimizer: Uses PUSH0 if supported by the selected EVM version.
  • EVM: Support for the EVM version "Prague".
  • Peephole Optimizer: PUSH0, when supported, is duplicated explicitly instead of using DUP1.
  • Peephole Optimizer: Remove identical code snippets that terminate the control flow if they occur one after another.
  • Standard JSON Interface: Add transientStorageLayout output.
  • Yul: Drop the deprecated typed Yul dialect that was only accessible via --yul in the CLI.
  • Yul Optimizer: Caching of optimized IR to speed up optimization of contracts with bytecode dependencies.

Bugfixes:

  • Assembler: Fix ICE caused by imprecise calculation of required size of tags in bytecode when code size is above 255.
  • Parser: Fix spuriously emitted parser error for unary plus operations when used as binary operator in some cases.
  • Standard JSON Interface: For Yul input, properly produce output artifacts in case of warnings.
  • TypeChecker: Fix segfault when assigning nested tuple to tuple.
  • Yul IR Code Generation: Deterministic order of Yul subobjects.
  • Yul Optimizer: Fix Yul source locations always referring to unoptimized source, even in optimized outputs.
  • Yul Optimizer: Name simplification could lead to forbidden identifiers with a leading and/or trailing dot, e.g., x._ would get simplified into x..
  • Yul Parser: Fix segfault when parsing very long location comments.

Build System:

  • Change build system to use git submodules for some dependencies (nlohmann-json, fmtlib & range-v3).

0.8.26_Democritus_v4.8.1

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 26 Mar 10:58
733b4d2

TRON Solidity compiler 0.8.26 is fully compatible with Ethereum Solidity 0.8.26.

New Features from TRON

Bugfixes:

  • GasMeter: Fix gas estimation for CALLTOKEN by accounting for the extra tokenId stack argument.
  • GasMeter: Fix gas costs for TRON native instructions (freeze/vote/withdraw, etc.) from 20 to actual values.

Build System:

  • Using GitHub Actions to build binaries on self-hosted runners.

Major changelog from Ethereum

Language Features:

  • Introduce a new overload require(bool, Error) that allows usage of require functions with custom errors. This feature is available in the via-ir pipeline only.

Compiler Features:

  • SMTChecker: Create balance check verification target for CHC engine.
  • Yul IR Code Generation: Cheaper code for reverting with errors of a small static encoding size.
  • Yul Optimizer: New, faster default optimizer step sequence.

Bugfixes:

  • Commandline Interface: Fix ICE when the optimizer is disabled and an empty/blank string is used for --yul-optimizations sequence.
  • SMTChecker: Fix false positive when comparing hashes of same array or string literals.
  • SMTChecker: Fix internal error on mapping access caused by too strong requirements on sort compatibility of the index and mapping domain.
  • SMTChecker: Fix internal error when using an empty tuple in a conditional operator.
  • SMTChecker: Fix internal error when using bitwise operators with an array element as argument.
  • Standard JSON Interface: Fix ICE when the optimizer is disabled and an empty/blank string is used for optimizerSteps sequence.
  • StaticAnalyzer: Only raise a compile time error for division and modulo by zero when it's between literals.
  • TypeChecker: Fix compiler crash when the left-hand side of an assignment was a parenthesized non-tuple expression of a tuple type.
  • Yul Optimizer: Fix optimizer executing each repeating part of the step sequence at least twice, even if the code size already became stable after the first iteration.
  • Yul Optimizer: Fix the order of assignments generated by SSATransform being dependent on AST IDs, sometimes resulting in different (but equivalent) bytecode when unrelated files were added to the compilation pipeline.

Build System:

  • Replace internal JSON library jsoncpp with nlohmann::json.

0.8.25_Kant_v4.8.0

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 02 Sep 11:05
77bd169

TRON Solidity compiler 0.8.25 is fully compatible with Ethereum Solidity 0.8.25.

New Features from TRON

Compiler Features:

  • IR Generator: Support for all TRON features (experimental).
  • Compilation via Yul IR is now re-marked as experimental.
  • Commandline Interface: Using the --via-ir will now trigger a error and terminate the compilation, use --experimental-via-ir instead.

Bugfixes:

  • IR Generator: When compiling non-payable methods, verification code for calltokenid and calltokenvalue is now automatically generated by default.
  • Code Generator: The verifyMintProof and verifyTransferProof precompiled contracts will now remove redundant duplicate return elements.

Major changelog from Ethereum

Compiler Features:

  • Code Generator: Use MCOPY instead of MLOAD/MSTORE loop when copying byte arrays.
  • EVM: Set default EVM version to cancun.
  • Yul Analyzer: Emit transient storage warning only for the first occurrence of tstore.

Bugfixes:

  • Assembler: Prevent incorrect calculation of tag sizes.
  • Commandline Interface: Do not run IR pipeline when --via-ir is used but no output that depends on the IR is requested.
  • EVM Assembly Import: Fix handling of missing source locations during import.
  • SMTChecker: Ensure query is properly flushed to a file before calling solver when using SMT-LIB interface.
  • SMTChecker: Fix internal error caused by not respecting the sign of an integer type when constructing zero-value SMT expressions.
  • SMTChecker: Run Eldarica only when explicitly requested with --model-checker-solvers eld, even when it is present on the system.

0.8.24_Kant_v4.8.0

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 14 May 09:20
7d902c6

TRON Solidity compiler 0.8.24 is fully compatible with Ethereum Solidity 0.8.24.

IMPORTANT NOTE: The default target VM version for this compiler is still "Shanghai". TRON provides support for "Cancun" network upgrade in the GreatVoyage-v4.8.0 (Kant) network upgrade. Please make sure that your TRON network is enabled to support the "Cancun" upgrade when you use the compiler. The 83th network parameter getAllowTvmCancun will support MCOPY, TLOAD and TSTORE opcodes, and the 89th network parameter getAllowTvmBlob will support BLOBHASH and BLOBBASEFEE opcodes.

Major changelog from Ethereum

Introducing the newest version of the Solidity Compiler!

We are excited to announce the release of the Solidity Compiler Solidity v0.8.24. This newest version of the compiler brings readiness for the "Cancun" network upgrade, including support for transient storage (EIP-1153), shard blob transactions (EIP-4844), & more. The release binaries for macOS are now also compatible with Apple Silicon chips.

Notable Features

  • Support for transient storage for inline assembly (EIP-1153)
  • Support for BLOBBASEFEE (EIP-7516)
  • Support for MCOPY (EIP-5656)
  • Changes in SELFDESTRUCT Behavior (EIP-6780)
  • Support for Apple Silicon

Changelog

Language Features

  • Introduce global block.blobbasefee for retrieving the blob base fee of the current block.
  • Introduce global function blobhash(uint) for retrieving versioned hashes of blobs, akin to the homonymous Yul builtin.
  • Yul: Introduce builtin blobbasefee() for retrieving the blob base fee of the current block.
  • Yul: Introduce builtin blobhash() for retrieving versioned hashes of blobs associated with the transaction.
  • Yul: Introduce builtin mcopy() for cheaply copying data between memory areas.
  • Yul: Introduce builtins tload() and tstore() for transient storage access.

Compiler Features

  • EVM: Support for the EVM Version "Cancun".
  • SMTChecker: Support bytes.concat except when string literals are passed as arguments.
  • Standard JSON Interface: Add experimental support to import EVM assembly in the format used by --asm-json.
  • TypeChecker: Comparison of internal function pointers now yields a warning, as it can produce unexpected results with the legacy pipeline enabled.

Bugfixes:

  • AST import: Fix bug when importing inline assembly with empty let variable declaration.

0.8.23_Epicurus_v4.7.7

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 17 Feb 06:54
8ed3344

TRON Solidity compiler 0.8.23 is fully compatible with Ethereum Solidity 0.8.23.

Major changelog from Ethereum

Changelog

Important Bugfixes:

  • Optimizer: Fix block deduplicator bug which led to blocks which are identical apart from the contents of verbatim instructions to be treated as equivalent and thus collapsed into a single one.

Compiler Features:

  • Commandline Interface: An empty --yul-optimizations sequence can now be always provided.
  • Standard JSON Interface: An empty optimizerSteps sequence can now always be provided.

0.8.22_Anaximander_v4.7.6

Choose a tag to compare

@CodeNinjaEvan CodeNinjaEvan released this 30 Oct 07:18
5ed3e10

TRON Solidity compiler 0.8.22 is fully compatible with Ethereum Solidity 0.8.22.

Major changelog from Ethereum

IMPORTANT NOTE:
This release deprecates support for EVM versions older than Constantinople for the reason of ruling out the need to maintain multiple complex code paths or workarounds for ancient EVM versions. In case you rely on the support for such EVM versions, please reach out to us.

Notable Features:

  • Unchecked loop increments
  • Adding support for importing EVM Assembly JSON (experimental)
  • Adjusting Yul optimizer to rematerialize zero literals

Changelog

Language Features:

  • Allow defining events at file level.

Compiler Features:

  • Code Generator: Remove redundant overflow checks of certain for loops when the counter variable cannot overflow.
  • Commandline Interface: Add --no-import-callback option that prevents the compiler from loading source files not given explicitly on the CLI or in Standard JSON input.
  • Commandline Interface: Add an experimental --import-asm-json option that can import EVM assembly in the format used by --asm-json.
  • Commandline Interface: Use proper severity and coloring also for error messages produced outside of the compilation pipeline.
  • EVM: Deprecate support for "homestead", "tangerineWhistle", "spuriousDragon" and "byzantium" EVM versions.
  • Parser: Remove the experimental error recovery mode (--error-recovery / settings.parserErrorRecovery).
  • SMTChecker: Support user-defined operators.
  • Yul Optimizer: If PUSH0 is supported, favor zero literals over storing zero values in variables.
  • Yul Optimizer: Run the Rematerializer and UnusedPruner steps at the end of the default clean-up sequence.

Bugfixes:

  • Code Generator: Fix output from via-IR code generator being dependent on which files were discovered by import callback. In some cases, a different AST ID assignment would alter the order of functions in internal dispatch, resulting in superficially different but semantically equivalent bytecode.
  • NatSpec: Fix internal error when requesting userdoc or devdoc for a contract that emits an event defined in a foreign contract or interface.
  • SMTChecker: Fix encoding error that causes loops to unroll after completion.
  • SMTChecker: Fix inconsistency on constant condition checks when while or for loops are unrolled before the condition check.
  • Yul Optimizer: Fix replacement decisions during CSE being affected by Yul variable names generated by the compiler, resulting in different (but equivalent) bytecode in some situations.

AST Changes:

  • AST: Fix wrong initial ID for Yul nodes in the AST.