-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: import_verifiable_stream
and write_verifiable_stream
in Store
#10
base: main
Are you sure you want to change the base?
Conversation
I still requested a review just to confirm: Is this a feature we want to support in |
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-blobs/pr/10/docs/iroh_blobs/ Last updated: 2024-12-12T15:51:27Z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it a bit weird that this is defined on MapEntry.
Wouldn't it be better to have this as a store fn that uses MapEntry? MapEntry really does everything it needs to do.
Also, it would be cool if we could make this more generic, otherwise we will have a dozen methods for special cases, like in this case streaming from offset..end of the file.
fn import_verifiable_stream<'a>( | ||
&'a self, | ||
hash: Hash, | ||
total_size: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the total_size come from? Is it a verified size?
Description
Store::import_verifiable_stream
MapEntry::write_verifiable_stream
These allow interacting with the
iroh_blobs
store using iroh's bao-style streams.I'm coming across this while extracting
iroh-willow
into its own thing. This means merging in all work that's not yet merged into iroh yet from thewillow
PR/branch in iroh. This is one of these things.IIUC, this allows us to stream the willow entry payloads directly from the WGPS protocol instead of having to simultaneously run iroh-blobs & iroh-willow.
Breaking Changes
Adding fn to traits should be non-breaking as long as they have default impls, right?
Notes & Open Questions
Unfortunately no tests with this yet, other than my pinky-promise that this code has worked so far for iroh-willow.
That said, I haven't tried bigger payloads yet.
I'll probably make use of this branch for the iroh-willow extraction and come back eventually to add proper tests.
Change checklist