Saturday, July 26, 2025
  • Home
  • Cryptocurrency
  • Bitcoin
  • Blockchain
  • Market & Analysis
  • Altcoin
  • More
    • Ethereum
    • DeFi
    • XRP
    • Dogecoin
    • NFTs
    • Regulations
  • Shop
    • Bitcoin Book
    • Bitcoin Coin
    • Bitcoin Hat
    • Bitcoin Merch
    • Bitcoin Miner
    • Bitcoin Miner Machine
    • Bitcoin Shirt
    • Bitcoin Standard
    • Bitcoin Wallet
Finance Bitcoin
Shop
No Result
View All Result
Finance Bitcoin
No Result
View All Result
Home Ethereum

Solidity optimizer bug | Ethereum Foundation Blog

by n70products
July 26, 2025
in Ethereum
0
Solidity optimizer bug | Ethereum Foundation Blog
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


A bug within the Solidity optimizer was reported by 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 by which one methodology ceased functioning when one other – completely unrelated – methodology was added to the contract. After evaluation, it was decided that a lot of situations should exist directly for the bug to set off. Any mixture of situations that may set off the bug would persistently have the next two situations:

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

Along with the 2 situations above, there are additional, extra difficult situations which might be required.

Evaluation

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

We carried out a static evaluation of all contract code deployed on the blockchain, and located no incidence of such an invalidly generated routine. Observe, 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

With the intention 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 applied this, which might be seen here and here.

In regards to 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 can be a lot simpler to know and audit and it’ll change the present optimizer.



Source link

Tags: BlogBugEthereumFoundationOptimizerSolidity
  • Trending
  • Comments
  • Latest
Liquidation Alert As High-Risk Loans On Aave Reach $1 Billion – Details

Liquidation Alert As High-Risk Loans On Aave Reach $1 Billion – Details

December 19, 2024
Slumping Memecoin Pepe Could Witness Nearly 50% Collapse, Warns Crypto Trader

Slumping Memecoin Pepe Could Witness Nearly 50% Collapse, Warns Crypto Trader

December 16, 2024
Devconnect Istanbul 2023 – A celebration of progress and the Ethereum community

Devconnect Istanbul 2023 – A celebration of progress and the Ethereum community

December 16, 2024
XRP Primed for 90% Rally to $1.2, According to Top Analyst

XRP Primed for 90% Rally to $1.2, According to Top Analyst

December 16, 2024
iStock 1252711675

Peter Schiff Questions True Agenda Behind MicroStrategy’s Bitcoin Acquisition

0
Decentralized Oracle Network Chainlink Leads the Crypto Space in Terms of Recent Development Activity: Santiment

Decentralized Oracle Network Chainlink Leads the Crypto Space in Terms of Recent Development Activity: Santiment

0
Migrate and modernize enterprise integration using IBM Cloud Pak for Integration with Red Hat OpenShift Service on AWS (ROSA)

Migrate and modernize enterprise integration using IBM Cloud Pak for Integration with Red Hat OpenShift Service on AWS (ROSA)

0
A16z Crypto Lawyer Unleashes Scathing Attack On US SEC, Spot Ethereum ETF In Danger?

A16z Crypto Lawyer Unleashes Scathing Attack On US SEC, Spot Ethereum ETF In Danger?

0
Bitcoin ETFs Mean No More Wild Price Swings — Analyst

Bitcoin ETFs Mean No More Wild Price Swings — Analyst

July 26, 2025
Ethereum ETFs see $1.85B inflows – 25x more than Bitcoin!

Ethereum ETFs see $1.85B inflows – 25x more than Bitcoin!

July 26, 2025
Pakistan’s Youth Leading Charge on Bitcoin Adoption

Pakistan’s Youth Leading Charge on Bitcoin Adoption

July 26, 2025
I tested the best video editing laptops in 2025: Here’s what I recommend for your next project

I tested the best video editing laptops in 2025: Here’s what I recommend for your next project

July 26, 2025

Recent News

Bitcoin ETFs Mean No More Wild Price Swings — Analyst

Bitcoin ETFs Mean No More Wild Price Swings — Analyst

July 26, 2025
Ethereum ETFs see $1.85B inflows – 25x more than Bitcoin!

Ethereum ETFs see $1.85B inflows – 25x more than Bitcoin!

July 26, 2025

Categories

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

Recommended

  • Bitcoin ETFs Mean No More Wild Price Swings — Analyst
  • Ethereum ETFs see $1.85B inflows – 25x more than Bitcoin!
  • Pakistan’s Youth Leading Charge on Bitcoin Adoption
  • I tested the best video editing laptops in 2025: Here’s what I recommend for your next project

© 2024 Finance Bitcoin | All Rights Reserved

No Result
View All Result
  • Home
  • Cryptocurrency
  • Bitcoin
  • Blockchain
  • Market & Analysis
  • Altcoin
  • More
    • Ethereum
    • DeFi
    • XRP
    • Dogecoin
    • NFTs
    • Regulations
  • Shop
    • Bitcoin Book
    • Bitcoin Coin
    • Bitcoin Hat
    • Bitcoin Merch
    • Bitcoin Miner
    • Bitcoin Miner Machine
    • Bitcoin Shirt
    • Bitcoin Standard
    • Bitcoin Wallet

© 2024 Finance Bitcoin | All Rights Reserved

Go to mobile version