Skip to content

Commit 0b19434

Browse files
committed
addressing feedback
1 parent 1f4a39b commit 0b19434

File tree

5 files changed

+30
-25
lines changed

5 files changed

+30
-25
lines changed

docs/documentation/gsoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ However, there are several key differences:
2020

2121
- 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.
2222
- Unlike PSS, **No encryption** is used by default, making it unsuitable for handling sensitive data.
23-
23+
- Unlike PSS, **GSOC chunks are not meant to be retrieved directly**. The SOC used to initiate a GSOC connection is used to listen for incoming messages only, the chunk itself is not meant to be retrieved since the incoming messages are not actually used to update the SOC since double-signing an SOC is undefined behavior.
2424

2525
## Requirements
2626

docs/documentation/pinning.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ slug: /pinning
55
sidebar_label: Pinning
66
---
77

8-
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.
8+
Pinning allows you to guarantee that content will always be available by storing it **locally on your own Bee node**.
9+
10+
However, pinning ***does not*** 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.
911

1012
In this section, you'll learn how to:
1113

@@ -15,8 +17,6 @@ In this section, you'll learn how to:
1517
- View all currently pinned references
1618
- Remove pins that are no longer required
1719

18-
19-
2020
## Pinning and Unpinning Content
2121

2222
To pin a reference (so it remains stored on your node):
@@ -33,7 +33,6 @@ await bee.unpin(reference)
3333
console.log('Reference unpinned and no longer tracked.')
3434
```
3535

36-
3736
## Checking if a Reference is Retrievable
3837

3938
Use `isReferenceRetrievable(reference)` to verify if the content for a given Swarm reference is currently accessible on the network:
@@ -73,16 +72,6 @@ const pinStatus = await bee.getPin(reference)
7372
console.log('Pin info:', pinStatus)
7473
```
7574

76-
## Deleting a Tag After Use
77-
78-
Once you’re done tracking an upload, you can delete the tag to keep your node clean:
79-
80-
```js
81-
await bee.deleteTag(tag.uid)
82-
console.log("Deleted tag:", tag.uid)
83-
```
84-
85-
8675
## Example Script
8776

8877
The following script automates the process of checking all locally pinned references, verifying their retrievability from the network, and reuploading any that are missing. This ensures that your pinned data remains available even if it has dropped out of the Swarm network.

docs/documentation/soc-and-feeds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar_label: SOC and Feeds
99
import Tabs from '@theme/Tabs'
1010
import TabItem from '@theme/TabItem'
1111

12-
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.
12+
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 address and chosen identifier. With single owner chunks, a user can assign arbitrary data to an address and attest chunk integrity with their digital signature.
1313

1414
Feeds are a unique feature of Swarm which simulate the publishing of mutable content on Swarm's immutable storage. ***Feeds constitute the primary use case for SOCs.*** Developers can use Feeds to version revisions of a mutable resource by indexing sequential updates to a topic at predictably calculated addresses. Because Feeds are built on top of SOCs, their interfaces are somewhat similar and use common concepts.
1515

@@ -31,7 +31,7 @@ SOCs are powerful and flexible low-level feature which provide the foundation up
3131
:::
3232

3333
:::warning SOCs are immutable!
34-
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.
34+
You might be tempted to modify a SOC's content to "update" the chunk. Reuploading of an SOC is discouraged as its behavior is undefined. Either use a different `identifier`, or you might be looking for feeds if you need to perform multiple updates to the same content.
3535
:::
3636

3737
### Uploading SOCs

docs/documentation/tracking-uploads.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ slug: /tracking-uploads
55
sidebar_label: Tracking Uploads
66
---
77

8-
You can track the progress of your uploads using "tags". Each tag tracks how many chunks were **split**, **stored**, **seen**, and **synced** by the network. By creating a tag before uploading and passing it to the upload function, you make the upload *trackable, allowing you to confirm whether your uploaded data has been fully synced.
8+
You can track the progress of deferred uploads using "tags". Each tag tracks how many chunks were **split**, **stored**, **seen**, and **synced** by the network. By creating a tag before uploading and passing it to the upload function, you make the upload *trackable, allowing you to confirm whether your uploaded data has been fully synced.
9+
10+
:::info
11+
Tracking with tags is used ***only for [deferred uploads](/docs/upload-download/#deferred-uploads)***. That is because when content is uploaded in a deferred manner, the content's reference hash will be returned *immediately*, often before the content has been fully synced to the network. Therefore tags should be used in order to confirm when the content has been fully synced and is retrievable.
12+
13+
With direct uploads, the reference hash is not returned until after the content has already been uploaded and fully synced to the network, so there is no need to track it after uploading.
14+
:::
915

1016
## How It Works
1117

@@ -43,12 +49,19 @@ This links the upload to your tag so you can monitor its progress.
4349

4450
### 3. Track Tag Progress
4551

46-
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.
52+
Use `bee.retrieveTag(tagUid)` to monitor upload progress. Chunks that have **already been synced in the past** are counted in `seen`, while newly synced ones are in `synced`. Poll repeatedly until:
53+
54+
```text
55+
synced + seen === split
56+
```
57+
58+
This indicates that all chunks have either just synced or were already present in the network.
4759

4860
```js
4961
const tag = await bee.retrieveTag(tagUid)
5062
console.log(` - Total split: ${tag.split}`)
5163
console.log(` - Synced: ${tag.synced}`)
64+
console.log(` - Seen: ${tag.seen}`)
5265
```
5366

5467
## Example Script
@@ -70,7 +83,7 @@ async function waitForTagSync(tagUid, interval = 800) {
7083
console.log(` - Seen: ${tag.seen}`)
7184
console.log(` - Synced: ${tag.synced}`)
7285

73-
if (tag.split > 0 && tag.synced >= tag.split) {
86+
if (tag.split > 0 && tag.synced + tag.seen >= tag.split) {
7487
console.log("Upload fully synced!")
7588
break
7689
}
@@ -102,7 +115,8 @@ async function uploadNodesJsonWithTag() {
102115
uploadNodesJsonWithTag()
103116
```
104117

105-
Example terminal output:
118+
119+
### Example Terminal Output
106120

107121
```bash
108122
Created new tag with UID: 85
@@ -115,11 +129,12 @@ Progress (Tag 85):
115129
Progress (Tag 85):
116130
- Total split: 1078
117131
- Stored: 0
118-
- Seen: 0
119-
- Synced: 1078
132+
- Seen: 532
133+
- Synced: 546
120134
Upload fully synced!
121135
```
122136

137+
123138
## Deleting Tags
124139

125140
You can delete tags you no longer need using their uid:
@@ -132,4 +147,5 @@ console.log("Deleted tag:", tag.uid)
132147
## References
133148

134149
- [Bee docs – Syncing / Tags](https://docs.ethswarm.org/docs/develop/access-the-swarm/syncing)
135-
- [Bee API Reference – `/tags`](https://docs.ethswarm.org/api/#tag/Tag)
150+
- [Bee API Reference – `/tags`](https://docs.ethswarm.org/api/#tag/Tag)
151+

docs/documentation/upload-download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,5 +324,5 @@ await bee.uploadData(postageBatchId, 'data', { deferred: false })
324324
```
325325

326326
:::tip
327-
If you do use `deferred: true`, make sure to use a [tag](/docs/upload-download/#using-tags-to-monitor-upload-progress) to track upload progress and confirm the success or failure of the upload.
327+
If you do use `deferred: true`, make sure to use a [tag](/docs/tracking-uploads/) to track upload progress and confirm the success of the upload.
328328
:::

0 commit comments

Comments
 (0)