Stonenet

Hello everyone,

Recently I created yet another social network platform, but in the form of a peer-to-peer network, called Stonenet.

It is entirely decentralized, but it uses a slightly different model than many other p2p networks.
Instead of letting the whole network store all data indiscriminately, data is only stored by the nodes that follow a given actor.
This means there is a level of consent to be had for the data that your own node stores.
I believe this is a better approach than ‘everybody stores anything’, as there is going to be some disagreeable content on any completely decentralized and/or anonymous storage network.
At least with Stonenet, you are in control of what you support on the network, and what ends up on your hard drive.

Moreover, I very much support the idea of letting different social systems communicate with eachother, which is why Stonenet supports ActivityPub as much as can be done with a p2p network.
The way this works is that if you want your actor to be accessible on the Fediverse, someone needs to set up a node on a server with a domain name, [edit: then enable activitypub support on it,] and then [have it] track your actor.

Stonenet is still in early development, but the base functionality is there.
If you have any questions, I’ll gladly answer them.
Currently there are debian packages, a windows installer & a homebrew formula for macos, although I can’t really vouch yet for the macos support at this time. (Download | Stonenet)

And here is the code: GitHub - bamidev/stonenet: A peer-to-peer & censorship-resistant social-media platform

3 Likes

Interesting idea. So the Stonenet node works as a bridge between ActivityPub and your protocol?

Have you seen FEP-ef61? It is a flavour of ActivityPub where objects are portable (self-authenticating), and in theory they can be delivered via any transport. A server that supports FEP-ef61 can be simultaneously an instance in the regular Fediverse, and a node in some p2p network.

Yes, in the case where you configure the Stonenet node to expose/enable the ActivityPub interface, it acts as a bridge between the p2p network and the fediverse.

That specification you linked to looks pretty interesting. I will give it a more thorough read and thought sometime later. But it seems like a nice way to abstract away the way that AP activities are being stored, such that they can be from anywhere, including a p2p network like you said (as long as gateways/bridges exist).

However, stonenet uses its own binary format for the objects/activities, because it saves space and there is going to be a lot of duplicity.

However, it’s not outside of the realm of possibility. A post object in stonenet is not much more than a list of files. Most post objects will simply consist of one “text/markdown” file, but that doesn’t have to be the case at all. You could add a file to each post to represent an alternative format of the same content, which could be an activitypub activity, with the added proof data. It’s not a terrible idea to have multiple versions of a post in different formats, just like how emails are sometimes delivered with both an html version and a text version together.

Anyway, thanks for the suggestion, I hadn’t heard about that yet.

2 Likes

Intriguing! Are you rolling your own p2p from scratch?

My team has been playing around with the idea of a p2p-powered AP app as well, and we are building the foundation of that on top of Iroh.

Indeed. I’m rolling my own p2p from scratch. It’s been something I’ve always wanted to do, but only recently I found an excuse for it. :stuck_out_tongue:

That being said, I see that Iroh has many of the features I would look for if I wanted to build the app on an existing system, but also not necessarily all of them.
The downside of building my own network is that it has taken me a long time to build it, and it is still not entirely finished yet. There are still some things I want to add, like:

  • Letting udp-only nodes communicate with tcp-only nodes through relays on the packet level.
  • Storage nodes which will store data indiscriminately.
  • Following and publishing completely anonymously.
1 Like

Indeed, building a whole new p2p infrastructure and a new social network is an awful lot of work! :sweat_smile:

In the spirit of comparing notes, here’s the system we’ve arrived at thus far:

https://github.com/commune-os/weird/blob/8682e5c376251b3cc6726b694163d4b2499f58b1/ARCHITECTURE.md

1 Like

Hi @bamidev, I’m the lead dev working with @erlend_sh. I’m really excited about Iroh, and one reason I think it has a ton of potential is because it’s designed in layers, so that you can use higher-level features from the top layers like iroh-doc, or, if you need more power, you can implement your own stuff on top of the lower-level layers, like iroh-net.

The Iroh team has some really nice folks in it, and they’ve got good priorities for making it possible to make apps that give users agency, without it being more difficult than making a “traditional” application.

Iroh is still developing, so it’s not like totally “ready”, as far as how nice it is to use, but if you’re someone who’s already getting your hands dirty writing your own, you can probably afford to work with it and maybe even help out.

That’s my plan anyway. :smile:

As far as how Iroh might fit into some of the things you mentioned needing.

Iroh has a built-in support for relay nodes. If you can’t connect directly p2p, it will connect to a relay node over HTTPS, upgrade that HTTP connection to a DERP protocol, then relay e2e encrypted traffic between the connected nodes.

Iroh has configurable “download policies”, and you could control which data you want your node to store however you want.

This isn’t something that is necessarily support right out-of-the-box. It would be interesting, though, to try and do a 3-hop Tor-like relay system, like Session does, so that you can perfectly hide your IP address.


Anyway, I’m happy to answer any questions I can, and the Iroh Discord has really helpful people on there, too.

1 Like