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
- communities: join by `share_id` + `share_pubkey`, browse joined participants and community public shares across reachable peers
43
+
- communities: join by `share_id` + `share_pubkey`, browse joined participants and community public shares via DHT-assisted discovery + peer status checks
42
44
- public shares: browse reachable-peer public shares and subscribe without manually entering `share_id`
43
45
- sync: manual sync over configured bootstrap TCP peers plus LAN-discovered peers
44
46
- search: local subscription-scoped search
@@ -56,7 +58,7 @@ Windows desktop shell notes:
56
58
- published content is advertised over the local TCP listener; if `Bind TCP` is `0.0.0.0`, the app derives an address from a known peer when possible
57
59
- Community notes:
58
60
- community join is explicit and local; there is no community autodiscovery
59
-
- community browse currently probes the peers you can already reach, lists the ones that report joined membership for the selected community, and then fetches community-bound public shares from those peers
61
+
- community browse uses DHT-backed community member discovery (`community:info`) and then fetches membership status and public-share listings from discovered peers
60
62
61
63
## 3. CLI usage
62
64
@@ -65,11 +67,11 @@ The `scp2p` CLI is an **interactive shell**. There are no subcommands to memoris
65
67
### Starting the CLI
66
68
67
69
```bash
68
-
# Defaults: database = scp2p.db in cwd, TCP port = 7001
70
+
# Defaults: database = scp2p.db in cwd, TCP port = 7001, QUIC port = 7000
6. Attempts persistent relay tunnel registration using configured bootstrap peers.
98
+
7. Prints a welcome banner with your **Node ID** and **Share ID**.
99
+
8. Enters the main menu loop.
94
100
95
101
### Main menu
96
102
@@ -107,6 +113,7 @@ On launch the CLI:
107
113
📁 Publish folder
108
114
📚 Browse / inspect a share
109
115
🔔 Subscriptions
116
+
🏘 Communities
110
117
🔍 Search
111
118
⬇ Download by content ID
112
119
⬇ Download share
@@ -339,15 +346,15 @@ secrecy. Frame lengths use a 4-byte **big-endian** (network byte order) prefix.
339
346
340
347
## 6. Current limitations
341
348
342
-
This is an in-memory prototype baseline.
349
+
State is persisted via SQLite (`SqliteStore`) and includes subscriptions, manifests, search snapshot, peers, communities, publisher identities, and partial download metadata.
343
350
344
351
Not yet implemented as production-ready behavior:
345
352
- End-to-end relay tunnel transport integration
346
353
- Extended multi-node integration/churn/NAT soak depth and metrics-driven analysis
347
354
- Robust peer reputation, abuse controls, quotas
348
355
- Full mobile/desktop profile split behavior
349
356
350
-
## 7. Message type registry (frozen for v0.1)
357
+
## 7. Message type registry (current)
351
358
352
359
`type: u16` values currently reserved/implemented:
353
360
@@ -358,6 +365,14 @@ Not yet implemented as production-ready behavior:
358
365
-`202`: `STORE`
359
366
-`400`: `GET_MANIFEST`
360
367
-`401`: `MANIFEST_DATA`
368
+
-`402`: `LIST_PUBLIC_SHARES`
369
+
-`403`: `PUBLIC_SHARE_LIST`
370
+
-`404`: `GET_COMMUNITY_STATUS`
371
+
-`405`: `COMMUNITY_STATUS`
372
+
-`406`: `LIST_COMMUNITY_PUBLIC_SHARES`
373
+
-`407`: `COMMUNITY_PUBLIC_SHARE_LIST`
374
+
-`460`: `RELAY_LIST_REQUEST`
375
+
-`461`: `RELAY_LIST_RESPONSE`
361
376
-`450`: `RELAY_REGISTER`
362
377
-`451`: `RELAY_REGISTERED`
363
378
-`452`: `RELAY_CONNECT`
@@ -368,15 +383,6 @@ Not yet implemented as production-ready behavior:
368
383
-`501`: `CHUNK_DATA`
369
384
-`502`: `GET_CHUNK_HASHES`
370
385
-`503`: `CHUNK_HASH_LIST`
371
-
-`600`: `LIST_PUBLIC_SHARES`
372
-
-`601`: `PUBLIC_SHARE_LIST`
373
-
-`602`: `GET_COMMUNITY_STATUS`
374
-
-`603`: `COMMUNITY_STATUS`
375
-
-`604`: `LIST_COMMUNITY_PUBLIC_SHARES`
376
-
-`605`: `COMMUNITY_PUBLIC_SHARE_LIST`
377
-
-`700`: `RELAY_LIST_REQUEST`
378
-
-`701`: `RELAY_LIST_RESPONSE`
379
-
380
386
Compatibility policy for this registry:
381
387
382
388
- Existing numeric assignments are stable and must not be changed.
All flags can also be supplied as environment variables — useful in scripts or containers.
@@ -61,7 +62,7 @@ All flags can also be supplied as environment variables — useful in scripts or
61
62
62
63
## Interactive shell
63
64
64
-
On launch the node opens (or creates) the database, restores its identity, starts a background TCP listener, and presents the main menu:
65
+
On launch the node opens (or creates) the database, restores its identity, starts background TCP/QUIC listeners (if enabled), and presents the main menu:
65
66
66
67
```
67
68
╔══════════════════════════════════════════╗
@@ -79,6 +80,7 @@ On launch the node opens (or creates) the database, restores its identity, start
79
80
📁 Publish folder
80
81
📚 Browse / inspect a share
81
82
🔔 Subscriptions
83
+
🏘 Communities
82
84
🔍 Search
83
85
⬇ Download by content ID
84
86
⬇ Download share
@@ -119,6 +121,13 @@ Sub-menu with three options:
119
121
| Subscribe to a new share | Enter a share ID (hex) and optional public key |
120
122
| Sync subscriptions now | Trigger an immediate network sync (same as **Sync now**) |
121
123
124
+
### 🏘 Communities
125
+
Sub-menu for:
126
+
- Create a new community
127
+
- Join a community
128
+
- Leave a community
129
+
- Browse a community (participants and public shares)
130
+
122
131
### 🔍 Search
123
132
Prompts for a text query, runs it against the local subscription-scoped search index, and shows ranked results with score, share ID, content ID, and item name.
124
133
@@ -149,5 +158,5 @@ Generates a fresh Ed25519 keypair and prints:
149
158
150
159
-**Offline use:** search and browsing work without any network connection as long as you have locally synced manifests.
151
160
-**Persistent identity:** the node key is stored in the database; the same Node ID and Share ID appear on every launch against the same `--db`.
152
-
-**Scripting:** set `SCP2P_DB`, `SCP2P_PORT`, and `SCP2P_BOOTSTRAP` environment variables to avoid repeating flags in scripts.
161
+
-**Scripting:** set `SCP2P_DB`, `SCP2P_PORT`, `SCP2P_QUIC_PORT`, and `SCP2P_BOOTSTRAP` environment variables to avoid repeating flags in scripts.
153
162
-**Multiple nodes:** point different instances at different `--db` paths to run multiple independent identities on the same machine.
0 commit comments