hedera-services icon indicating copy to clipboard operation
hedera-services copied to clipboard

Epic: Ethereum Cancun upgrade EVM support

Open david-bakin-sl opened this issue 1 year ago • 0 comments

Cancun upgrade to Ethereum is rolling out in March, and it comes with EVM changes. Bring in a recent BESU version that has Cancun support (> 24.2.1) and provide Cancun support for modularized services according to the 4 Cancun-ish HIPS:

  • [x] #11698
    • Bring in BESU Cancun library (> 24.2.1)
    • Add a ContractsV_0_49Module (in the mono service tree)
    • Integrate it into hedera-evm service (as has been done for V038 before it)
    • Test to confirm that (at least one) new Cancun opcode is accessible with that module
  • [x] #11699
    • HIP-865 - Support transient storage and memory copy EVM opcodes
    • Semantics of these opcodes are identical to EVM, and are fully implemented in BESU
    • Provide tests that confirm these opcodes exist and run correctly in 0.49
      • Provide tests that confirm these opcodes fail (invalid opcode) in (current) EVM module 0.38
  • [x] #11700
    • HIP-866 - Hedera non-support for blobs in Ethereum type 3 transactions
    • Confirm (via testing) that the new Ethereum type 3 transactions (presented via EthereumTransaction) are rejected by modular (and mono) service
    • Override two new EVM opcodes VERSIONEDHASH and BLOBASFEE to "behave as if there are no blobs and that there never have been blobs"
    • Ensure that versionedHashes and blobGasPrice in a TxValues instance are set to safe values
    • Provide tests for the above
  • [x] #11701
    • HIP-867 - Support KZG Point Evaluation precompile
    • Semantics of this precompile are exactly the same as Cancun Ethereum, and is implemented by the BESU EVM client library
    • Provide tests to confirm that this precompile behaves the way it should, according to the underlying EIP
  • [x] #11702
    • HIP-868 - Support SELFDESTRUCT opcode changes for contracts existing prior to the transaction executing the opcode
    • Override SELFDESTRUCT with the new Cancun semantics for the case of a pre-existing contract.
    • Provide tests the all SELFDESTRUCT behavior is as specified in the HIP
    • Provide tests that characterize the existing behavior (V0.38 EVM) for all edge cases w.r.t. allowances, alias unlinking, account destruction, etc. where Hedera is (or should be, or could be) different than Ethereum.
  • [x] #12761 Enable Cancun EVM (v0.49 module)
  • [x] #12994 Upgrade GasCalculator to Cancun & upgrade BESU again
  • [ ] #13210 Cherry pick #13178 to release 0.50.

david-bakin-sl avatar Feb 23 '24 04:02 david-bakin-sl