storacha-network / specs

🏅 Technical specifications for the w3up protocol stack
17 stars 0 forks source link

blob/allocate should not have optional `address` #120

Open Gozala opened 2 months ago

Gozala commented 2 months ago

Per https://github.com/web3-storage/w3up/pull/1342#discussion_r1562048241

Spec declares address field in the blob/allocate receipt as optional, but then in the http/put awaits on the address.url and address.headers which is means that task will fail when address is omitted, which consequently will fail blob/accept which depends on http/put.

We should either

  1. Update spec to make address required to prevent cascading failures when field is omitted.
  2. Describe execution flow for a case where address is not present.

In the implementation PR @vasco-santos made point that in the future allocation would imply finding candidate storage nodes and allocating space with them, which is probably not something we would want to do if content is already available (on some storage node), so perhaps extending execution flow to cover such scenario might be a good idea.

On the other hand we could just make field required and come back to the updated flow when are doing candidate storage node selections.

vasco-santos commented 2 months ago

Yeah, so I see value on

which is probably not something we would want to do if content is already available (on some storage node), so perhaps extending execution flow to cover such scenario might be a good idea.

but I do not mind making address required for now. Also, this is internal and not affecting client as far as I can tell, sxo we won't need to coordinate client updates