Skip to content

Allow renaming (relabelling) postage batches #5459

@slapec93

Description

@slapec93

Summary

Postage batches have an optional label property which can be set at the time of purchase, but it is not on-chain, only saved locally in Bee's database as metadata. The only purpose of label is to attach a tag to the postage batch so that users remember what they purchased them for. For example, I have a postage batch specifically for long-duration static_websites, a different one for mutable testing, and so on.

Motivation

There are cases when I want to re-label them, which is currently not possible:

  • I forgot to set a label in the first place
  • I no longer use it for its original purpose / want to use for a different reason, and I want to update the label to reflect this
  • I set the label correctly but purchased with the wrong parameters (e.g. I wanted mutable_test but accidentally made it immutable), then I want to throw away the mutable_test label and create a new postage batch with the correct parameters
  • When the Bee node database is corrupted / nuked, and postage batches are re-synced, they all reset to the "recovered" label

Implementation

This should be a fairly easy (🤞) implementation in Bee with a new endpoint: PATCH /stamps/:batchId accepting a {"label":string} body (or PUT /stamps/:batchId/label).

Drawbacks

AI Disclosure

  • This issue contains suggestions and text generated by an LLM.
  • I have reviewed the AI generated content thoroughly.
  • I possess the technical expertise to responsibly review the AI generated content mentioned in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions