Skip to content

Incorrect block stored in database for MPT mode #118

Closed
@greged93

Description

@greged93

Describe the bug

The blocks stored in database during the pipeline syncing for the MPT mode do not contain the correct state root (hence not the correct hash). We should modify the block stored at the end of the Merkle stage.

Steps to reproduce

  1. Run cargo run --release --bin scroll-reth-mpt --features "scroll,skip-state-root-validation" --manifest-path crates/scroll/bin/scroll-reth-mpt/Cargo.toml -- node --chain scroll-mainnet --metrics 0.0.0.0:9001 --debug.tip 0xd73993f9db2b3f3cf884a2d0ae8b5e695cfcfe36b856c6ec334334de7f2f2fdb --http --http.addr 0.0.0.0 --http.port 8545
  2. Query ETH_RPC_URL=localhost:8545 cast block 100 and ETH_RPC_URL=https://1rpc.io/scroll cast block 100.
  3. State roots and block hashes should be different.

Node logs

No response

Platform(s)

Mac (Apple Silicon)

Container Type

Not running in a container

What version/commit are you on?

reth-scroll-cli Version: 1.1.4-dev
Commit SHA: dba9746
Build Timestamp: 2024-12-27T18:08:30.555578000Z
Build Features: scroll
Build Profile: release

What database version are you on?

Current database version: 2
Local database version: 2

Which chain / network are you on?

scroll-mainnet

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

cargo run --release --bin scroll-reth-mpt --features "scroll,skip-state-root-validation" --manifest-path crates/scroll/bin/scroll-reth-mpt/Cargo.toml -- node --chain scroll-mainnet --metrics 0.0.0.0:9001 --debug.tip 0xd73993f9db2b3f3cf884a2d0ae8b5e695cfcfe36b856c6ec334334de7f2f2fdb --http --http.addr 0.0.0.0 --http.port 8545

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions