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

feat: blob capability implementation #1340

Closed
wants to merge 1 commit into from

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Mar 22, 2024

Just creating this PR so we could discuss implementation details for #1339

Comment on lines +29 to +40
Blob.allocate
.invoke({
issuer: id,
audience: id,
with: id.toDIDKey(),
nb: {
content,
size,
},
expiration: Infinity,
})
.delegate(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking this one could be actual invocation that we run from here, I do not believe we need to schedule it for later. In my mind it would basically do what we have here

https://github.com/web3-storage/w3up/blob/9aba8a155cca663387952fc9b11bc3748de8f2fc/packages/upload-api/src/store/add.js#L13-L74

Than we would do what you do here. Followed by logic that checks if we already have blob, if so we could also issue receipt for accept. If we do not have it yet then do exactly what you do 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.

I'm not sure if we have a good way to check if we already have a receipt for this task or not, but assuming we can do that I imagine we'd have a big if clause around all these so if we do have a receipt we just check if blob was received and if so issue receipt for the accept if we do not have receipt yet it's a first run so we do what was described prior

Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed this and also created #1342 with this branch with more iterations. I ported these comments over on #1342 (review)

@vasco-santos
Copy link
Contributor

Oh I just now noticed this. I also created PR #1342 with more iterations. Thanks for the feedback, I will port there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants