Use exact capacities for SingleSliceStorage #13

Open
opened 2026-03-21 22:47:28 +01:00 by AljoschaMeyer · 0 comments

SingeSliceStorage currently uses a function that does a conservative approximation of how much capacity it needs. It would be more efficient to compute the exact length in bytes of the baseline verifiable slice stream for a given slice in strings of a given length. The old approximate function can "simply" be updated to do the precise computation, and then renamed to length_of_verifiable_stream (and the "at least" in the doc comment should change to "exactly" or something like that).

SingeSliceStorage currently uses a function that does a conservative [approximation](https://codeberg.org/worm-blossom/bab_rs/src/commit/5b728f7a6179c0e83ee2cbe59ba5ec9a14d8cd9b/src/generic/storage/storage_backend.rs#L728) of how much capacity it needs. It would be more efficient to compute the *exact* length in bytes of the [baseline verifiable slice stream](https://worm-blossom.github.io/bab/#baseline_slice) for a given slice in strings of a given length. The old approximate function can "simply" be updated to do the precise computation, and then renamed to `length_of_verifiable_stream` (and the "at least" in the doc comment should change to "exactly" or something like that).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
worm-blossom/bab_rs#13
No description provided.