autobahn: feed persistent_state_dir into data WAL (CON-256)#3483
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
1a0bc73 to
ac772c0
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3483 +/- ##
==========================================
+ Coverage 59.06% 59.08% +0.01%
==========================================
Files 2187 2187
Lines 182294 182286 -8
==========================================
+ Hits 107676 107697 +21
+ Misses 64953 64943 -10
+ Partials 9665 9646 -19
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
21a8b57 to
5e450da
Compare
The data layer's block and commitqc WALs were constructed with utils.None[string](), making them no-ops: writes returned success but nothing landed on disk, and NewState loaded an empty WAL on every restart. Single-node restarts survived only by peer-fed PushQC; a coordinated cluster restart had no recovery path because every node had simultaneously lost its in-memory data. The autobahn config file already has persistent_state_dir, and it was already wired into the consensus layer. Thread the same value into the data layer: - gen_autobahn_config: add --persistent-state-dir flag with default "data/autobahn" so persistence is on out of the box; pass an empty value to opt into in-memory-only mode. - node/setup.go: rootify the loaded persistent_state_dir against cfg.RootDir when it's relative, matching how other tendermint config paths are resolved. - p2p.GigaRouterConfig: add PersistentStateDir field. NewGigaRouter propagates it into cfg.Consensus.PersistentStateDir so the consensus and data layers share a single source of truth (they use distinct subdirs under the root: inner / blocks / commitqcs for consensus, globalblocks / fullcommitqcs for data). - p2p/giga_router.go: pass cfg.PersistentStateDir to data.NewDataWAL instead of utils.None. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5e450da to
9c25c24
Compare
PR SummaryMedium Risk Overview The Giga (Autobahn) router now initializes the data-layer WALs using Reviewed by Cursor Bugbot for commit 336de10. Bugbot is set up for automated code reviews on this repo. Configure here. |
Summary
The data layer's block and commitqc WALs were constructed with
utils.None[string](), making them no-ops: writes returned success but nothing landed on disk, andNewStateloaded an empty WAL on every restart.The autobahn config file already has
persistent_state_dirand it was already wired into the consensus layer. Reuse the same value for the data layer's WAL (viacfg.Consensus.PersistentStateDir) — the two layers write to distinct subdirs under the same root. No new struct field; once BlockDB has a writer the data WAL will go away entirely (TODO in code).This will enable Upgrade (Major) test for Autobahn. Right now it's stuck because the previous states are lost upon restart.
Visible changes
gen-autobahn-config--persistent-state-dirflag now defaults todata/autobahn(was: field absent, persistence off). Pass--persistent-state-dir=to disable.persistent_state_dirinautobahn.jsonis now rootified against--homeat load time, matching other tendermint config paths.Test plan