Sitelet https://github.com/init4tech/storage/pull/68/commits/ffeb5d8db3d29bcba1a081f6d70fef8ccc742bf6
Skip to content
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
62e26e0
feat(storage-types): add BlockNumberList::pop_max
prestwich May 22, 2026
a4c6bb5
feat(storage-types): add merge_and_split for size-bounded history shards
prestwich May 22, 2026
2abf02f
fixup(storage-types): restore debug_assert on merge_and_split precond…
prestwich May 22, 2026
f11f229
test(storage-types): pin BlockNumberList worst-case sizes against MDB…
prestwich May 22, 2026
126b511
refactor(hot): rename legacy history traits in preparation for delami…
prestwich May 22, 2026
605b07a
feat(hot): introduce logical HistoryRead / HistoryWrite trait module
prestwich May 22, 2026
ffeb5d8
fixup(hot): panic on impossible-state in blocks_changed_* default impls
prestwich May 22, 2026
ced3691
feat(hot): implement HistoryWrite for MemKv
prestwich May 22, 2026
3309fab
feat(hot-mdbx): implement HistoryWrite using merge_and_split
prestwich May 22, 2026
6e40c76
refactor(hot): flip revm test setup to logical HistoryWrite
prestwich May 22, 2026
41de571
refactor(hot): move consistent history ops onto new HistoryWrite
prestwich May 22, 2026
874d57f
fix(storage): un-gate read-only UnifiedStorage methods from HistoryWrite
prestwich May 22, 2026
09ce43b
refactor(hot): move non-shard-aware history helpers onto new HistoryW…
prestwich May 22, 2026
339e876
test(hot): rewrite history conformance tests in logical terms
prestwich May 22, 2026
0541105
test(hot): rewrite range conformance tests in logical terms
prestwich May 22, 2026
4481f8a
test(hot): switch load_genesis integration test to logical history reads
prestwich May 22, 2026
7583c4e
refactor(hot): delete legacy history surface
prestwich May 22, 2026
c120b56
chore(storage-types): drop obsolete ShardedKey::SHARD_COUNT
prestwich May 22, 2026
f785023
test(hot-mdbx): structural assertion that MDBX splits oversized history
prestwich May 22, 2026
ec0cb27
chore(hot): final cleanup from delamination review
prestwich May 22, 2026
b22910e
fix(hot): address PR review comments
prestwich May 22, 2026
ae4fb55
doc(storage-types): tighten merge_and_split rustdoc
prestwich May 24, 2026
bebe04d
refactor(storage-types): rename merge_and_split -> overflowing_extend
prestwich May 24, 2026
09b42fe
fix(storage-types): document and enforce overflowing_extend size prec…
prestwich May 27, 2026
322916c
fix(hot): address second-round PR review
prestwich May 27, 2026
3e62ade
test(storage-types): add proptests for overflowing_extend
prestwich May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup(hot): panic on impossible-state in blocks_changed_* default impls
Replace .ok() with .expect("history blocks strictly increasing") on the
two BlockNumberList::append calls inside blocks_changed_account and
blocks_changed_storage. The error case is only reachable on DB
corruption; silently suppressing it would convert corruption into
data loss in the read path. Loud panic is correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • Loading branch information
prestwich and claude committed May 27, 2026
commit ffeb5d8db3d29bcba1a081f6d70fef8ccc742bf6
18 changes: 2 additions & 16 deletions crates/hot/src/db/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,7 @@ pub trait HistoryRead: HotDbRead {
let (_, mut merged) = first;
for entry in iter {
let (_, list) = entry?;
merged
.append(list.iter())
.map_err(|e| {
// Safety: we are iterating over history blocks which are
// supposed to be strictly increasing; if not, the DB is
// corrupt. We convert to the DB error type here.
// Note: Self::Error must come from some HotKvReadError impl
// but IntegerListError is not that type. We drop it since
// blocks_changed_account returns Self::Error, not
// HistoryError. The caller can use the HistoryWrite path for
// mutations. For reads, a corrupt DB is a storage error that
// this layer cannot express; we suppress it.
let _ = e;
})
.ok();
merged.append(list.iter()).expect("history blocks strictly increasing");
}
Ok(Some(merged))
}
Expand All @@ -77,7 +63,7 @@ pub trait HistoryRead: HotDbRead {
if next_addr != *addr || next_sk.key != *slot {
break;
}
merged.append(next_list.iter()).ok();
merged.append(next_list.iter()).expect("history blocks strictly increasing");
}
Ok(Some(merged))
}
Expand Down