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
Number of blocks between snapshots when db-sync is near the tip of the chain(within approximately 10 minutes). More frequent snapshots when following the tip ensure faster recovery from rollbacks.
629
+
Epoch threshold used to determine snapshot behavior. When syncing reaches this epoch or later, db-sync is considered to be approaching or at the current tip of the chain. Combined with time-based detection (within 10 days of current time), this ensures snapshots are taken every epoch when near the tip for fast rollback recovery. During earlier epochs or when syncing behind, snapshots are taken every 10 epochs or according to the `lagging` block interval.
630
630
631
631
### Lagging
632
632
@@ -635,23 +635,24 @@ Number of blocks between snapshots when db-sync is near the tip of the chain (wi
635
635
* Type: `integer`
636
636
* Default: `100000`
637
637
638
-
Number of blocks between snapshots when db-sync is syncing and significantly behind the tip of the chain. Less frequent snapshots during initial sync improves performance by reducing expensive disk operations.
638
+
Number of blocks between snapshots when db-sync is syncing and significantly behind the tip of the chain (more than 10 days behind current time). Less frequent snapshots during initial sync improves performance by reducing expensive disk operations.
639
639
640
640
### Example
641
641
642
642
```json
643
643
{
644
644
"snapshot_interval": {
645
-
"following": 500,
645
+
"near_tip_epoch": 580,
646
646
"lagging": 100000
647
647
}
648
648
}
649
649
```
650
650
651
651
### Performance Considerations
652
652
653
-
-**Smaller `following` value**: Faster recovery from rollbacks when near the tip, but more frequent disk writes
653
+
-**Lower `near_tip_epoch` value**: Start taking frequent epoch-based snapshots earlier in the chain history
654
+
-**Higher `near_tip_epoch` value**: Delay frequent snapshots until later in the chain, improving sync speed for longer
654
655
-**Larger `lagging` value**: Faster initial sync with reduced IOPS, but slower recovery if rollback is needed during sync
655
-
-**Recommended for initial sync**: Use a large `lagging` value (50000-100000) to maximise sync speed
656
-
-**Recommended when near tip**: Use a small `following` value (500-1000) to enable quick rollback recovery
656
+
-**Recommended for initial sync**: Use a large `lagging` value (100000+) and appropriate `near_tip_epoch`to maximize sync speed
657
+
-**Near tip detection**: Automatically switches to epoch-based snapshots when within 10 days of current time, regardless of epoch number
0 commit comments