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

Feature request: support eip-4844 #87

Open
3 tasks
dyxushuai opened this issue Feb 7, 2024 · 6 comments
Open
3 tasks

Feature request: support eip-4844 #87

dyxushuai opened this issue Feb 7, 2024 · 6 comments

Comments

@dyxushuai
Copy link
Contributor

dyxushuai commented Feb 7, 2024

Background

Holesky has released the Cankun fork, and supported the eip-4844, it added new transaction type(3), so zeth will panic when decode the new transaction from holesky

_ => unreachable!(),

FYI

EIP: https://eips.ethereum.org/EIPS/eip-4844

ethers-rs status

Related issues: gakonst/ethers-rs#1742, gakonst/ethers-rs#2719

Suggestion

By the way, reth has already supported the new EIP https://github.com/paradigmxyz/reth/blob/34216727d2994761ae6c756e899404f3b5eb312a/crates/primitives/src/transaction/eip4844.rs#L192, maybe zeth can move from ethers to reth

TODOs

  • Wait and update the ethers-core to support 4844(or use reth instead of ethers
  • Add new definition of BlobTx
  • Convert between ethers-core and zeth's transaction definition
@Wollac
Copy link
Contributor

Wollac commented Feb 7, 2024

Yes, to support EIP-4844 we'd need support for blob transactions.
We tried to use the reth types some time ago, but it wasn't feasible because their code base wasn't modular enough and included stuff that wasn't zkVM compatible. This was exactly the reason we had to start the primitives' crate and reimplement certain types. This may have changed, but I was waiting for transactions to be added to alloy` to be able to use them.

Also, I don't think just adding the new transaction type is enough for Cancun support, there are also changes in execution and header for example. So it is a slightly larger change that is not a top priority for us right now.

@dyxushuai
Copy link
Contributor Author

dyxushuai commented Feb 8, 2024

Also, I don't think just adding the new transaction type is enough for Cancun support, there are also changes in execution and header for example. So it is a slightly larger change that is not a top priority for us right now.

Exactly, the new blob tx also has a dynamic format for supporting kzg https://github.com/ethereum/go-ethereum/blob/2ab365f6d8c51d0e313d5ed30d777e49c7dd1213/core/types/tx_blob.go#L207

@dyxushuai
Copy link
Contributor Author

dyxushuai commented Feb 21, 2024

primitives' crate and reimplement certain types. This may have changed, but I was waiting for transactions to be added to alloy`

Alloy has already supported the 4844,
https://github.com/alloy-rs/alloy/blob/42213c0d78c18141836f7129eda92ba2c8c59525/crates/consensus/src/transaction/eip4844.rs#L74
and rpc-provider, so is it a timing to migrate from ethers to alloy? I can help with this issue

@gakonst
Copy link

gakonst commented Mar 1, 2024

Strong rec to move towards Alloy and we'll prioritize anything missing, Alloy is good to go on 4844 and has everything you need except some client side log queries.

@dyxushuai
Copy link
Contributor Author

Strong rec to move towards Alloy and we'll prioritize anything missing, Alloy is good to go on 4844 and has everything you need except some client side log queries.

Alloy requires the MSRV 1.75 alloy-rs/alloy@main/Cargo.toml#L8, but the latest version of risc0's toolchain is only 1.70.

@dyxushuai
Copy link
Contributor Author

Risc0's rustc has already supported the 1.75 by upgradecargo risczero install --version v2024-02-08.1

johntaiko pushed a commit to johntaiko/zeth that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants