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: revamp store & upload specs #114

Merged
merged 11 commits into from
Mar 22, 2024
Merged

feat: revamp store & upload specs #114

merged 11 commits into from
Mar 22, 2024

Conversation

Gozala
Copy link
Collaborator

@Gozala Gozala commented Mar 19, 2024

Updates store and upload specs so they are more like other specs as opposed to been more like documentation.

w3-store.md Outdated Show resolved Hide resolved
w3-store.md Outdated Show resolved Hide resolved
Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM (small nits inline)

w3-store.md Show resolved Hide resolved
w3-store.md Outdated Show resolved Hide resolved

#### Derivations
> ⚠️ Behavior of calling `upload/add` with a same `root` and different `shards` is not specified by the protocol. w3up reference implementation allows such invocations and updates `shards` to union of all shards across invocations.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe worth adding a note that there may exist limit of shards at implementation level?

w3-store.md Outdated Show resolved Hide resolved
w3-store.md Outdated Show resolved Hide resolved
Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

actually this is required to be added.

We used allocated for billing and it is important because it can either be:

  • size of the bytes of new upload in the space
  • size of the bytes of new upload already existing in other space (not uploaded, but should be accounted for space bill)
  • 0 if already stored in space

w3-store.md Outdated Show resolved Hide resolved
w3-store.md Outdated Show resolved Hide resolved
w3-store.md Outdated Show resolved Hide resolved
w3-store.md Show resolved Hide resolved
@Gozala Gozala merged commit e14b3c1 into main Mar 22, 2024
2 checks passed
@Gozala Gozala deleted the feat/store-api-revamp branch March 22, 2024 04:46
Gozala added a commit that referenced this pull request Mar 22, 2024
Based on #114. PR is written with UCAN 1.0 format and assuming
storacha/RFC#12 however in terms of
immediate implementation I suggest that we instead

1. Use `blob/add` instead of `/space/content/add/blob`
2. Use `web3.storage/blob/*` in place of `/service/blob/` 

I suggest above because I think it would make more sense to transition
to storacha/RFC#12 once we have UCAN@1.0
implemented, because I suspect links to tasks vs invocations are going
to be a pain to deal with otherwise. This will give us cleaner break.

In terms of implementing `/service/blob/accept` and specifically how
does client signal that they've completed upload I suggest that we do
whichever is easiest option from following two:

1. Make client sent second `blob/add` invocation after they've done
upload so we can perform a lookup.
2. Add another temp capability with empty output either very specific
like `blob/add/poll` or very general like `invocation/wake { task: CID }
`.

---------

Co-authored-by: Vasco Santos <santos.vasco10@gmail.com>
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