You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bulk sync ETA can stay at one minute while indexing millions of blocks #16
During a fresh mainnet bulk build on 7aac8db495ff, the progress log reported ema_bps=312453.2 and eta=1m 2s at height 1,665,779 / 21,091,746. Five consecutive completed-batch records advanced from 1,665,779 to 1,964,624 over about 147 seconds (~2,037 blocks/s). Batches of roughly 75,000 blocks were completing every 36–37 seconds; the reported instantaneous rate dropped between completions, while the EMA and ETA stayed fixed during the sampled interval.
Why
The same calculation is on upstream main. The 30-second window includes the entire oldest completed batch in the numerator, but the denominator starts after that batch, at its completion timestamp. This inflates valid samples. When batches are more than 30 seconds apart, recording the latest completion leaves only one event with zero elapsed time; that sample is ignored. The background refresh only updates the instantaneous rate, leaving the earlier EMA in place. ETA divides remaining blocks by that EMA.
Expected
Use completed-height deltas over real elapsed time across multiple batches (including batches more than 30 seconds apart), and suppress or explicitly mark stale ETA estimates when there is insufficient fresh data. A deterministic regression test could cover a short initial interval followed by several 36–37-second batches. The same sampling logic is also used for transaction throughput.
Activity