@@ -331,25 +331,19 @@ impl<N: Network, C: ConsensusStorage<N>> VM<N, C> {
331331 }
332332
333333 /// Evaluates a query function against finalize-store state at the given block `height`.
334- /// Returns the typed outputs (no `(height, outputs)` tuple — the caller already supplied
335- /// the height).
334+ /// Returns the typed outputs.
336335 ///
337- /// All mapping reads are pinned to `height` via the finalize store's per-key historical
338- /// update map (entries at any given height are immutable once written), so block production
339- /// advancing past `height` mid-evaluation cannot disturb the result. The
340- /// `FinalizeGlobalState` is also reconstructed from the block at `height`, so query operands
341- /// reading block metadata see that block's values.
336+ /// Mapping reads are pinned to `height` via the per-key historical update map, and the
337+ /// `FinalizeGlobalState` is reconstructed from the block at `height`. Available only with
338+ /// `--features history`.
342339 ///
343- /// snarkOS calls this with `current_block_height()` for "latest" semantics, or any earlier
344- /// height for historic queries. Available only when snarkVM is built with `--features history`
345- /// — the per-height update map that pins reads is only populated under that feature.
340+ /// snarkOS calls this with `current_block_height()` for "latest", or any earlier height
341+ /// for historic queries. `height` must satisfy `height <= current_block_height()`.
346342 ///
347- /// `height` must satisfy `height <= current_block_height()`. Reading a future height
348- /// returns "no block exists" rather than a misleading None.
349- ///
350- /// Concurrency: this call does NOT take `self.process.lock()` (which would serialize
351- /// queries against block production); it relies on `Arc<Stack<N>>` immutability and on the
352- /// fact that historic-table entries are immutable.
343+ /// Caveat: the `Stack` itself uses interior mutability, so a concurrent redeploy of the
344+ /// same program could perturb its structural caches mid-query. Mapping values are
345+ /// snapshot-consistent at `height`; program structure is not. Known gap; a future
346+ /// `StackSnapshot`-style fix would close it.
353347 #[ cfg( feature = "history" ) ]
354348 #[ inline]
355349 pub fn evaluate_query_at_height (
0 commit comments