Commit c96768a
fix: v32.6-8 — fast cold-start sync (snapshot anchor + WAL-off catchup)
v32.6 — Early snapshot anchor at h=90. Adds an extra trigger on the
first macroblock boundary so a joining super-node finds a usable
snapshot ~90 s after network start instead of waiting the legacy
3600-block (1 h) interval. Baseline interval (3600) is retained.
Removed the height%3600 guard inside create_incremental_snapshot; the
caller in node.rs now owns the trigger schedule, the storage function
always writes when called with height>0.
v32.7 — WAL-disabled writes during fast-sync. save_microblock_efficient
checks FAST_SYNC_IN_PROGRESS per write and uses WriteOptions::disable_wal
during catch-up, cutting the per-block fsync (~5-100 ms each) and
unlocking 10-100× apply throughput while the chain is behind. A periodic
db.flush() every 500 blocks bounds the at-risk window on crash. The
FastSyncGuard now carries an Arc<Storage> and calls flush_db() in Drop
before clearing FAST_SYNC_IN_PROGRESS, so any non-WAL writes are
persisted before normal-WAL mode resumes. Storage exposes a public
flush_db() helper.
v32.8 — State-sync wait-loop for cold-start. When sync_from_height=0,
the snapshot fetch retries up to 30× with 10 s delay (≤5 min total),
giving the network time to produce its first anchor (v32.6 makes that
~90 s). Warm gap>1500 still uses a single attempt; on exhaustion the
loop falls through to block-by-block sync, preserving the legacy
recovery path.
Validation: cargo check + lib tests across qnet-integration (147/147),
qnet-consensus (73/73), qnet-state (32/32). 252 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 49dfe24 commit c96768a
2 files changed
Lines changed: 80 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17820 | 17820 | | |
17821 | 17821 | | |
17822 | 17822 | | |
17823 | | - | |
17824 | | - | |
| 17823 | + | |
| 17824 | + | |
| 17825 | + | |
| 17826 | + | |
| 17827 | + | |
| 17828 | + | |
17825 | 17829 | | |
17826 | 17830 | | |
| 17831 | + | |
17827 | 17832 | | |
17828 | 17833 | | |
17829 | 17834 | | |
| |||
17933 | 17938 | | |
17934 | 17939 | | |
17935 | 17940 | | |
17936 | | - | |
| 17941 | + | |
17937 | 17942 | | |
17938 | | - | |
17939 | | - | |
17940 | | - | |
| 17943 | + | |
| 17944 | + | |
| 17945 | + | |
| 17946 | + | |
17941 | 17947 | | |
17942 | 17948 | | |
| 17949 | + | |
| 17950 | + | |
| 17951 | + | |
17943 | 17952 | | |
17944 | 17953 | | |
17945 | | - | |
17946 | | - | |
| 17954 | + | |
| 17955 | + | |
| 17956 | + | |
17947 | 17957 | | |
17948 | 17958 | | |
17949 | | - | |
17950 | | - | |
17951 | | - | |
17952 | | - | |
17953 | | - | |
17954 | | - | |
17955 | | - | |
17956 | | - | |
17957 | | - | |
17958 | | - | |
17959 | | - | |
17960 | | - | |
17961 | | - | |
| 17959 | + | |
| 17960 | + | |
| 17961 | + | |
| 17962 | + | |
| 17963 | + | |
| 17964 | + | |
| 17965 | + | |
| 17966 | + | |
| 17967 | + | |
| 17968 | + | |
| 17969 | + | |
| 17970 | + | |
| 17971 | + | |
| 17972 | + | |
| 17973 | + | |
| 17974 | + | |
| 17975 | + | |
| 17976 | + | |
| 17977 | + | |
17962 | 17978 | | |
17963 | | - | |
17964 | | - | |
17965 | | - | |
17966 | | - | |
| 17979 | + | |
| 17980 | + | |
| 17981 | + | |
| 17982 | + | |
| 17983 | + | |
| 17984 | + | |
| 17985 | + | |
| 17986 | + | |
| 17987 | + | |
| 17988 | + | |
| 17989 | + | |
| 17990 | + | |
| 17991 | + | |
| 17992 | + | |
17967 | 17993 | | |
17968 | 17994 | | |
17969 | 17995 | | |
| 17996 | + | |
17970 | 17997 | | |
17971 | 17998 | | |
17972 | 17999 | | |
| |||
21923 | 21950 | | |
21924 | 21951 | | |
21925 | 21952 | | |
21926 | | - | |
21927 | | - | |
| 21953 | + | |
| 21954 | + | |
| 21955 | + | |
| 21956 | + | |
| 21957 | + | |
| 21958 | + | |
21928 | 21959 | | |
21929 | 21960 | | |
21930 | 21961 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3974 | 3974 | | |
3975 | 3975 | | |
3976 | 3976 | | |
3977 | | - | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
3978 | 3989 | | |
3979 | 3990 | | |
3980 | 3991 | | |
| |||
3992 | 4003 | | |
3993 | 4004 | | |
3994 | 4005 | | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
| 4011 | + | |
3995 | 4012 | | |
3996 | 4013 | | |
3997 | 4014 | | |
| |||
7176 | 7193 | | |
7177 | 7194 | | |
7178 | 7195 | | |
7179 | | - | |
7180 | | - | |
7181 | | - | |
7182 | | - | |
7183 | | - | |
7184 | | - | |
| 7196 | + | |
| 7197 | + | |
| 7198 | + | |
| 7199 | + | |
7185 | 7200 | | |
7186 | 7201 | | |
7187 | | - | |
7188 | | - | |
7189 | | - | |
7190 | | - | |
7191 | 7202 | | |
7192 | 7203 | | |
7193 | 7204 | | |
| |||
0 commit comments