Comprehensive validation suite designed to confirm the flat state is
working before running benchmarks.
TestBintrieFlatStateConsistencyOracle (core/state):
The "if this passes, we're good to benchmark" test. Builds realistic
state over 15 blocks (48 accounts, 14 storage slots), explicitly
flushes to disk at block 5, and verifies structural invariants of
every flat-state read at every block commit. Covers:
- Diff-layer chaining across 15 blocks
- Disk-layer reads after explicit flush (A1 smoking gun)
- Account creation, balance/nonce modification, code deployment
- Storage write, update, and tombstone (zero-value clear)
- Post-flush state evolution with fresh diff layers on top of disk
Stem blob edge cases (triedb/pathdb):
TestStemBlobOffset127_128Boundary — validates the bitmap byte
boundary between the last header storage offset (127) and the first
code chunk offset (128). A bitmapRank off-by-one here would cause
extractStemOffset to return the adjacent offset's value.
TestStemBlobFull256DeleteMiddle — fully populates all 256 offsets,
deletes one from the middle (offset 128), verifies all 255 remaining
values survive at the correct positions.
TestFlushIdempotency — verifies that flushing the same data twice
produces a byte-identical on-disk blob. The RMW in applyWrites must
be idempotent to handle overlapping diff-layer merges.