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
fix(sync): resume adder pipeline from last DB block instead of tip (#114)
The adder pipeline used WithIntersectTip(true) on every restart,
causing it to skip ahead to the current chain tip and permanently
lose any blocks between the dead connection and the new tip.
Over time these gaps accumulate — epoch 619 was missing 422 blocks,
epoch 620 was missing 930 blocks. Missing blocks corrupt the nonce
evolution, producing wrong candidate nonces which cascade through
TICKN to produce wrong epoch nonces and wrong leaderlog schedules.
On restart (after historical sync is done), the pipeline now builds
an intersect point from the last 100 blocks in the DB, replaying
from that point to fill the gap. Duplicate blocks are handled by
the existing ON CONFLICT DO NOTHING in InsertBlock/ProcessBlock.
First start still uses tip for live notifications during historical
sync.
0 commit comments