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
Summary
Postage batches have an optional
labelproperty 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 oflabelis 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-durationstatic_websites, a different one for mutabletesting, and so on.Motivation
There are cases when I want to re-label them, which is currently not possible:
mutable_testbut accidentally made it immutable), then I want to throw away themutable_testlabel and create a new postage batch with the correct parametersImplementation
This should be a fairly easy (🤞) implementation in Bee with a new endpoint:
PATCH /stamps/:batchIdaccepting a{"label":string}body (orPUT /stamps/:batchId/label).Drawbacks
AI Disclosure