-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the feature
this currently behaves like an incremental unwind loop:
reth/crates/stages/api/src/pipeline/mod.rs
Lines 506 to 508 in 202ad6c
| // We unwind because of a detached head. | |
| let unwind_to = | |
| local_head.block.number.saturating_sub(BEACON_CONSENSUS_REORG_UNWIND_DEPTH).max(1); |
so that for example, if node is on a fork it keeps unwinding until it its local head is part of the canonical chain again.
Especially with lower block times and deep reorgs, e.g. unichain sepolia (>4000 blocks) this entire process will take a while.
to improve this we can do various things
a) this constat should be increased
b) maybe even take into account the chain's blocktime (can be derived from comparing two headers) or from the chainid/chainspec
c) use some exponential unwind distance
c) would be preferred here but is likely the most invasive
we can also include some hint: Option number in here:
reth/crates/stages/api/src/error.rs
Line 53 in 202ad6c
| DetachedHead { |
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status