Skip to content

Conversation

@NoahMaizels
Copy link
Collaborator

No description provided.

@NoahMaizels NoahMaizels requested a review from Cafe137 as a code owner May 8, 2025 10:42
@netlify
Copy link

netlify bot commented May 8, 2025

Deploy Preview for bee-js-docs-preview ready!

Name Link
🔨 Latest commit 5967ad2
🔍 Latest deploy log https://app.netlify.com/sites/bee-js-docs-preview/deploys/68237ede267d010008174ea9
😎 Deploy Preview https://deploy-preview-238--bee-js-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

However, there are several key differences:

- Unlike PSS, **GSOC only needs to mine the target chunk once**—multiple messages reuse it, making it **faster, cheaper**, and **more efficient** for recurring updates.
- Unlike PSS, **No encryption** is used by default, making it unsuitable for handling sensitive data.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add this, but better phrased:

  • Subsequent GSOC (SOC) updates are not meant to be retrieved. Double-signing an SOC is undefined behaviour.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, I am not quite sure how this should be phrased? I guess it is something like that the GSOC chunk is never really meant to be retrieved at all? It just serves as a channel for the service node to listen for messages over? In the docs I refer to them as GSOC "updates", but nothing is really being saved and updated is it? GSOC chunks just serve as a channel over which to receive ephemeral messages. Does that make sense?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good


## 🚧 Under Construction 🚧
:::caution 🚧 This page is under construction
Pinning allows you to guarantee that your uploaded content will always be available by storing it **locally on your own Bee node**. However, pinning **guarantee availability across the Swarm network**. Therefore you must use pinning along with the **stewardship utilities** included in `bee-js` to monitor the availability of your pinned content and reupload it if needed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pinning allows you to guarantee that your uploaded content will always be available by storing it locally on your own Bee node.

Not only your uploaded content, any content, not required to be uploaded by you.

However, pinning guarantee availability across the Swarm network.

Missing "DOES NOT"

Comment on lines 76 to 83
## Deleting a Tag After Use

Once you’re done tracking an upload, you can delete the tag to keep your node clean:

```js
await bee.deleteTag(tag.uid)
console.log("Deleted tag:", tag.uid)
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is DELETE tag supposed to be here?

import TabItem from '@theme/TabItem'

:::
Swarm provides the ability to store content in content-addressed [chunks](https://docs.ethswarm.org/docs/concepts/DISC/#content-addressed-chunks-and-single-owner-chunks) (CAC) whose addresses are derived from the chunk data, or Single Owner Chunks (SOC) whose addresses are derived from the uploader's own public key and chosen identifier. With single owner chunks, a user can assign arbitrary data to an address and attest chunk integrity with their digital signature.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Single Owner Chunks (SOC) whose addresses are derived from the uploader's own public key and chosen identifier

To be more precise, it is derived from uploader address and chosen identifier


:::warning SOCs are immutable!
You might be tempted to modify a SOC's content to "update" the chunk. Reuploading of SOC is forbidden in Swarm as it might create uncertain behavior. Bee node will reject the API call if it finds already existing SOC for the given address. Either use a different `identifier`, or you might be looking for Feeds as your use case.
You might be tempted to modify a SOC's content to "update" the chunk. Reuploading of an SOC is forbidden in Swarm as it might create uncertain behavior. A Bee node will reject the API call if it finds an already existing SOC for the given address. Either use a different `identifier`, or you might be looking for feeds if you need to perform multiple updates to the same content.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor notes:

Reuploading an SOC is not forbidden, maybe "not recommended" instead.

Use "undefined" instead of "uncertain", as "undefined behaviour" is a well-recognized term in programming.

Copy link
Collaborator

Choose a reason for hiding this comment

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

A Bee node will reject the API call if it finds an already existing SOC for the given address.

It does?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A Bee node will reject the API call if it finds an already existing SOC for the given address.

Actually I don't know about this part, this part was copied from the version of the warning from the original SOC section so I assumed it was correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this was the case, GSOC wouldn't work at all

}
```

### 2. Upload a File with the Tag
Copy link
Collaborator

Choose a reason for hiding this comment

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

ethersphere/bee#5096

FYI: Only deferred uploads work with tags

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yes, I should mention that. Actually isn't it more like they are only needed with deferred uploads? With a direct upload, it will not return a hash until the content has been successfully uploaded and synced, so there is no need to track it, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Correct


### 3. Track Tag Progress

Use `bee.retrieveTag(tagUid)` to check how many chunks have been split and how many are synced. Poll repeatedly until `synced === split` to know when the upload has fully propagated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Correctly: synced + seen === split

"Seen" are chunks which were synced previously and therefor won't be this time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh, so I suppose that means seen is only relevant for a re-upload?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or if there are common chunks which have appeared in previous files (such as zero byte paddings)

@NoahMaizels NoahMaizels merged commit 588a687 into master May 14, 2025
5 checks passed
@NoahMaizels NoahMaizels deleted the advanced branch May 14, 2025 14:38
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