question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EIP1283 - Net gas metering

See original GitHub issue

What is wrong?

ttps://eips.ethereum.org/EIPS/eip-1087 https://eips.ethereum.org/EIPS/eip-1283 is coming in Constantinople

How can it be fixed

Implement the changes to how SSTORE costs are computed.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
pipermerriamcommented, Aug 13, 2018

@veox just in case you read these in your email, I update my response with explicit answers to your questions.

1reaction
pipermerriamcommented, Aug 13, 2018

Looking at our JournalDB class, I believe 1283 is going to be easiest to implement. We’ll have to figure out how to expose the original/current values to the SSTORE opcode but that shouldn’t be too difficult.

To answer your specific questions.

Which of the two (if either) would more closely describe the situation in py-evm?

I believe that our architecture is closest to 1283 since we keep an in-memory map of current values.

Would implementing either require pushing the “cache for original values of storage items” deeper? Or is that already available at the point where gas-use metering is done?

Implementing 1283 will require exposing information about the cache (the journal) deeper as to make it available within the SSTORE opcode function. I suspect this will be best done as a combination of a formal API on the AccountDB for checking storage slot status. I believe this will involve simply querying the self._trie which should return the original value, and self._journaltrie which should return the current value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EIP-1283: Net gas metering for SSTORE without dirty maps
This EIP proposes net gas metering changes for SSTORE opcode, enabling new usages for contract storage, and reducing excessive gas costs ...
Read more >
MyCrypto.eth on Twitter: "So, that's the story of ...
EIP-1283: Net gas metering for SSTORE without dirty maps ... live - It is now possible to exploit the smart contract, due to...
Read more >
Eip-1283 / 1706 AMA - EIPs - Fellowship of Ethereum Magicians
We want some form of net gas metering before state rent because many people have asked, and; We want to apply it without...
Read more >
Ethereum Constantinople: What Is It & Why Was It Postponed?
So far, all but one hard fork of the Ethereum network has been successful in converting users to the new ... EIP 1283...
Read more >
Ethereum Constantinople Upgrade: Things you should know
This is about removal of EIP 1283: Net gas metering for SSTORE without ... The upcoming Constantinople Upgrade for the ethereum network ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found