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

Reth doesn't import block RLPs exported by Geth #25

Closed
debjit-bw opened this issue Oct 24, 2024 · 1 comment
Closed

Reth doesn't import block RLPs exported by Geth #25

debjit-bw opened this issue Oct 24, 2024 · 1 comment

Comments

@debjit-bw
Copy link
Member

Block RLPs provided by Geth raise the following error:

Error: file client has no tip

Full trace:

# ./target/debug/reth import genesis.rlp --chain=./scripts/chiado_genesis_alloc.json         
2024-10-24T16:21:13.601843Z  INFO Initialized tracing, debug log directory: /Users/debjit/Library/Caches/reth/logs/chiado
2024-10-24T16:21:13.609322Z  INFO reth 1.0.8-dev (9a732f6b) starting
2024-10-24T16:21:13.620808Z  INFO Opening storage db_path="/Users/debjit/Library/Application Support/reth/chiado/db" sf_path="/Users/debjit/Library/Application Support/reth/chiado/static_files"
2024-10-24T16:21:13.650432Z  INFO Verifying storage consistency.
2024-10-24T16:21:13.798502Z  INFO Consensus engine initialized
2024-10-24T16:21:13.805114Z  INFO Importing chain file chunk
[/Users/debjit/.cargo/git/checkouts/reth-36d3ea1d1152b20c/9a732f6/crates/cli/commands/src/import.rs:96:13] "debug len:" = "debug len:"
[/Users/debjit/.cargo/git/checkouts/reth-36d3ea1d1152b20c/9a732f6/crates/cli/commands/src/import.rs:96:13] file_client.bodies_len() = 0
Error: file client has no tip

Location:
    /Users/debjit/.cargo/git/checkouts/reth-36d3ea1d1152b20c/9a732f6/crates/cli/commands/src/import.rs:98:47

Diving deeper

We also generate block RLPs using reth itself. For that, the file client has no tip doesn't happen. The file read is successful, but a separate (later in the sequence) error orrurs: #24.

Writing manual RLP decoders in python, we see the difference between the decoded RLPs:

By Geth By Reth
Screenshot 2024-10-24 at 9 59 38 PM Screenshot 2024-10-24 at 10 00 11 PM

The file containing the RLP from reth gets accepted, however the file containing the RLP from geth errors out.

Suspicions:

  • Extra header fields will go into the extra_fields section of the header, but header fields it expects but aren't available in the RLP (such as base fee per gas, in reth, which is not available in geth's RLP) might cause this. However this problem wasn't solved even when londonBlock was set to 10.
@debjit-bw
Copy link
Member Author

this is because of block structure differences. paradigmxyz/reth#12134 makes importing blocks optional. closing since that PR is almost ready to be merged

@debjit-bw debjit-bw closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 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

1 participant