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
feat(data): integrate LittDB-backed BlockDB into autobahn data layer (CON-272) (#3707)
## Summary
- Replaces `DataWAL` (two WAL files) with a LittDB-backed `BlockDB` for
block and QC persistence
- `NewState(cfg, blockDB)` replays persisted state at construction time;
`None` disables persistence
- `GigaRouter` owns the `BlockDB` lifecycle: open in constructor, defer
close in `Run`
**Behavioral note:** On restart, blocks pruned before the previous
shutdown may briefly reappear until BlockDB GC catches up.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -110,6 +117,35 @@ Output is written to the file specified by --output.`,
110
117
},
111
118
}
112
119
cmd.Flags().StringP("output", "o", "", "output file path for the autobahn config")
113
-
cmd.Flags().String("persistent-state-dir", "data/autobahn", "directory to persist autobahn consensus and data WALs across restarts; relative paths are resolved against the node's --home dir; pass --persistent-state-dir= (empty) to disable persistence and run in-memory only")
120
+
cmd.Flags().String("persistent-state-dir", "data/autobahn", "directory to persist autobahn consensus state and BlockDB across restarts; relative paths are resolved against the node's --home dir; pass --persistent-state-dir= (empty) to disable persistence and run in-memory only (memblock)")
121
+
// Default 30s: this helper is used by docker/local clusters, not production
122
+
// node bring-up. Pass --blockdb-retention= (empty) to omit block_db and keep
123
+
// littblock's production default (24h).
124
+
cmd.Flags().String("blockdb-retention", "30s", "BlockDB retention TTL written into block_db (default 30s for local/docker); pass empty to omit and keep littblock's 24h default")
125
+
cmd.Flags().String("blockdb-gc-period", "", "optional BlockDB GC period (e.g. 10s); omit to keep littblock default")
114
126
returncmd
115
127
}
128
+
129
+
// buildGenBlockDBConfig builds optional block_db overrides from gen-autobahn-config flags.
130
+
// Empty duration strings leave BlockDB as the zero value (omitted from JSON).
0 commit comments