-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Non-deposit transactions have depositReceiptVersion=1 #6604
Comments
It looks like the issue is here: In op-geth there is an extra check |
this can be closed @0xZerohero ? |
I'll check if it was fixed in the latest version. If not I can make a PR |
@mattsse For example cargo test fails with: > cargo test -p reth-revm --features "optimism" -- --nocapture --test optimism::processor::tests
Compiling reth-ethereum-payload-builder v0.1.0-alpha.19 (/home/zerohero/Work/oob/reth-zh/crates/payload/ethereum)
error[E0063]: missing fields `deposit_nonce` and `deposit_receipt_version` in initializer of `Receipt`
--> crates/payload/ethereum/src/lib.rs:320:32
|
320 | receipts.push(Some(Receipt {
| ^^^^^^^ missing `deposit_nonce` and `deposit_receipt_version`
error[E0061]: this method takes 3 arguments but 1 argument was supplied
--> crates/payload/ethereum/src/lib.rs:355:36
|
355 | let receipts_root = bundle.receipts_root_slow(block_number).expect("Number is in range");
| ^^^^^^^^^^^^^^^^^^-------------- two arguments of type `&ChainSpec` and `u64` are missing
|
note: method defined here
--> /home/zerohero/Work/oob/reth-zh/crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs:175:12
|
175 | pub fn receipts_root_slow(
| ^^^^^^^^^^^^^^^^^^
help: provide the arguments
|
355 | let receipts_root = bundle.receipts_root_slow(block_number, /* &ChainSpec */, /* u64 */).expect("Number is in range");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I can fix that by adding: --- a/crates/node-ethereum/Cargo.toml
+++ b/crates/node-ethereum/Cargo.toml
@@ -34,4 +34,4 @@ reth-db.workspace = true
[features]
# This is a workaround for reth-cli crate to allow this as mandatory dependency without breaking the build even if unused.
# This makes managing features and testing workspace easier because clippy always builds all members if --workspace is provided
-optimism = []
\ No newline at end of file
+optimism = ["reth-ethereum-payload-builder/optimism"]
How to proceed?
|
I'll check it tomorrow(I hope). In node-optimism, it should be an integration test, right? I was hoping to find some similar tests there :) Btw I managed to put together something working, but it's in the revm::optimism::processor module, and it's a rough draft. |
I added TestEvmConfig struct to remove the reth-node-* dependencies. This way we don't have to move the unit tests in another crate. WDYT @mattsse ? One of the main problems in the current case is that optional dev-dependencies are not allowed, but I found another solution used by tokio. They are passing --cfg option to rustc by using RUSTFLASGS. For example:
But this is more general design decision. I still don't fully understand how the code separation between ethereum and optimist is intended. There are ethereum and optimism specific crates and other that are using feature "optimism" for conditional compilation and this leads to problems. |
Describe the bug
All non-deposit transactions are stored in the db with depositReceiptVersion=1, but it should be null.
Steps to reproduce
Find a non-deposit and print it.
Node logs
No response
Platform(s)
Linux (x86)
What version/commit are you on?
0.1.0-alpha.17
What database version are you on?
Current database version: 1
Local database version: 1
What type of node are you running?
Archive (default)
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: