Skip to content
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

fix(iroh): improve and test blob share #1979

Merged
merged 3 commits into from
Feb 2, 2024
Merged

fix(iroh): improve and test blob share #1979

merged 3 commits into from
Feb 2, 2024

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Jan 25, 2024

  • adds iroh.blobs.share
  • adds iroh.blobs.status

Closes #1978

Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation seems fine, but I would prefer enums.

&self,
hash: Hash,
blob_format: BlobFormat,
no_derp: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have an enum here? This is just what it puts into the ticket, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


/// Status information about a blob.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct BlobStatus {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would also prefer an enum here. E.g. "partial" is a pretty wide range from 1/1TiB to 999GiB/1TiB. We might want to add some more info here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but that information is not known, the store doesn't expose this easily

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know. And it is not free to compute. What I'm saying is that with an enum it is easier to evolve it as more information becomes available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@dignifiedquire dignifiedquire added this pull request to the merge queue Feb 2, 2024
Merged via the queue into main with commit 5db247f Feb 2, 2024
18 checks passed
fubuloubu pushed a commit to ApeWorX/iroh that referenced this pull request Feb 21, 2024
- adds `iroh.blobs.share`
- adds `iroh.blobs.status`
 
Closes n0-computer#1978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

iroh blob share is broken
2 participants