Hybrid Transport & Avalanche-Efficient Dissemination #492
KarimHassan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
BitChat is fully offline and peer-to-peer. Devices connect over Bluetooth, and messages spread by gossiping with a TTL. That works well for local meshes, but we may run into problems when:
I think it can be solved by having:
This can allow Messages to travel across internet relays when meshes don’t connect, with End-to-end Noise encryption using nip-17 and it save resources
flowchart LR %% ========== CLUSTERS ========== subgraph L["Local Mesh (Origin Side)"] A["Peer A<br/>origin"] B["Peer B"] C["Peer C"] D["Peer D"] E["Peer E"] F["Peer F"] G["Peer G<br/>Internet-capable"] end subgraph RZ["Remote Mesh (Destination Side)"] H["Peer H"] I["Peer I"] J["Peer J"] K["Peer K"] R["Peer R<br/>Recipient"] end subgraph NET["Nostr Relay"] NR["Nostr Relay<br/>(NIP-17 ephemeral)"] end %% ========== ORIGIN AVALANCHE ========== A -- gossip/TTL --> B A -- gossip/TTL --> C B -- gossip/TTL --> D B -- gossip/TTL --> E C -- gossip/TTL --> F C -- gossip/TTL --> G %% Internet bridge (STOP #1 after upload) G -- sealed Noise envelope --> NR %% Local suppression after reaching relay (STOP #1) D -. suppression after STOP #1 .-x D E -. suppression after STOP #1 .-x E F -. suppression after STOP #1 .-x F C -. suppression after STOP #1 .-x C B -. suppression after STOP #1 .-x B A -. suppression after STOP #1 .-x A %% Remote side pulls from relay and re-gossips NR -- opaque event --> H NR -- opaque event --> I H -- gossip/TTL --> J I -- gossip/TTL --> K %% Delivery to recipient (STOP #2 after Ack) J -- gossip/TTL --> R K -- gossip/TTL --> R %% ========== ACK + STOP PROPAGATION (remote) ========== R -. DeliveryAck .-> H R -. DeliveryAck .-> I R -. DeliveryAck .-> NR R -. DeliveryAck .-> J R -. DeliveryAck .-> K %% "STOP" callouts as separate nodes (flowcharts don't support note blocks) S1[[STOP #1<br/>Internet peer uploads sealed ciphertext to relay.<br/>Origin-side avalanche suppresses.]] S2[[STOP #2<br/>Recipient received & acked.<br/>Remote avalanche suppresses.]] G -.-> S1 R -.-> S2 %% Visual classes classDef relay fill:#f3f9ff,stroke:#3b82f6,color:#1f2937,stroke-width:2px; classDef internet fill:#ecfdf5,stroke:#10b981,color:#065f46,stroke-width:2px; classDef recipient fill:#fff7e6,stroke:#f59e0b,color:#92400e,stroke-width:2px; classDef origin fill:#eef2ff,stroke:#6366f1,color:#111827,stroke-width:2px; classDef stop fill:#ffe9e9,stroke:#e74c3c,color:#c0392b,stroke-width:2px; class NR relay; class G internet; class A origin; class R recipient; class S1,S2 stop;Beta Was this translation helpful? Give feedback.
All reactions