Show HN: Freenet, a peer-to-peer platform for decentralized apps (freenet.org)

390 points by sanity ↗ HN
For the past 5 years or so I've been working on a ground-up redesign of Freenet, my peer-to-peer project from the early 2000s (now renamed Hyphanet).

The new Freenet has been up and running since December along with some early applications like River[1], our decentralized group chat and Delta - a decentralized CMS. Users have already started to build their own apps on Freenet including games, and we have some interesting apps in development like Atlas, a search/recommendation engine.

Architecturally, this new Freenet is a global, decentralized key-value store where keys are webassembly contracts which define what values (aka "state") are valid for that key, how or when the values can be mutated, and how the state can be efficiently synchronized between peers.

We've developed a unique (AFAIK) solution to the consistency problem, every contract must define a "merge" operation for the contract's associated state. This operation must be commutative, meaning that you can merge multiple states in any order and you'll get the same end result.

This approach allows state updates to spread through the network like a virus[2], which typically achieves consistent global state in a few seconds or less.

Like the world wide web, Freenet applications can be downloaded from the network itself and run in a web browser - similar to single-page apps on the normal web. However, rather than connecting back to an API running in a datacenter, the webapp connects locally to the Freenet peer and interacts with Freenet contracts and delegates over a local websocket connection.

If you'd like to try Freenet we have convenient installers for the major desktop OSs but not yet mobile, and you can be chatting with other users on River within seconds[3]. Happy to answer any questions, you're also welcome to read our FAQ[4], or watch a talk I gave back in March[5].

[1] https://github.com/freenet/river

[2] https://freenet.org/about/news/summary-delta-sync/

[3] https://freenet.org/quickstart/

[4] https://freenet.org/faq/

[5] https://youtu.be/3SxNBz1VTE0

48 comments

[ 3.1 ms ] story [ 54.9 ms ] thread
(comment deleted)
We had too much Gnutella. I am in search for a locus to us. Now. SCNR
Big fan of this project. Three years ago, I interviewed Ian Clarke about his upcoming Freenet rewrite. He's the original "OG" of decentralized content networks. We go into detail regarding its architecture on the podcast:

https://www.youtube.com/watch?v=JWrRqUkJpMQ

Very cool project!

> We've developed a unique (AFAIK) solution to the consistency problem, every contract must define a "merge" operation for the contract's associated state. This operation must be commutative, meaning that you can merge multiple states in any order and you'll get the same end result.

Where can I learn more about this? How is this different from CRDTs/CmRDTs?

I wrote a short University essay on Freenet in 1998 I think it was... I may still have the document somewhere. Good stuff, very pioneer!
Neat. I've been wanting to see WASM-defined network behavior like this for a while (yay arbitrary consistency algorithms!), I'll have to explore it in more detail :)

(the main thing I've been wanting to try: rather than graphql, send a WASM blob along with your request to a server, and just run it to filter fields in the response / pipeline requests / define "fail if any err / pair errors with requests" for concurrent requests. arguably you could even have it control callee-internal retries.)

I think better approach for "ghost keys" would be requiring X amount of crypto to be sent to 0x0 (burning). Current implementation (requiring donation to freenet) basically gives freenet foundation infinite reputation (including any other potential project that would accept ghost keys as identity), kinda breaking the decentralization aspect
ELI5, how is this different than the internet?
Very interesting. Beyond ideological motivation, I’m curious what the long-term incentive is for someone to run a peer.

For example, if Freenet were to reach scale, it could eventually need some kind of economic primitive around it. Something similar to how Filecoin handles decentralized storage, but for app state. One way to do this could be paying peers to keep app state available, serve it reliably, etc. and prove they are doing so.

In my early days of technology tinkering when I was young I was always interested in security, and one day I stumbled upon freenet, and my world changed.

It was amazing and led me to get far more acquainted with the cyberpunk scene. It was this alternative separate internet from what the rest of the world saw with all of the good and bad that brought.

I've been meaning to set it up again and get back into it. I will say for everyone pining for the Internet of yesteryear freenet is it. Go and explore it it is everything the 90's Internet was like, super slow, crazy unhinged nerds all over the place random collections of links, crazy.

Thanks for all you've done Ian

Edit: Btw what is the best way to support the project and get involved?

Very interesting. I have been working on something quite some time, where something like this would play a very crucial role, but i never got around to really thinking about how to implement everything. And as I have still a lot of work to do on my project, that would utilize something like freenet, i am very eager to dive into your work. Just wanted to write this as some form as appreciation for your work.

I wonder though, what is your idea of a future, where freenet plays an important role in most peoples lives?

Great work it seems, so far. I will yet have to really look through it all. Congratulations on this.

Notably this project was conceived by a backroom decision to dump the original Freenet development team's work,

in favor of a rewrite from different developers, without asking anyone on the original team.

It was an ivory tower decision which was announced on the mailing list without prior discussion.

The old team did not agree, yet it was forced through by a decision of the "board".

The "board" was a group of people which had not been active on the project for over a decade.

https://www.mail-archive.com/devl@freenetproject.org/msg5526...

The funding of the existing, original "Freenet" was repurposed for the new one of course.

The new "Freenet" does not have anonymity as a design goal anymore,

while the old one continues to exist and is maintained under its new name "Hyphanet" at:

https://www.hyphanet.org/

>while the old one continues to exist and is maintained under its new name "Hyphanet"

Well, that name pretty much dooms the project to a slow death in obscurity.

I wasn't very happy as a user with an interest in tech/internet history to find my old bookmarks and notes had been hijacked by the new renamed project. The Original Freenet (Hyphanet) was quite interesting. The new one, less so, especially with the name hijacking.
Thanks so much for the heads up. I loved Freenet as a concept back in the day and used to devote a significant chunk of my tiny hard drive to trying to help out. I looked it up a few months ago and honestly thought I was experiencing some kind of memory dailure when I saw the new project under that name. Was wondering what the project I was so excited for had _actually_ been called all those years back. Now I know what happened, and where to find the project I actually liked.
Isn’t anonymity the one and only point of freenet.
anonymity was the main point of freenet... So weird
This is awesome. I rotated some ideas like this in my head a while ago but never had the motivation to put it together. Happy to see more types of protocols like this.
Is this similar to how Napster worked?
I thought Gnutella was a bit more like Freenet than Napster, iirc only the bootstrap was centralized.
For values that don't have a natural merge function (or where you don't want to bother writing one), would it make sense to sync update logs instead? That is:

- The synced value is a history of client updates, sorted in some eventually consistent order (e.g. by hybrid logical clocks). Merging takes the union of the update sets.

- The user-visible value is the result of processing these updates in order, using arbitrary contract code.

This is overkill for simple last-writer-wins values, but it lets you support fairly general data types & arbitrary update functions, including ones that preserve application-specific invariants.

The Automerge CRDT library works like this already [1][2], but it only allows specific updates to JSON data. Sharing code via your contracts solves the hard part of generalizing that to arbitrary data & updates.

[1] https://automerge.org/

[2] https://arxiv.org/abs/1805.04263

I wrote a web browser for Freenet called Snarfzilla. I guess it may have been the first web browser for "the dark web". [1]

I integrated "Fair Tunes", which tried to pay musicians for mp3 files, long before any label was selling mp3's.

(Edit: I just remembered Freshmeat automatically rejecting Snarfzilla because they were so sick of projects ending in *zilla. The owner thought it was cool and added it after I emailed. No idea why I used 'snarf'. I've never said it out loud.)

[1] https://sourceforge.net/projects/snarfzilla/

Can this be used to sync the data of an app from mobile to desktop without a server ? And vice-versa.
Can you tell me about the old Freenet? I've read up on Wikipedia and it seems to be very much in the line with the 90s/2000s p2p file sharing software. Except that you can store stuff on other people's computers and it's encrypted?

Which then led to people storing Bad Stuff, and this is somehow addressed in the new version? (I also read some stuff about friends and trust in the previous one, but haven't looked into properly.)

I think understanding the old one and the issues it ran into would be helpful for understanding the context, and the motivations for the changes.

Or to put it very bluntly: what is this, why should I care, and why not just use the old one?

Thanks

Looks very interesting! I stumbled across your webpage a few months ago while looking into the state of peer-to-peer. Glad to see p2p projects are still active.
Is there any way to run this in the browser rather than downloading an app?
Looks very intersting, congratulations for the launch and wishing you good Luck!
It's refreshing to see people doing something conceptually interesting outside of the LLM domain.