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
{{ message }}
Repository navigation
Commit 39bb903
Browse filesBrowse the repository at this point in the historyBrowse files
Export pre-kickoff heights memIAVL-only when FlatKV can't reach them (#4519)
On pacific-1 the state-sync snapshot at 236640000 started about 535
blocks before the FlatKV migration kicked off. The SC export correctly
streamed memIAVL only, since FlatKV didn't exist yet. About 2h45m later
the wasm extension snapshotter called
`CacheMultiStoreForExport(236640000)`, which opens
`CompositeCommitStore.LoadVersionReadOnly`. FlatKV existed by then, so
it was loaded unconditionally and failed with `version unreachable:
cannot reach version 236640000: nearest snapshot is 0 ... the WAL only
holds 236640535-236661881`. Every state-sync node lost that snapshot.
`Exporter` has the same flaw in its metadata gating when an export of a
pre-kickoff height starts after kickoff.
At those heights FlatKV isn't part of the AppHash, so memIAVL alone is
the full state. When FlatKV can't reach the requested version, the
export paths now look at the oldest retained FlatKV snapshot above it.
Migration status only moves forward, so if the migration hadn't started
at that snapshot it hadn't started at the target either. In that case
`Exporter` streams memIAVL only, and the new
`LoadVersionReadOnlyForExport`, which `CacheMultiStoreForExport` now
uses under Auto, opens a memIAVL-only view. Any other unreachable
version still fails, so a post-kickoff height whose FlatKV history was
pruned can't produce a snapshot that silently leaves FlatKV out. FlatKV
gets `OldestSnapshotAbove` on `LiveStateStore` to support the check.
The generic `LoadVersionReadOnly` is unchanged and still refuses
pre-FlatKV-era heights, as
`TestComposite_Auto_ReadOnlyPreFlatKVEraHeightNowFails` pins. The new
Auto tests reproduce the mainnet error on main for both export paths and
pass with the fix.
0 commit comments