Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    6 leading crypto trading bots in 2026 to help achieve automated trading

    April 1, 2026

    Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case

    April 1, 2026

    Geth 1.6 – Puppeth Master

    April 1, 2026
    Facebook X (Twitter) Instagram
    Ai Crypto TimesAi Crypto Times
    • Altcoins
      • Bitcoin
      • Coinbase
      • Litecoin
    • Blockchain
    • Crypto
    • Ethereum
    • Lithosphere News Releases
    X (Twitter) Instagram YouTube LinkedIn
    Ai Crypto TimesAi Crypto Times
    Home » Solidity optimizer bug | Ethereum Foundation Blog

    Solidity optimizer bug | Ethereum Foundation Blog

    Michael JohnsonBy Michael JohnsonApril 1, 2026No Comments3 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    A bug in the Solidity optimizer was reported through the Ethereum Foundation Bounty program, by Christoph Jentzsch. This bug is patched as of 2017-05-03, with the release of Solidity 0.4.11.

    Background

    The bug in question concerned how the optimizer optimizes on constants in the byte code. By “byte code constants”, we mean anything which is PUSHed on the stack (not to be confused with Solidity constants). For example, if the value 0xfffffffffffffffffffffffffffffffffffffffffffffffe is PUSHed, then the optimizer can either do PUSH32 0xfffffffffffffffffffffffffffffffffffffffffffffffe, or choose to encode this as PUSH1 1; NOT;.

    An error in the optimizer made optimizations of byte code constants fail for certain cases by producing a routine that did not properly recreate the original constant.

    The behavior described in the reported bug was found in a contract in which one method ceased functioning when another – totally unrelated – method was added to the contract. After analysis, it was determined that a number of conditions must exist at once for the bug to trigger. Any combination of conditions that would trigger the bug would consistently have the following two conditions:

    1. The constant needs to start with 0xFF… and end with a long series of zeroes (or vice versa).
    2. The same constant needs to be used in multiple locations, for the optimizer to choose to optimize this particular constant. Alternatively, it needs to be used in the constructor, which optimises for size rather than gas.

    In addition to the two conditions above, there are further, more complicated conditions that are required.

    Analysis

    This bug is present in all released versions of Solidity from at least as far back as summer 2015 to the present. Although the bug has been present since 2015, it seems very hard to trigger by “random” code:

    We performed a static analysis of all contract code deployed on the blockchain, and found no occurrence of such an invalidly generated routine. Note, the fact that we have not found a bug in all the contract code does not guarantee the absence of such occurrences.

    Improvements

    In order to provide better transparency and increased awareness of bugs in Solidity, we have started exporting information about Solidity-related vulnerabilities as JSON-files in the Solidity code repository(1,2). We hope that block explorers will integrate this information along with other contract-related information.

    Etherscan has already implemented this, which can be seen here and here.

    Concerning the bug itself, we added a mini-EVM to the optimizer which verifies the correctness of each generated routine at compile time.

    Furthermore, work has already started on a fully-specified and more high-level intermediate language. Future optimizer routines on this language will be much easier to understand and audit and it will replace the current optimizer.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Michael Johnson

    Related Posts

    Geth 1.6 – Puppeth Master

    April 1, 2026

    Roundup Round III | Ethereum Foundation Blog

    April 1, 2026

    Roundup Q2 | Ethereum Foundation Blog

    March 31, 2026

    Comments are closed.

    Don't Miss

    6 leading crypto trading bots in 2026 to help achieve automated trading

    Crypto April 1, 2026

    Disclosure: This article does not represent investment advice. The content and materials featured on this…

    Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case

    April 1, 2026

    Geth 1.6 – Puppeth Master

    April 1, 2026

    DOL move to open 401(k)s to crypto and private assets sparks praise and backlash

    April 1, 2026
    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo
    Our Picks

    The Decentralized Naming System Powering Web4 Infrastructure

    March 31, 2026

    Lithosphere’s MultX and LEP100 Introduce a New Standard for Blockchain Evolution

    March 30, 2026

    Kenya secures over Ksh.449B in investment deals as KIICO 2026 opens

    March 28, 2026

    Nairobi City to host Premier Kenya International Investments Conference

    March 27, 2026

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    Demo
    • Popular
    • Recent
    • Top Reviews

    Chiliz price drops 15% amid sharp altcoin pullback

    January 31, 2026

    Lithosphere Enhances Developer Tooling to Support Scalable Decentralized Applications

    January 31, 2026

    Checkpoint #8: Jan 2026 | Ethereum Foundation Blog

    January 31, 2026

    6 leading crypto trading bots in 2026 to help achieve automated trading

    April 1, 2026

    Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case

    April 1, 2026

    Geth 1.6 – Puppeth Master

    April 1, 2026
    Latest Galleries
    [latest_gallery cat="all" number="5" type="slider"]
    Latest Reviews
    Demo
    Top Posts

    KaJ Labs Unveils Lithic Developer Stack for AI Applications, Games, and Enterprise Systems

    March 14, 20262 Views

    Lithic Introduces zk-Verifiable AI Execution Standard (LEP100-5)

    March 17, 20261 Views

    KaJ Labs Unveils Ecosystem Alignment Strategy to Strengthen AI and Web3 Integration

    March 14, 20261 Views

    The Decentralized Naming System Powering Web4 Infrastructure

    March 31, 20260 Views
    Don't Miss

    6 leading crypto trading bots in 2026 to help achieve automated trading

    Crypto April 1, 2026

    Disclosure: This article does not represent investment advice. The content and materials featured on this…

    Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case

    April 1, 2026

    Geth 1.6 – Puppeth Master

    April 1, 2026

    DOL move to open 401(k)s to crypto and private assets sparks praise and backlash

    April 1, 2026
    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    Demo
    Top Posts

    Protocol Update 002 – Scale Blobs

    March 16, 20262 Views

    Centrifuge price explodes as CFG trading goes live on Upbit

    March 15, 20262 Views

    KaJ Labs Unveils Lithic Developer Stack for AI Applications, Games, and Enterprise Systems

    March 14, 20262 Views

    World assets sells $65M WLD as token hits fresh pressure

    March 29, 20261 Views
    Don't Miss

    6 leading crypto trading bots in 2026 to help achieve automated trading

    Crypto April 1, 2026

    Disclosure: This article does not represent investment advice. The content and materials featured on this…

    Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case

    April 1, 2026

    Geth 1.6 – Puppeth Master

    April 1, 2026

    DOL move to open 401(k)s to crypto and private assets sparks praise and backlash

    April 1, 2026
    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    X (Twitter) Instagram YouTube LinkedIn
    Our Picks

    6 leading crypto trading bots in 2026 to help achieve automated trading

    April 1, 2026

    Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case

    April 1, 2026

    Geth 1.6 – Puppeth Master

    April 1, 2026
    Recent Posts
    • 6 leading crypto trading bots in 2026 to help achieve automated trading
    • Bitcoin, beatings, and a billionaire’s vendetta: Georgia’s Bachiashvili case
    • Geth 1.6 – Puppeth Master
    • DOL move to open 401(k)s to crypto and private assets sparks praise and backlash
    • NAKA CEO after 96% decline: ‘We’ll get this over with as quickly as possible’
    © 2026 - 2026

    Type above and press Enter to search. Press Esc to cancel.