• About
  • Advertise
  • Privacy & Policy
  • Contact
coinmarketcap.yt
Advertisement
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us
No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us
No Result
View All Result
coinmarketcap.yt
No Result
View All Result
Home Ethereum

Solidity optimizer bug | Ethereum Foundation Blog

coinmarketcap.yt by coinmarketcap.yt
December 9, 2022
in Ethereum
0
Dodging a bullet: Ethereum State Problems
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

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.

Previous Post

bitcoin core – does connecting to full node via rpc over the public internet reveal your credentials?

Next Post

Former Blockparty CTO Seized By FBI

coinmarketcap.yt

coinmarketcap.yt

Next Post
Former Blockparty CTO Seized By FBI

Former Blockparty CTO Seized By FBI

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected test

  • 23.8k Followers
  • 99 Subscribers
  • Trending
  • Comments
  • Latest
Breaking Barriers: How Bitcoin Can Transform The Real Estate Industry

Breaking Barriers: How Bitcoin Can Transform The Real Estate Industry

June 2, 2023
Living in Merida Mexico – Cost of Living in Mexico – Tips for living in Mexico on a Budget

Living in Merida Mexico – Cost of Living in Mexico – Tips for living in Mexico on a Budget

December 25, 2022
DeeLance Leads Freelancing’s Web3 Future

DeeLance Leads Freelancing’s Web3 Future

April 30, 2023
SEC Charges 4 People in $295M Global Crypto Ponzi Scheme That Duped Over 100,000 Investors – Regulation Bitcoin News

SEC Charges 4 People in $295M Global Crypto Ponzi Scheme That Duped Over 100,000 Investors – Regulation Bitcoin News

November 6, 2022
Introduction to Bitcoin: what is bitcoin and why does it matter?

Introduction to Bitcoin: what is bitcoin and why does it matter?

0
Bitcoin Explained in the Bitcoin Basics Workshop CBP Prep [Free Workshop Extras – See Description]

Bitcoin Explained in the Bitcoin Basics Workshop CBP Prep [Free Workshop Extras – See Description]

0
Crypto Security: Passwords and Authentication – Livestream aantonop

Crypto Security: Passwords and Authentication – Livestream aantonop

0
Bitcoin for Beginners: Bitcoin Explained in Simple Terms

Bitcoin for Beginners: Bitcoin Explained in Simple Terms

0
Kraken Service Provider Dragged To Court By Australian Financial Regulator

Kraken Service Provider Dragged To Court By Australian Financial Regulator

September 21, 2023
A Person Creates A Successful Meme Token ($12 Million) Via ChatGPT

A Person Creates A Successful Meme Token ($12 Million) Via ChatGPT

September 21, 2023
With Bitcoin’s Price Rallying, Bitcoin BSC Surpasses $3.4m and Might Reach Its Soft Cap Target Within the Next 24 Hours

With Bitcoin’s Price Rallying, Bitcoin BSC Surpasses $3.4m and Might Reach Its Soft Cap Target Within the Next 24 Hours

September 21, 2023
Curve Finance Offering A $1.85M Reward To Catch Curve Finance Exploiter

IMX Token Surges 35% Within 6 Hours: Price Manipulation

September 21, 2023

Recent News

Kraken Service Provider Dragged To Court By Australian Financial Regulator

Kraken Service Provider Dragged To Court By Australian Financial Regulator

September 21, 2023
A Person Creates A Successful Meme Token ($12 Million) Via ChatGPT

A Person Creates A Successful Meme Token ($12 Million) Via ChatGPT

September 21, 2023
With Bitcoin’s Price Rallying, Bitcoin BSC Surpasses $3.4m and Might Reach Its Soft Cap Target Within the Next 24 Hours

With Bitcoin’s Price Rallying, Bitcoin BSC Surpasses $3.4m and Might Reach Its Soft Cap Target Within the Next 24 Hours

September 21, 2023
Curve Finance Offering A $1.85M Reward To Catch Curve Finance Exploiter

IMX Token Surges 35% Within 6 Hours: Price Manipulation

September 21, 2023
coinmarketcap.yt

© 2022 All Rights Reserved coinmarketcap.yt

Navigate Site

  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us

No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us

© 2022 All Rights Reserved coinmarketcap.yt