Independent storage experiment review β 2026-10-15
The cache and Bloom experiments merit further work as explicit optional candidates; detached bodies merit a separate storage architecture prototype. None of these results supports adopting a default. Source inspection found no introduced consensus, proof-authentication, undo or sync-path defect in the reviewed changes. The principal remaining work is validation on the current integrated source and workloads that establish whether the cache has useful reuse under root churn. The enabled-mode Bloom coverage gap was closed by the independently inspected follow-up below.
This review was written in a new isolated monorepo worktree based on e28844da; only this document was added. Candidate checkouts were read-only. No build, benchmark, node or database operation was run in this review. Initial cache/Bloom inspection occurred during the body-locator measurement window; body-locator inspection started after the coordinator reported all twelve trials complete. Existing retained JSON/stdout and binary files were read to check counts, comparisons and SHA-256 provenance; passing test logs below are prior candidate evidence, not tests independently rerun by this reviewer.
Exact candidates and provenance
| Experiment | Reviewed commits | Implementation base | Retained measured executable SHA-256 |
|---|---|---|---|
| Authenticated proof cache | b8f91347144c6bf9f9c42fecfaf4a87d8b52f1ad, 4ada43b8fb40ec66021a3e4de92d0d7fdb460449, a3e03c32c84a162393aadf4095f039681a945dad |
691ee3b5c80cbf5730720868ccb305d8a097925b |
4eaea89f62802b1bdbc1a62349bd06a5675da57f95dc62c22cf6c7d7169356df |
| Bloom/batching | 0e951093976facfef18dd6a83cdc407cd8b01535, c8234f847724b52c0e47cba233c55804e5ef847a |
d4119718505d0bfbd358c97ac9bfb81aeb48b2da |
b0961e947a0211855b0a758e2feb57510b14156d320523e1e19e6160d2fb6ec5 |
Sources are /private/tmp/lotus-v2-utxo-auth-cache-20261015 and /private/tmp/lotus-v2-storage-options-experiment-20261015. Each current retained executable hashes to its recorded value. Measured source commits precede their evidence-only commits. The source statuses record untracked build directories; no tracked source edits are reported. Bloom provenance additionally records source tree 8384b2e5c079cb734ec0a75814016598b8e7b8fd, LevelDB tree 3923480250b2fb3f222ffb6d1659c746f2535ee7 and CRC32C tree db50bd3efd64d49689bcb627cead5276726e6016. Source/binary equivalence was not independently rebuilt in this review.
These are different bases and have not been validated in combination. In particular, the cache's earlier base cannot inherit the later integrated native or Bloom validation claims.
Findings and required follow-up
- Original medium validation gap, now closed on the experimental base: full disk-state tests did not enable Bloom. In the Bloom candidate,
test_disk_state.cpp::Options(lines 51β55) leavesbloom_bits_per_keyat zero.existing_disk_state_testtherefore supplies baseline regression evidence only.experiment.cppchecks roots, four sampled proofs/coins, replacement/disconnect, reopen, raw-row equality and WAL faults with Bloom, but does not run the existing corruption, sibling-kind, undo-corruption, alternate-reorg, resource and callback suites under Bloom. Before integration, parameterize the full suite over 0/10 bits and retain both results. Add actual SST filter/meta-block corruption and missing-filter coverage, including reopen and lookup, rather than inferring filter correctness solely from WAL injection.
- Medium applicability gap: the cache measures unchanged-root reuse, not mutation performance. Every successful insert/erase changes the cache context; uniform phases have zero hits and capture/eviction overhead.
measurement.cpp::Readschecks fixture presence/value and aggregates sibling counts/values. Its runner compares root, phase, observation aggregate and Gets between variants; it does not compare every measured proof bitmap, sibling hash and encoded coin byte. Exact proof equality is covered separately bymanifest_test.cppand the disk-state oracle suite. Keep that distinction in claims. A future workload should record exact sampled results alongside realistic node query reuse, root churn, absent lookups, large coins and transactions. No mutation or node throughput benefit is established.
- Medium integration gap: no current-source or combined validation exists. Apply any future candidate to a new exact integrated source revision, rerun the required suites there, and test cache/Bloom combinations independently. Indexed candidates, journal recovery, finalization and complete node reorg coordination are outside these generic-store measurements. Keep defaults at zero meanwhile.
- Low evidence limit: allocation and durability claims must remain precise. Cache accounting is not RSS or a strict allocator-byte ceiling. Store and transaction have separate budgets; map/list/vector overhead and temporary proof construction are additional. Bloom's fault harness simulates WAL append/sync errors, not process termination or power loss. Broader resource and crash-recovery claims need their own tests. Existing documentation generally states these limits correctly.
Authenticated cache correctness assessment
disk_state.cpp::Prove (candidate lines 965β1020) keys entries by query coin key and binds them to the complete root Summary, including digest and kind/cardinality classification. A hit rereads every original proof-path node and terminal coin-table row through the original callback and compares exact optional bytes. Changed or missing rows evict the entry and execute BuildProof, including node parsing, coin/tree agreement and proof verification. There is no newly supplied digest treated as proof of authentication.
AuthReadCoin still independently reads the queried coin row and checks membership and exact encoded coin equality. This matters for absent queries: a cached absence cannot hide an orphan coin row. Usability checks precede cache access, including empty-root proofs whose read manifest is empty. Store and transaction caches are separate; transaction reads include its overlay. Root changes invalidate context on the next proof operation, so retained stale entries cannot serve a changed root. Returning to the same root through a disconnect remains safe because manifest rows are reread. Abort destroys the transaction implementation and cache; reopen creates a fresh process-local view. Successful commit retains the finished transaction object until released, but its usability guard prevents further proof service.
The cache changes no on-disk encoding, commit batch, undo encoding or write synchronization. Existing poisoned-store checks still reject after an ambiguous WAL failure. The new warm-cache regressions explicitly check that a warmed empty proof cannot bypass poisoning. The LRU's 128-entry cap and accounted budget bound retained entries; oversized captures bypass retention. Allocation failure handling does not publish an unverified proof. This assessment assumes the backend's existing single-writer/view-lifetime contract; it does not establish concurrent thread safety.
Retained CTest evidence has two passing entries: cache_manifest_test and disk_state_test. The latter executes its full function suite once with budget zero and once at 1 MiB. Manifest tests independently cover exact proof fields/coin bytes, changed and missing warm node/coin rows, unchanged output on corruption, warm absence/orphan detection, context/cardinality change, tiny budgets and eviction. This is meaningful cache-specific evidence, with no C++ assertion count inferred from the two CTest entries.
The retained measurement has 12 successful invocations, 84 JSON records (12 seed records plus 72 phases), and 72,000 queries. This review recomputed equal paired roots and per-phase observation/Get tuples for all six disabled/enabled pairs. Maximum retained accounting is 565,772 bytes. Uniform phases have no hits; warm repeated phases have 1,000 hits. The first repeated phase at 1k has 941 hits/59 misses because preceding uniform work already warmed five identities; this is consistent with source order rather than evidence of a cold-cache result.
The published warm CPU reductions support investigating repeated parsing/hashing cost at an unchanged root. The reported uniform-proof CPU increases and unchanged logical Gets also matter. Heavy QEMU/Dart contention, small cardinalities and three trials limit latency inference. Reopen occurs in the same process with uncontrolled OS caches. The results do not establish physical I/O savings, memory savings, seed/mutation speed or node TPS.
Bloom, batching and durability assessment
The implementation adds an owned LevelDB filter policy, validates 0β30 bits/key before opening a home, and leaves zero as default. Member destruction order destroys the DB before its filter/cache. Filter choice is absent from schema/profile bytes. dboptions.paranoid_checks remains true, and normal reads retain checksum verification. Bundled table.cc::ReadMeta/ReadFilter verifies filter metadata/block checksums under paranoid checks and falls back to unfiltered reads if loading the optional filter fails. This source path is sound, while the missing candidate-specific corruption coverage above remains material.
No batching or sync policy is changed in the backend. Batches of 100/1,000 are fixture commit boundaries, so their different undo histories are expected. The experiment compares every raw key/value row across Bloom settings at equal batch size and excludes only undo rows when comparing live state across batching. It independently constructs the final oracle root, checks four proof/coin samples per measured invocation, disconnects replacement, compares metadata on reopen and compares raw snapshots after reopening. Opposite-option reopen currently checks the root; stronger bidirectional post-reopen proof reads should accompany the full Bloom suite.
The separate fault cases cover both Bloom settings, append/sync failures, database-error classification, poisoning, complete old-or-new root/metadata recovery and disconnect of a recovered new checkpoint. Initial harness lock-lifetime failure and successful retry logs are retained. These are honest operational error tests, not power-loss simulation.
The 12 measured records all have return code zero, one shared live-row digest, and one raw-row digest per batch size across Bloom settings/trials. This review independently checked those counts/digests and the recorded binary hash. Logical Gets are exactly 262,924 at batch 100 and 165,081 at batch 1,000 for both Bloom settings. Recomputed median Env read-call counts are 154,328 β 81,614 and 76,725 β 36,670. Median append bytes increase by 586,468 and 273,423, respectively, matching the published filter-write regression. The raw reports support these statements.
Those read counts are Env API calls, including background engine activity and mmap spans; they are not SSD reads. Close joins engine background work before cumulative append counters are sampled. Larger batches change memory use and durable/undo boundaries, so their savings cannot authorize a change to live block publication. Three contended trials with uncontrolled OS caches support an optional Bloom investigation and a batching tradeoff study, with no default or whole-node performance conclusion.
Recommendation
Continue Bloom as the simpler optional operational feature. The follow-up closes enabled-mode corruption/reorg coverage on its experimental base; validate separately on the exact integrated pin before considering adoption. Continue authenticated proof reuse only alongside measured real reuse/root-churn rates and explicit total memory accounting. Preserve all original candidates and their evidence; do not merge one by treating its benchmark as consensus or deployment approval. Further work should have separate correctness gates and a later coordinated measurement window.
Detached body and frame locator extension
Reviewed read-only candidate /private/tmp/lotus-v2-body-locator-experiment-20261015, implementation 39dc3691419856dab845aded8a5c3943136acbef on d411971850, and evidence 11dd2adc2b67e51b79005f6b128037d4dc56121c. The retained binary hashes to recorded SHA-256 531d0baf9aa938a2f17e45666d4d77a0056d8c54c4eef0ecef2ba78d78779125; the retained fixture file also matches its recorded SHA-256. No focused execution was needed to resolve the source findings below, and no new build or timing was performed.
Findings
- Resolved provenance ambiguity: the original result README said exact tip and historical roots were recorded in provenance without identifying when they were added. The captured
workloadlacks these fields; evidence commit11dd2adc2bseparately addssource_derived_workload_annotation. The current runner's expanded workload fields were not emitted by the timed executable. Follow-updfca25c76de991ad847dee2c6ea8f60c1a8c74b0now explicitly labels the values retrospective and supplies pinned source commit/path/hash and derivation method. Review confirmed trials and summary blobs are unchanged and the annotation agrees with the matched fixture: V(2) is height 3, ID59572fa921a7157edc12d88bb3845bb351d5985656d658b3c5319378fbddde6f, root33dee9ed5f17cd7e785d9b977a75b61e26ee48cea3f77da3b4fb71b22cacfd5c; V(3) is height 4, ID7fb8139809ad5379efe2c6115b85b858d057cb1c95ae03b683847b2963c1db58, root1f4f143925cffbe1953a9757ea70b152cc1b4db8d804909281f507188fa5281d, with four fixture coins. This is source reconstruction, not contemporaneous timing output.
- High adoption blocker, explicitly acknowledged by the candidate: no atomic state/body publication, durable locator database, crash recovery, reader leases, prune coordination or migration is implemented. Export duplicates bytes already retained in undo. File/parent
fsyncdoes not establish the LevelDB backend's macOS F_FULLFSYNC durability contract. Success/failure at each publication boundary, orphan/truncated extents, ambiguous synchronization, journal resume and concurrent pruning remain untested and unimplemented integration dependencies. This is an architecture prototype, not a replacement for retained bodies.
- Medium interpretation limit: the read paths provide different audit guarantees. Baseline
ReadRetainedBlockBodychecks current retained undo/context binding on each read; detached reads rely on a previously authenticated connected identity and reauthenticate only returned body/frame commitments. The reduced work is intentional. Do not present the read comparison as equivalent validation cost or equal corruption-audit coverage. A raw request authenticates selected bytes and membership, without proving the whole file remains a valid block or that its offset is the original sequential frame position. These limits do not permit transaction substitution because both requested identities and membership are checked.
- Medium scaling/resource gap: the accepted timing fixture is only 351 bytes and two transactions; its selected spend is 108 bytes. Full per-transaction proofs use O(n log n) retained metadata. Derivation decodes/reencodes the whole body and builds all proofs; supplied byte caps bound response allocation, not total decoded-object/proof memory, CPU, retention or concurrent readers. Larger framing controls are not accepted block fixtures and supply no large-block throughput evidence. Future API/storage design needs explicit quotas for those dimensions.
Authentication and lifecycle assessment
Export calls the original retained-body validation boundary before deriving locators, creates an exclusive non-followed file, and syncs file and parent. It does not change state or publish availability. Failures can leave an orphan and preserve caller output. This is appropriate for a detached export with its documented cleanup contract.
ReadRaw opens a regular file with O_NOFOLLOW, checks file size against the anchored header, block ID/ChainID, target/PoW and genesis identity, then verifies requested TxId/TxHash and a count-bound TransactionRoot inclusion proof. The proof implementation follows the existing uneven largest-power split and leaf/internal/count domains. It caps proof depth at 32, checks index/count and validates canonical prefix width and exact length, offset/size arithmetic, response cap, parsed frame and recomputed identities. No caller offset or sibling is trusted. Authentication remains sound if unrelated bytes are corrupt or if a valid frame also appears at another location: the response is still exactly the requested committed transaction. Active membership and the anchor's prior contextual validity must come from the chain owner.
ReadBody rereads and fully decodes the file, checks all transaction framing and the complete TxRoot, and binds the decoded header to the requested ID again after the initial positioned header check. That second ID check handles concurrent header replacement between reads. Neither read path repeats historical VM/state transitions. Historical reads after disconnect are intentionally allowed; missing/pruned files report unavailable. This is availability behavior, not a prune/reorg coordinator.
Source correctness controls compare exact body/raw coinbase/spend bytes, exercise offset/length/index/count/identity/proof mutations and header/prefix/frame corruption, capacity, truncation, trailing bytes, missing file, overwrite refusal, reopen and historical disconnect. Additional counts 1/3/5/17/1,000 check every transaction and three-byte frame prefixes. DecodeBlockWire rejects an empty transaction list before locator proof derivation, so the recursive proof builder's nonempty precondition is met. The larger generated controls establish framing/cryptographic behavior only; they are not claimed as accepted contextual blocks. No crash, failed-write/fsync, prune-reader race or real restart recovery gate is supplied.
Retained costs and recommendation
Independent inspection confirms 12 successful records, three per mode, each with 1,000 repeated reads. Body reply totals are 351,000 bytes; raw replies total 108,000 bytes. Median foreground C++ allocation traffic matches the result table: baseline body 273,002 calls/74,483,016 requested bytes; detached body 87,000/9,223,000; baseline raw 369,002/84,598,016; positioned raw 41,000/4,227,000. These are cumulative foreground operator-new requests, not live memory or total engine allocation.
The full detached path reports 2,000 positioned calls/485,000 bytes and raw reports 3,000/243,000 bytes. Those counts match 134-byte header plus full 351-byte body, or header plus one-byte prefix plus 108-byte frame, respectively. Baseline positioned counters are uninstrumented zeros. Process CPU includes background work; lifetime RSS includes setup; OS caching and substantial host contention prevent physical-I/O or general latency claims. The benchmark raw check compares reply length each iteration, while separate correctness controls establish exact byte parity. Recorded elapsed improvements support the hypothesis that removing repeated undo auditing and full-body redecoding can reduce read work for this fixture.
Proceed only with a separate immutable-body schema/API design and explicit atomic publication/recovery/pruning invariants. A same-LevelDB-batch checked body record is a reasonable design to evaluate before append-only files; it must still specify authenticated summaries, profile/version binding, availability and active status, journal pins, retention quotas, disconnect semantics and migration/rollback. File-based publication additionally needs durable-before-index ordering and orphan recovery. Keep this detached experiment outside defaults until those dependencies and accepted larger-fixture checks exist.
Independent review of the Bloom validation follow-up
Reviewed source d262441f064e737fbf5242acb9e8a29a440a8ef6 and retained evidence 784d340783cef9ec5f4f10ba03a7181b10fc2100 in the separate read-only sibling /private/tmp/lotus-v2-storage-options-validation-20261015, based on c8234f847724b52c0e47cba233c55804e5ef847a. This closes the earlier missing full-suite and physical-filter corruption coverage on that same experimental base. It does not establish integrated-node, cache combination or default-adoption validation.
Inspection confirms test_disk_state.cpp::Options applies the selected zero/ten-bit value for every existing fixture; all test functions still run, and assertion bodies are unchanged. CMake separately registers the complete suite under each setting. The final verbose log identifies both actual argv values and records both complete suite passes, including differential roots/proofs, atomicity, reopen, undo, alternate reorg, resources, WAL failures and corruption/callback cases. This is stronger than running baseline-only tests beside a Bloom microfixture.
The new physical-SST harness operates on actual compacted files from the pinned bundled engine. It verifies footer/block handles, filter registration and nonempty checksum-valid content before mutation. Its hostile-filter control zeros real Bloom bit vectors while preserving nonzero probe counts; the direct FilterBlockReader assertion proves the result would hide the known present coin if used. The filter-CRC case leaves that hostile payload with an invalid checksum; the meta-CRC case gives the hostile filter a valid checksum but invalidates optional metadata; the missing-registration case gives both blocks valid checksums and renames the policy registration. Thus successful authenticated reads demonstrate fallback/ignoring the filter rather than relying on mutations that happen not to affect a queried key. A physically filterless compacted home also reopens with both settings.
Each nonfatal copied-home case runs ten/zero/ten-bit opens and compares every positive/negative query with independent oracle results: presence, exact bitmap and sibling hashes, terminal coin bytes, root verification and encoded queried coin bytes. Four modes Γthree opens plus two physically filterless opens yield 14 opens and 8,064 successful proof/coin query pairs (512 present plus 64 absent per open). A separate real data-block CRC mutation must still reject with corruption and preserve sentinel output. The final log confirms that this last store lazily reopened successfully and then rejected the lookup; optional filter fallback did not disable data checksum enforcement.
The authoritative retained ctest-final.log reports 3/3 passed and no unexpected failures. This reviewer inspected the tests/assertions and logs and independently recomputed all five recorded source-file hashes, both executable hashes and both engine-tree pins. All match the manifest. Verified test binary SHA-256 values are 21ee3e2c32b186bf076c41f6e4d94888406b73beca3ad293d3e23a3b24fc6eb6 (full disk suite) and b2795a0c37c04e4a64463cf45ce031b4732b5ccad1577093f74f53143fdbee50 (SST fixture). Source tree is 90041c63a33af9be6c71b05556de2dd35b1cedcf.
Git diff inspection confirms no disk-state implementation/header changes and no changes to the original coordinated timing evidence. No independent execution, rebuild or performance rerun was necessary for this follow-up review. The retained Release correctness run uses strict warnings, at most two compilation jobs and serial CTest. Existing timing figures remain historical and separate. No blocker remains for the requested experimental Bloom coverage gap; the current-pin, full-node, combined-cache and deployment gates remain open.