feat(mantaray): add the depth-guarded reader - #369
Merged
Merged
Conversation
mfw78
force-pushed
the
s324/10-codec-nodeview
branch
from
July 19, 2026 03:37
8738e69 to
60f216e
Compare
mfw78
force-pushed
the
s324/10-codec-nodeview
branch
from
July 19, 2026 03:40
60f216e to
b6e2af5
Compare
mfw78
force-pushed
the
s324/10-codec-nodeview
branch
from
July 21, 2026 08:59
b6e2af5 to
3f9f6a8
Compare
Resolve paths against persisted tries one NodeView per hop: get reports misses as Ok(None), has_prefix answers edge boundaries from the parent fork record without fetching the boundary node, and every lookup spends a typed max_depth fetch budget. Differential tests pin both lookups to the legacy manifest answers across plain, encrypted and metadata-carrying tries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
Reader<S, BS>incrates/mantaray/src/reader.rs: an O(depth) NodeView-per-hop descent from a root address, with:get: returnsOk(None)on miss; fetches the terminal chunk only for VALUE forks.has_prefix: answers boundary checks from the parent fork record alone, without fetching the terminal chunk.max_depthfetch budget, withDEFAULT_MAX_DEPTH = 256.Adds a typed
ReaderError { Store, Corrupt, MaxDepth }inerror.rs.lib.rsre-exportsReader,DEFAULT_MAX_DEPTH,ReaderError.Why
Closes #343
Testing
Manifest::get/has_prefixand the deprecatedlookup, across six trie corpora (prefix splits, nested, one-byte chains, >30-byte edges) with miss/prefix/extension/empty probes.MaxDepthboundary tests.cargo fmt --all -- --check: clean.cargo clippy --workspace --all-targets --locked: no new warnings in the diff's crate.cargo nextest run -p nectar-mantaray --locked: 144/144 passed, 0 skipped.AI Assistance
Implementation by Fable, review by Opus, PR by Sonnet.