Skip to content
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

Feat: add CANCUN hard fork support #926

Merged
merged 9 commits into from
Jun 13, 2024
Merged

Feat: add CANCUN hard fork support #926

merged 9 commits into from
Jun 13, 2024

Conversation

mrLSD
Copy link
Member

@mrLSD mrLSD commented Apr 8, 2024

Description

➡️ Added EVM CANCUN hard fork support. Based on SputnikVM release v0.42.0-aurora
➡️ Changed engine-tests that related to CACUN changes
➡️ Solidity: updated to 0.8.25 which support CANCUN Features
➡️ Extended Transactions fields for CANCUN hard fork requirements

Cancun hard fork

➡️ EVM impelentation of Cancun hard fork: aurora-is-near/sputnikvm/pull/39

Breaking changes

➡️ Transaction extended according to EIP-4844 requirements

Gas cost

Gas cost changed as expected insignificantly.

  • 2 tests: gas increased to 1 TGas
  • 1 test: gas decreased to 1 TGas

@mrLSD mrLSD requested review from birchmd and aleksuss as code owners April 8, 2024 08:56
@raventid raventid self-requested a review April 8, 2024 09:08
engine/src/engine.rs Outdated Show resolved Hide resolved
@mrLSD mrLSD self-assigned this Jun 11, 2024
@mrLSD mrLSD added C-enhancement Category: New feature or request A-evm-compatibility Area: EVM compatibility changes or fixes. A-engine Area: purely engine EVM related labels Jun 11, 2024
@mrLSD mrLSD requested review from birchmd and aleksuss June 11, 2024 18:42
Copy link
Member

@birchmd birchmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments on the EIP-4844 transaction implementation, but now I am wondering if we should remove the implementation and simply return an error saying that transaction type is unsupported.

The reason I am asking about this is because the current implementation of EIP-4844 is incomplete and the work needed to complete it seems too large relative to the benefit we get from having it. The following items are missing:

  1. Proper implementation of get_blob_hash and blob_gas_price
  2. Implementation of the point evaluation precompile (for verifying KZG proofs)
  3. Blob transaction validation at runtime
  4. Ability to send complete transaction data (including the blobs, commitments, proofs fields which come after the tx_payload_body), and validation of that additional data

All of this looks like a lot of work to me. The reason I do not think this work is necessarily worth it to us is because this type of transaction is designed for building rollups on top of Ethereum and it does not make sense to try to build a rollup on top of Aurora.

What do you think @aleksuss @mrLSD ?

engine-transactions/src/eip_4844.rs Outdated Show resolved Hide resolved
engine-transactions/src/lib.rs Outdated Show resolved Hide resolved
engine-transactions/src/eip_4844.rs Outdated Show resolved Hide resolved
engine-transactions/src/eip_4844.rs Outdated Show resolved Hide resolved
@mrLSD
Copy link
Member Author

mrLSD commented Jun 12, 2024

I left a few comments on the EIP-4844 transaction implementation, but now I am wondering if we should remove the implementation and simply return an error saying that transaction type is unsupported.
[...]
What do you think @aleksuss @mrLSD ?

@birchmd We didn't plan to support EIP-4844. But the transaction type was added for compatibility reasons.

But you reasonably point out that it's better just to remove supporting that type of transaction.

My reason for not support EIP-4844 on aurora-engine side is:

  • it solves very specific Ethereum Network problems like temporary
    blob data storage. It's the unnatural solution for Aurora on top NEAR.

  • Ethereum full node should operate on it's own to manage and delete blob data
    approximately after 4 weeks. Again as top on NEAR solution, it looks unreasonable at all.
    It's hard to manage. Also, it's related to large amount of data.

  • it's part of the way to Ethereum sharding. And it solves very specific Ethereum network problems.
    Aurora as a solution top on NEAR does not reach that specific kind of problem, as this part is NEAR Protocol
    related solution, but not Aurora as smarcontract on NEAR.

  • And as a conclusion, it doesn't meet the concrete current requirement of Aurora to use blob data storage (and blob hashes as proof verifications)

@birchmd
Copy link
Member

birchmd commented Jun 12, 2024

Great, thanks @mrLSD . Since we agree EIP-4844 is not relevant to Aurora please remove the implementation and just return an error if we get a transaction with that type byte.

@aleksuss
Copy link
Member

My point was that we can know about the EIP-4844 transaction but are not obligated to execute it and just respond to a user that we do not support this type of transaction. But, of course, if we can understand the type of transaction by type byte then the implementation could be removed, and we don't need to deserialize it completely.

@mrLSD mrLSD requested a review from birchmd June 12, 2024 18:00
@mrLSD mrLSD added this pull request to the merge queue Jun 13, 2024
Merged via the queue into develop with commit b4a0eac Jun 13, 2024
24 checks passed
@mrLSD mrLSD deleted the feat/evm-cancun branch June 13, 2024 09:33
aleksuss pushed a commit that referenced this pull request Oct 10, 2024
## Description

➡️ Added **EVM CANCUN** hard fork support. Based on SputnikVM release
[v0.42.0-aurora](https://github.com/aurora-is-near/sputnikvm/releases/tag/v0.42.0-aurora)
➡️  Changed `engine-tests` that related to **CACUN** changes
➡️  Solidity: updated to `0.8.25` which support **CANCUN** Features
➡️  Extended Transactions fields for **CANCUN** hard fork requirements

### Cancun hard fork

➡️ EVM impelentation of Cancun hard fork:
aurora-is-near/sputnikvm/pull/39

### Breaking changes

➡️ Transaction extended according to
[EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) requirements

### Gas cost
Gas cost changed as expected insignificantly.
- 2 tests: gas increased to `1 TGas`
- 1 test: gas decreased to `1 TGas`
@aleksuss aleksuss mentioned this pull request Oct 10, 2024
aleksuss added a commit that referenced this pull request Oct 10, 2024
### Additions

- Added support of CANCUN hardfork by [@mrLSD]. ([#926])
- Added support of EIP-3607 by [@mrLSD]. ([#930])
- Removed restrictions from funding XCC sub-accounts by [@birchmd].
([#931])

### Changes

- Made some EVM gas costs optimisations by [@mrLSD]. ([#934])
- Refactored the gas charge logic form EVM exit reasons by [@mrLSD].
([#935])
- Updated some dependencies and rust-toolchain by [@mrLSD]. ([#936])
- Removed unused `bytes_to_hex` function by [@dwiekawki]. ([#942])
- Added building of actual version of the `near-sandbox` in the
scheduled CI job by [@aleksuss] ([#950])

### Fixes

- Removed duplicated `test` task in the `README.md` by [@dwiekawki].
([#943])
- Fixed some typos in the `README.md` and `Cargo.toml` by [@DemoYeti].
([#945]) ([#946])
- Fixed exceeded prepaid gas error in the `mirror_erc20_token`
transaction by [@aleksuss] ([#951])
- Modified `hardhat.config.js` to support contract verification by
[@spilin] ([#958])

[#926]: #926
[#930]: #930
[#931]: #931
[#934]: #934
[#935]: #935
[#936]: #936
[#942]: #942
[#943]: #943
[#945]: #945
[#946]: #946
[#950]: #950
[#951]: #951
[#958]: #958

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Michael Birch <michael.birch@aurora.dev>
Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev>
Co-authored-by: dwiekawki <176287097+dwiekawki@users.noreply.github.com>
Co-authored-by: dwiekawki <dwiekawki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DemoYeti <164791169+DemoYeti@users.noreply.github.com>
Co-authored-by: spilin <LyoshaKR@gmail.com>
aleksuss added a commit that referenced this pull request Oct 10, 2024
### Additions

- Added support of CANCUN hardfork by [@mrLSD]. ([#926])
- Added support of EIP-3607 by [@mrLSD]. ([#930])
- Removed restrictions from funding XCC sub-accounts by [@birchmd].
([#931])

### Changes

- Made some EVM gas costs optimisations by [@mrLSD]. ([#934])
- Refactored the gas charge logic form EVM exit reasons by [@mrLSD].
([#935])
- Updated some dependencies and rust-toolchain by [@mrLSD]. ([#936])
- Removed unused `bytes_to_hex` function by [@dwiekawki]. ([#942])
- Added building of actual version of the `near-sandbox` in the
scheduled CI job by [@aleksuss] ([#950])

### Fixes

- Removed duplicated `test` task in the `README.md` by [@dwiekawki].
([#943])
- Fixed some typos in the `README.md` and `Cargo.toml` by [@DemoYeti].
([#945]) ([#946])
- Fixed exceeded prepaid gas error in the `mirror_erc20_token`
transaction by [@aleksuss] ([#951])
- Modified `hardhat.config.js` to support contract verification by
[@spilin] ([#958])

[#926]: #926
[#930]: #930
[#931]: #931
[#934]: #934
[#935]: #935
[#936]: #936
[#942]: #942
[#943]: #943
[#945]: #945
[#946]: #946
[#950]: #950
[#951]: #951
[#958]: #958

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Michael Birch <michael.birch@aurora.dev>
Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev>
Co-authored-by: dwiekawki <176287097+dwiekawki@users.noreply.github.com>
Co-authored-by: dwiekawki <dwiekawki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DemoYeti <164791169+DemoYeti@users.noreply.github.com>
Co-authored-by: spilin <LyoshaKR@gmail.com>
aleksuss added a commit that referenced this pull request Oct 10, 2024
### Additions

- Added support of CANCUN hardfork by [@mrLSD]. ([#926])
- Added support of EIP-3607 by [@mrLSD]. ([#930])
- Removed restrictions from funding XCC sub-accounts by [@birchmd].
([#931])

### Changes

- Made some EVM gas costs optimisations by [@mrLSD]. ([#934])
- Refactored the gas charge logic form EVM exit reasons by [@mrLSD].
([#935])
- Updated some dependencies and rust-toolchain by [@mrLSD]. ([#936])
- Removed unused `bytes_to_hex` function by [@dwiekawki]. ([#942])
- Added building of actual version of the `near-sandbox` in the
scheduled CI job by [@aleksuss] ([#950])

### Fixes

- Removed duplicated `test` task in the `README.md` by [@dwiekawki].
([#943])
- Fixed some typos in the `README.md` and `Cargo.toml` by [@DemoYeti].
([#945]) ([#946])
- Fixed exceeded prepaid gas error in the `mirror_erc20_token`
transaction by [@aleksuss] ([#951])
- Modified `hardhat.config.js` to support contract verification by
[@spilin] ([#958])

[#926]: #926
[#930]: #930
[#931]: #931
[#934]: #934
[#935]: #935
[#936]: #936
[#942]: #942
[#943]: #943
[#945]: #945
[#946]: #946
[#950]: #950
[#951]: #951
[#958]: #958

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Michael Birch <michael.birch@aurora.dev>
Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev>
Co-authored-by: dwiekawki <176287097+dwiekawki@users.noreply.github.com>
Co-authored-by: dwiekawki <dwiekawki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DemoYeti <164791169+DemoYeti@users.noreply.github.com>
Co-authored-by: spilin <LyoshaKR@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-engine Area: purely engine EVM related A-evm-compatibility Area: EVM compatibility changes or fixes. C-enhancement Category: New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants