Skip to content

add space to blob/remove and define blob/unallocate capability#46

Merged
frrist merged 3 commits into
mainfrom
frrist/blob-remove-space
Jul 17, 2026
Merged

add space to blob/remove and define blob/unallocate capability#46
frrist merged 3 commits into
mainfrom
frrist/blob-remove-space

Conversation

@frrist

@frrist frrist commented Jul 15, 2026

Copy link
Copy Markdown
Member
  • blob/remove modified to include the space a blob is being removed from
  • blob/unallocate capability implemented permitting an allocated but unaccepted blob to be removed.

frrist and others added 2 commits July 14, 2026 17:58
…ities

/blob/remove now carries the space explicitly, matching the
Allocate/Accept convention: storage nodes key allocations and
acceptances by (digest, space), and removal releases ONE space's claim —
physical deletion happens only when no space claims the digest at all.

Also documents who serves /blob/remove and /upload/remove, their
subject conventions, and idempotency (previously the bindings carried
no semantics at all).

Groundwork for the delete-finality chain: piri's /blob/remove handler
(FIL-623/FIL-624), sprue's remove handlers (FIL-522), and ingot's
client wiring (FIL-588).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
An upload now ends in exactly one of /blob/accept (commit) or
/blob/unallocate (drop). Unallocate retires a parked blob — allocated and
uploaded but never accepted — releasing the allocation and deleting the
bytes. UnallocateArguments carries an optional Cause (the /space/blob/add
task link) so the upload service can recover which storage node holds a
parked blob, which has no registration or acceptance to look up by; storage
nodes ignore it. Idempotent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frrist frrist self-assigned this Jul 15, 2026
@alanshaw

alanshaw commented Jul 15, 2026

Copy link
Copy Markdown
Member

We had a conversation about this unallocating a blob:

We talked earlier in the week about how allocate is allocating space on a node, not allocating space in a space...so to cancel by issuing /blob/unallocate doesn't feel right since the blob may be stored by multiple users in multiple spaces.

So I think a /blob/abort (ingot -> sprue) sounds ok, we need to pass on that information to piri though, so I was thinking "don't accept" since that is that next invocation that would typically be sent, and hence "reject" (i.e. we call this /blob/reject instead of unallocate).

Could alternatively be "decline" or "refuse" or something else, don't really mind, just not "unallocate" - sorry!

@pyropy pyropy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Implementation looks good to me, but I'm going to wait for us to agree on the command name before giving it my approval.

Per PR #46 review (alanshaw): 'allocate' allocates space on a node, not in
a space, and a blob may be held by multiple spaces — 'unallocate' is the
wrong verb for a per-space cancellation. The single capability becomes two,
one per hop:

- /blob/abort — the client-facing verb, served by the upload service
  (subject = space). AbortArguments{Space, Digest, Cause}; Cause (the
  /space/blob/add task link) is now REQUIRED — it is how the service
  recovers which storage node holds a parked blob, which has no
  registration or acceptance to look up by.
- /blob/reject — the 'don't accept' inverse of /blob/accept, served by
  storage nodes (subject = provider), typically translating an abort.
  RejectArguments{Space, Digest}. Drops the space's allocation; bytes are
  deleted once no space holds one; accepted blobs are refused (use
  /blob/remove).

A blob's lifecycle on a node ends in exactly one of /blob/accept or
/blob/reject. cbor/dagjson marshalers regenerated; round-trip tests for
both argument types.
@frrist

frrist commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Yea okay good call, agreed. I went with your abort/reject split

  • /blob/abort: client → upload service (subject = the space). Carries Cause (the /space/blob/add task link), which is now required rather than optional since it's how the service recovers which node holds a parked blob, since nothing is registered or accepted yet to look it up by.
  • /blob/reject: upload service → storage node (subject = the provider), the "don't accept". The node drops the space's allocation and deletes the bytes once no space holds one; anything already accepted is refused and goes through /blob/remove as before.

So a parked blob (allocated + PUT, sitting on the node outside the PDP pipeline) now has exactly two exits, and they're mutually exclusive.

  • /blob/accept commits it, enqueues aggregation, mints the location claim, makes it discoverable, after which the only way out is /blob/remove's claim-release path.
  • /blob/reject unwinds it as if the upload never happened.

@pyropy this should unblock your review (and provide some context)

@frrist
frrist merged commit aac837a into main Jul 17, 2026
7 checks passed
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.

3 participants