Close Menu

    Subscribe to Updates

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

    What's Hot

    Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal

    August 15, 2025

    EOS founder Dan Larimer predicts biblical apocalypse next week

    August 15, 2025

    Web3 esports platform Miomi Game integrates AUSD on Polygon

    August 15, 2025
    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 JohnsonJuly 22, 2025No 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

    Join Us: EF Protocol Reddit AMA – August 29th, 2025

    August 15, 2025

    SIGN price soars 11% as Sign Foundation completes $12M token buyback

    August 13, 2025

    Fear & Greed Index hits 63 as Bitcoin, ETH, and SOL rebound

    August 7, 2025
    Leave A Reply Cancel Reply

    Don't Miss

    Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal

    Crypto August 15, 2025

    The man behind Sheep Marketplace, a defunct darknet hub, now faces fresh charges after allegedly…

    EOS founder Dan Larimer predicts biblical apocalypse next week

    August 15, 2025

    Web3 esports platform Miomi Game integrates AUSD on Polygon

    August 15, 2025

    VCs secretly cashed out rewards on ‘locked’ EIGEN tokens

    August 15, 2025
    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo
    Our Picks

    AGII Develops Adaptive Intelligence Layers to Improve Web3 Workflow Precision

    August 15, 2025

    Imagen Network Enhances Content Discovery and Interaction with Grok AI Integration

    August 15, 2025

    Imagen Network Integrates Grok AI to Deliver More Personalized and Engaging Social Experiences

    August 14, 2025

    Imagen Network (IMAGE) Boosts User Engagement Using XRP for Instant Social Transactions

    August 13, 2025

    Subscribe to Updates

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

    Demo
    • Popular
    • Recent
    • Top Reviews

    Polyhedra’s ZKJ token collapses following ‘abnormal on-chain activity’

    June 17, 2025

    Polyhedra’s ZKJ token collapses following ‘abnormal on-chain activity’

    June 17, 2025

    Colle AI Releases Design-Focused NFT Tools for Real-Time Creator Prototyping

    June 17, 2025

    Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal

    August 15, 2025

    EOS founder Dan Larimer predicts biblical apocalypse next week

    August 15, 2025

    Web3 esports platform Miomi Game integrates AUSD on Polygon

    August 15, 2025
    Latest Galleries
    [latest_gallery cat="all" number="5" type="slider"]
    Latest Reviews
    Demo
    Top Posts

    AGII Develops Adaptive Intelligence Layers to Improve Web3 Workflow Precision

    August 15, 20250 Views

    Imagen Network Enhances Content Discovery and Interaction with Grok AI Integration

    August 15, 20250 Views

    Imagen Network Integrates Grok AI to Deliver More Personalized and Engaging Social Experiences

    August 14, 20250 Views

    Imagen Network (IMAGE) Boosts User Engagement Using XRP for Instant Social Transactions

    August 13, 20250 Views
    Don't Miss

    Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal

    Crypto August 15, 2025

    The man behind Sheep Marketplace, a defunct darknet hub, now faces fresh charges after allegedly…

    EOS founder Dan Larimer predicts biblical apocalypse next week

    August 15, 2025

    Web3 esports platform Miomi Game integrates AUSD on Polygon

    August 15, 2025

    VCs secretly cashed out rewards on ‘locked’ EIGEN tokens

    August 15, 2025
    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

    Bitcoin.com Wallet Earns WalletConnect Certified Badge! | by Bitcoin.com | Jul, 2025

    July 18, 202565 Views

    Justin Sun sues Bloomberg after report claims he owns 60% of TRON tokens

    August 14, 202538 Views

    SIGN price soars 11% as Sign Foundation completes $12M token buyback

    August 13, 202514 Views

    ProfitFarmers Review – Is it Legit? July 2025

    July 7, 20251 Views
    Don't Miss

    Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal

    Crypto August 15, 2025

    The man behind Sheep Marketplace, a defunct darknet hub, now faces fresh charges after allegedly…

    EOS founder Dan Larimer predicts biblical apocalypse next week

    August 15, 2025

    Web3 esports platform Miomi Game integrates AUSD on Polygon

    August 15, 2025

    VCs secretly cashed out rewards on ‘locked’ EIGEN tokens

    August 15, 2025
    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

    Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal

    August 15, 2025

    EOS founder Dan Larimer predicts biblical apocalypse next week

    August 15, 2025

    Web3 esports platform Miomi Game integrates AUSD on Polygon

    August 15, 2025
    Recent Posts
    • Czech police arrest infamous darknet operator in Bitcoin-for-favors scandal
    • EOS founder Dan Larimer predicts biblical apocalypse next week
    • Web3 esports platform Miomi Game integrates AUSD on Polygon
    • VCs secretly cashed out rewards on ‘locked’ EIGEN tokens
    • Federal Reserve drops program that increased banks scrutiny of crypto
    © 2025 - 2026

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