Saturday, May 9, 2026
The BLOCKCHAIN Page
No Result
View All Result
  • Home
  • Cryptocurrency
  • Blockchain
  • Bitcoin
  • Market & Analysis
  • Altcoins
  • DeFi
  • Ethereum
  • Dogecoin
  • XRP
  • Regulations
  • NFTs
The BLOCKCHAIN Page
No Result
View All Result
Home Ethereum

Solidity optimizer bug | Ethereum Foundation Blog

by admin
November 9, 2023
in Ethereum
0
Dodging a bullet: Ethereum State Problems
0
SHARES
5
VIEWS
Share on FacebookShare on Twitter


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

Background

The bug in query involved how the optimizer optimizes on constants within the byte code. By “byte code constants”, we imply something which is PUSHed on the stack (to not be confused with Solidity constants). For instance, if the worth 0xfffffffffffffffffffffffffffffffffffffffffffffffe is PUSHed, then the optimizer can both do PUSH32 0xfffffffffffffffffffffffffffffffffffffffffffffffe, or select to encode this as PUSH1 1; NOT;.

An error within the optimizer made optimizations of byte code constants fail for sure instances by producing a routine that didn’t correctly recreate the unique fixed.

The habits described within the reported bug was present in a contract through which one methodology ceased functioning when one other – completely unrelated – methodology was added to the contract. After evaluation, it was decided that various situations should exist without delay for the bug to set off. Any mixture of situations that may set off the bug would constantly have the next two situations:

  1. The fixed wants to start out with 0xFF… and finish with a protracted collection of zeroes (or vice versa).
  2. The identical fixed must be utilized in a number of places, for the optimizer to decide on to optimize this specific fixed. Alternatively, it must be used within the constructor, which optimises for measurement reasonably than gasoline.

Along with the 2 situations above, there are additional, extra sophisticated situations which are required.

Evaluation

This bug is current in all launched variations of Solidity from not less than way back to summer season 2015 to the current. Though the bug has been current since 2015, it appears very exhausting to set off by “random” code:

We carried out a static evaluation of all contract code deployed on the blockchain, and located no prevalence of such an invalidly generated routine. Word, the truth that now we have not discovered a bug in all of the contract code doesn’t assure the absence of such occurrences.

Enhancements

To be able to present higher transparency and elevated consciousness of bugs in Solidity, now we have began exporting details about Solidity-related vulnerabilities as JSON-files within the Solidity code repository(1,2). We hope that block explorers will combine this info together with different contract-related info.

Etherscan has already carried out this, which may be seen here and here.

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

Moreover, work has already began on a fully-specified and extra high-level intermediate language. Future optimizer routines on this language shall be a lot simpler to grasp and audit and it’ll change the present optimizer.



Source link

Tags: BlogBugEthereumFoundationOptimizerSolidity
admin

admin

Recommended

Top Trader Ditches Bitcoin For Altcoins, ‘Dogecoin Killer’ Shiba Inu’s Potential Breakout And More: This Week In Cryptocurrency

Top Trader Ditches Bitcoin For Altcoins, ‘Dogecoin Killer’ Shiba Inu’s Potential Breakout And More: This Week In Cryptocurrency

2 years ago
BDAG Presale Success Attracts Other DeFi Coins & ThorChain Holders

BDAG Presale Success Attracts Other DeFi Coins & ThorChain Holders

2 years ago

Popular News

  • Protocol-Owned Liquidity: A Sustainable Path for DeFi

    Protocol-Owned Liquidity: A Sustainable Path for DeFi

    0 shares
    Share 0 Tweet 0
  • Cryptocurrency for College: Exploring DeFi Scholarship Models

    0 shares
    Share 0 Tweet 0
  • What are rebase tokens, and how do they work?

    0 shares
    Share 0 Tweet 0
  • What is Velodrome Finance (VELO): why it’s a next-gen AMM

    0 shares
    Share 0 Tweet 0
  • $10 XRP Price Envisioned By Fund Manager As Ripple Mounts Trillion-Dollar Payment Markets ⋆ ZyCrypto

    0 shares
    Share 0 Tweet 0

Latest

Your Roku TV has hidden settings and menu screens – here’s how to access them

I lost my Roku remotes constantly until I found this simple fix

May 9, 2026
Here’s How Much Ripple’s CTO XRP Holdings Would Be Worth If He Never Sold

Here’s How Much Ripple’s CTO XRP Holdings Would Be Worth If He Never Sold

May 8, 2026

Categories

  • Altcoins
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • DeFi
  • Dogecoin
  • Ethereum
  • Market & Analysis
  • NFTs & Metaverse
  • Regulations
  • XRP

Follow us

Recommended

  • I lost my Roku remotes constantly until I found this simple fix
  • Here’s How Much Ripple’s CTO XRP Holdings Would Be Worth If He Never Sold
  • Don’t connect your smart plug to these 5 household devices – an expert warns
  • After using Lenovo’s $2,600 Yoga, I’m taking premium Windows laptops seriously again
  • I started clearing my Roku cache, and it fixed my biggest TV complaint
  • About us
  • Privacy Policy
  • Terms & Conditions

© 2023 TheBlockchainPage | All Rights Reserved

No Result
View All Result
  • Home
  • Cryptocurrency
  • Blockchain
  • Bitcoin
  • Market & Analysis
  • Altcoins
  • DeFi
  • Ethereum
  • Dogecoin
  • XRP
  • Regulations
  • NFTs

© 2023 TheBlockchainPage | All Rights Reserved