-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancun support #2795
Cancun support #2795
Conversation
Coverage Report@@ Coverage Diff @@
## master cancun-support +/- ##
==================================================
- Coverage 72.87% 72.83% -0.04%
Files 229 229
+ Lines 70028 70073 +45
==================================================
Hits 51031 51031
+ Misses 18997 19042 +45
|
Reason for the gas cost decreases in this PR: The new opcode As example use case, copying 256 bytes costs:
According to an analysis of blocks 10537502 to 10538702 on ethereum, roughly 10.5% of memory copies would have had improved performance with the availability of an MCOPY instruction. Memory copying is used by languages like Solidity and Vyper, where we expect this improvement to provide efficient means of building data structures, including efficient sliced access and copies of memory objects. Having a dedicated MCOPY instruction would also add forward protection against future gas cost changes to CALL instructions in general. |
What does it do?
Adds support for a few EIP's included in
CANCUN
hard-fork.Adds 2 new opcodes (
TLOAD
andTSTORE
) for manipulating state that behaves almost identically to storage but is discarded after every transaction.Adds a new opcode (
MCOPY
) for copying memory. Implementing this change will be important in ensuring that the same solidity/vyper contract compiles down to the same bytecode.´Changes the behaviour of the self destruct opcode.
Are there relevant PRs or issues in other repositories (Polkadot-SDK, Frontier)?
rust-ethereum/evm#278
rust-ethereum/evm#279
rust-ethereum/evm#281
moonbeam-foundation/evm#3
moonbeam-foundation/frontier#205