-
Notifications
You must be signed in to change notification settings - Fork 0
Streaming range hash for large verified ranges (constant memory) #88
Copy link
Copy link
Closed
Labels
area:storageStorage adapter abstraction + filesystem adaptersStorage adapter abstraction + filesystem adaptersenhancementNew feature or requestNew feature or requestpriority:p2Do after evidence or dependency gates; optional portability capabilityDo after evidence or dependency gates; optional portability capabilityv0.2.NEXTCommitted for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5Committed for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5v0.2.xHotMem post-v0.2 follow-up workHotMem post-v0.2 follow-up work
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
area:storageStorage adapter abstraction + filesystem adaptersStorage adapter abstraction + filesystem adaptersenhancementNew feature or requestNew feature or requestpriority:p2Do after evidence or dependency gates; optional portability capabilityDo after evidence or dependency gates; optional portability capabilityv0.2.NEXTCommitted for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5Committed for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5v0.2.xHotMem post-v0.2 follow-up workHotMem post-v0.2 follow-up work
Summary
Add a streaming (chunked seek+read+hash) path for verifying/ranging large byte ranges, switching on range size.
Measured impact (spike #48, PR #84, B1)
The
py_streamingarm (1 MiB chunkedhashlibupdates, no whole-rangebytes) is the best checksum arm overall: 1.26x faster than the current path at 100 MB (673 ms median) with peak RSS 20 MB vs 219 MB — memory is flat in range size instead of ~1–2x the range.Proposal
In
provenance.verify_range/ the adapter layer, use a streaming hash above a size threshold instead of materializing the full range. Pure Python, zero new dependencies.Acceptance criteria
Context
Spike recommendation follow-up #2:
bench/native_spike/README.md. Related: #48, and the single-read ticket (follow-up #1).