You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/gsoc.md
+143-1Lines changed: 143 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,4 +15,146 @@ This section is still being worked on. Check back soon for updates!
15
15
16
16
* Show mining the writer private key for the targeted overlay address [Gist](https://gist.github.com/Cafe137/e76ef081263aaec7a715139d700f3433)
17
17
* Show a simple listener, and a simple send invocation [Gist1](https://gist.github.com/Cafe137/7f02fb54ad5a79833f3b718b94df0d41)[Gist2](https://gist.github.com/Cafe137/6277f1d112b3b78ba36f717551357c3b)
18
-
* Show Identifier class usage [Gist](https://gist.github.com/Cafe137/25a244d85758480aa1e15c80ff147b72)
18
+
* Show Identifier class usage [Gist](https://gist.github.com/Cafe137/25a244d85758480aa1e15c80ff147b72)
19
+
20
+
21
+
The GSOC (Graffiti Several Owner Chunk) feature allows a **full node** to receive messages from many other nodes using a shared Single Owner Chunk (SOC). This enables real-time communication and notification over Swarm.
22
+
23
+
## Overview
24
+
25
+
GSOC messages are updates to a pre-mined SOC that lands in the **neighborhood** of the recipient node. Only full nodes receive these updates because light nodes do not sync neighborhood chunks. However, **any node** (light or full) can send GSOC messages.
26
+
27
+
### GSOC vs PSS
28
+
29
+
GSOC shares some similarities with PSS - both features allow for full nodes to receive messages from other nodes.
30
+
31
+
However, there are several key differences:
32
+
33
+
- 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.
34
+
- Unlike PSS, **No encryption** is used by default, making it unsuitable for handling sensitive data.
35
+
36
+
37
+
## Requirements
38
+
39
+
To use the example scripts below, you need:
40
+
41
+
- A Bee full node with a fully synced reserve for receiving GSOC messages.
42
+
- A light node for sending GSOC messages.
43
+
- The batch ID of a usable postage batch. If you don't have one already, you will need to [buy a batch](/docs/storage/#purchasing-storage) to upload data. If you do have one, you will need to [get and save](/docs/storage/#selecting-a-batch) its batch ID.
44
+
45
+
## 1. Create an Identifier (Receiver and Sender)
46
+
47
+
Identifiers in GSOC are similar to topics in PSS — they define the stream of messages a receiver node is subscribed to. The sender must use the same identifier so that their messages are received.
48
+
49
+
Each identifier is a 64-digit hex string (32 bytes). It can be initialized with an a hex string of your choice or any arbitrary string using the `Identifier` utility class. You can also use the zero-initialized `NULL_IDENTIFIER` as a default identifier for cases where you don't need a unique identifier:
- Use `NULL_IDENTIFIER` is a 64 digit hex string of all zeros - use it for quick testing or when uniqueness doesn't matter.
66
+
- Use any hex string to initialize a new `Identifier` object .
67
+
- Use `Identifier.fromString()` to generate an identifier derived from your string of choice (allows for easy to remember human readable identifiers `"notifications"`, `"chat:user1"`).
68
+
69
+
## 2. Get Target Overlay (Receiver Node)
70
+
71
+
This step **is performed by the receiving full node** to retrieve its overlay address. This overlay address is then shared with the sender node to use as a target overlay for its GSOC messages:
The sending node must have a ***usable postage batch id*** and also know the ***target overlay address*** and ***identifier*** in order to send a message:
0 commit comments