HomeEtherumBug in Solidity Optimizer Discovered by Ethereum Foundation Blog

Bug in Solidity Optimizer Discovered by Ethereum Foundation Blog

Published on

The Ethereum Foundation Bounty program received a report from Christoph Jentzsch about a bug in the Solidity optimizer. This bug has been fixed with the release of Solidity 0.4.11 on 2017-05-03.

Background

The bug affected the optimizer’s handling of constants in the byte code. It resulted in the optimizer failing to properly recreate the original constant in certain cases.

The bug was observed in a contract where the addition of an unrelated method caused another method to stop functioning. Analysis revealed specific conditions that needed to be present for the bug to trigger, including the use of certain constants in the code.

Analysis

The bug has been present in all released versions of Solidity since at least summer 2015. Despite its long presence, it was difficult to trigger using typical code.

A static analysis of all contract code deployed on the blockchain did not reveal any instances of the invalidly generated routine associated with the bug. However, this does not guarantee the absence of such occurrences.

Improvements

To improve transparency and awareness of Solidity-related vulnerabilities, information about such issues is now being exported as JSON files in the Solidity code repository. We hope that block explorers will integrate this information for users’ benefit.

Etherscan has already implemented this feature.

To address the bug, a mini-EVM was added to the optimizer to verify the correctness of each generated routine during compile time. Additionally, efforts have begun on developing a more high-level intermediate language to replace the current optimizer and improve its auditability.

Latest articles

Analyst Suggests Ethereum Price Could Surge to $3,100 with Bullish Momentum

Ethereum (ETH), the second-largest cryptocurrency, has seen a significant price increase over the past...

Cboe Digital Announces Plan to Introduce Margin Futures Trading for Bitcoin and Ethereum by 2024

On Nov. 13, Cboe Digital announced that it will soon launch trading and clearing...

Top Trader Predicts Significant Price Increases for Sushi and Apecoin – Check Out His Projections

A crypto strategist says more rallies are up ahead for prominent decentralized exchange (DEX)...

What is the difference between NVMe and M.2?

`` Over the last decade, solid-state drives (SSDs) have become the top choice for many...

More like this

Analyst Suggests Ethereum Price Could Surge to $3,100 with Bullish Momentum

Ethereum (ETH), the second-largest cryptocurrency, has seen a significant price increase over the past...

Cboe Digital Announces Plan to Introduce Margin Futures Trading for Bitcoin and Ethereum by 2024

On Nov. 13, Cboe Digital announced that it will soon launch trading and clearing...

Top Trader Predicts Significant Price Increases for Sushi and Apecoin – Check Out His Projections

A crypto strategist says more rallies are up ahead for prominent decentralized exchange (DEX)...
bitcoin
Bitcoin (BTC) $ 43,580.68 1.11%
ethereum
Ethereum (ETH) $ 2,364.49 5.58%
tether
Tether (USDT) $ 1.00 0.01%
bnb
BNB (BNB) $ 234.31 1.58%
xrp
XRP (XRP) $ 0.65146 3.23%
solana
Solana (SOL) $ 72.93 13.63%
usd-coin
USDC (USDC) $ 1.00 0.03%
staked-ether
Lido Staked Ether (STETH) $ 2,360.73 5.80%
cardano
Cardano (ADA) $ 0.515135 18.44%
dogecoin
Dogecoin (DOGE) $ 0.097478 3.35%