cloudhead / cloudhead/nakamoto

Handle race condition with fast rescan and low gap limit

Open
#102 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
391
Forks
64
PR merge metrics
No merged PRs in 30d

Description

It's likely that a fast rescan combined with a normal or low gap limit will miss some blocks. The reason is that the rescan process doesn't pause when a block is matched, and it never backtracks; so if a block is matched at some height H, while the rescan process is at height H+100, and the matched block at H adds more than the gap-limit worth of new scripts, those will be missed between blocks H and H+100.

This was found out by @straylight-orbit

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.