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

Assertion failed: key > self.key with op-reth #10924

Open
1 task done
Zacholme7 opened this issue Sep 15, 2024 · 4 comments
Open
1 task done

Assertion failed: key > self.key with op-reth #10924

Zacholme7 opened this issue Sep 15, 2024 · 4 comments
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks S-feedback-wanted This issue/PR is looking for feedback

Comments

@Zacholme7
Copy link

Describe the bug

This is a reoccurring bug that has happens to me before. Sometimes It can fix itself and sometimes it cannot. Execution is unable to boot due to the above assertion.

Steps to reproduce

I am not sure the exact cause, but it has to do with reading from the db. Most recently, the following code is what caused the error.

 let db_env = DatabaseEnv::open(
    db_path,
    DatabaseEnvKind::RO,
    DatabaseArguments::new(ClientVersion::default())
).unwrap();
let db_ev = Arc::new(db_env);

let static_file_provider = StaticFileProvider::read_only(static_path, true).unwrap();
static_file_provider.watch_directory();

let chain_spec = Arc::new(BASE_MAINNET.inner.clone());
let database: ProviderFactory<NodeTypesWithDBAdapter<EthereumNode, _>> = 
    ProviderFactory::new(db_ev.clone(), chain_spec.clone(), static_file_provider);

let db_provider = database.provider().unwrap();
let state_provider = database.latest().unwrap();

while true {
    let db_number = db_provider.best_block_number().unwrap();
    let provider_number = provider.get_block_number().await.unwrap();
    println!("db {:?}, provider {:?}", db_number, provider_number);
}

Node logs

base_reth    | thread 'tokio-runtime-worker' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/alloy-trie-0.5.0/src/hash_builder/mod.rs:115:9:
base_reth    | assertion failed: key > self.key
base_reth    | stack backtrace:
base_reth    | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
base_reth    | 2024-09-15T14:17:31.199993Z ERROR Critical task `pipeline task` panicked: `assertion failed: key > self.key`
base_reth    | 2024-09-15T14:17:31.200069Z ERROR shutting down due to error
base_reth    | Error: Critical task `pipeline task` panicked: `assertion failed: key > self.key`
base_reth    |
base_reth    | Location:
base_reth    |     /project/crates/cli/runner/src/lib.rs:161:32

Platform(s)

Linux (x86)

What version/commit are you on?

1.0.6

What database version are you on?

2

Which chain / network are you on?

base

What type of node are you running?

Full via --full flag

What prune config do you use, if any?

[prune]
block_interval = 5

[prune.segments]
sender_recovery = "full"

[prune.segments.account_history]
distance = 10064

[prune.segments.storage_history]
distance = 10064

[prune.segments.receipts_log_filter]

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@Zacholme7 Zacholme7 added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Sep 15, 2024
@Rjected
Copy link
Member

Rjected commented Sep 15, 2024

Hi, is that code from reth or your own app?

@Zacholme7
Copy link
Author

Hi, is that code from reth or your own app?

own app. running this/some variation of this has caused the error on 3 separate occasions.

@rkrasiuk
Copy link
Member

@Zacholme7 do you have any additional state root related code you are calling? because that is what's causing the error

@Zacholme7
Copy link
Author

@Zacholme7 do you have any additional state root related code you are calling? because that is what's causing the error

Not in this situation no, sorry. This code was ran directly after the main function, so it was basically the entire program in this case.

@emhane emhane added A-blockchain-tree Related to sidechains, reorgs and pending blocks S-feedback-wanted This issue/PR is looking for feedback and removed S-needs-triage This issue needs to be labelled C-bug An unexpected or incorrect behavior labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks S-feedback-wanted This issue/PR is looking for feedback
Projects
Status: Todo
Development

No branches or pull requests

4 participants