🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

ssb-blobs

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-blobs

blobs and blob replication for ssb

Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
184
32.37%
Maintainers
1
Weekly downloads
 
Created
Source

ssb-blobs

protocol for gossiping "blobs", in no particular order.

protocol

when two peers connect, they request the blobs the other peer "wants" they do this by sending a JSON object that is a map of {<blob_id>: -hop_count} (note, the hop count is negative) if they have a blob wanted by the peer, they respond with the size they have for that blob: {<blob_id>: size} (note, size is positive - this is how sizes and blobs are distinguished)

Peers can only request blobs they know about. In the legacy scuttlebot/plugins/blobs peers would request blobs that where mentioned in an ssb-feed but this approach means they cannot know about (encrypted) blobs shared in private messages, or about blobs recursively linked from other blobs.

This protocol addresses that by implementing sympathetic wants, if a peer requests a blob that you do not have, you start to want it too. so that wants to not flood the entire network, you signal how much you want it with a hop count. If you want it for your self, you use a hop_count of -1, if you want it for a friend, you use a hop_count of -2 (and so on..)

This allows you to publish a secret blob, without creating a permanent cryptographic record of that blob.

However, this alone would mean that to upload a blob, someone else needs to request it from you, which requries both peers to be online at the same time.

To address this, we have a push method. "pushing" a blob, just makes a peer "pretend" that they want a blob, triggering sympathetic wants from intermediate nodes, ensuring that there are at least some peers that will have the blob. (currently, your peer will continue to pretend they want the blob until at least 3 peers report having it)

License

MIT

FAQs

Package last updated on 10 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts