Locutus: A platform for building decentralized apps, from the creator of Freenet
github.com
github.com
I think making the publisher responsible for long-term retention and the decentralized network responsible for distribution is the best option here.
Other tools like FileCoin take the alternate approach of trying to do long-term storage in a decentralized way.
What is missing is a really polished way to do decentralized apps, so that you don't have to think about the decentralized aspect all the time, but just use it because it is the best option. But it is coming.
Full disclosure: hacking on something to make writing decentralized apps easier: https://github.com/cloudpeers/tlfs
Depending how strict you want to be about this, torrents and Secure Scuttlebutt are pretty good in this respect. I especially love Secure Scuttlebutt because it simply makes the client the store of which messages it's seen which also means there is no authoritative view of the whole network but that's by design.
But probably the even better example here is email. It's the OG federated protocol and nobody thinks of it that way. Probably because casual users have consolidated around a handful of convenient clients (gmail, hotmail, whatever) and not thought too hard about how emails get exchanged from one corporate mail server to another.
I like the SSB approach of just embracing subjectivity. I was quite amazed when discovering all this at dtn.is (Before I only knew the IPFS community).
But I feel there is still something missing for very wide spread adoption.
What we are trying to do with TLFS is to combine
- a CRDT with strict schema ( Adapted from https://arxiv.org/abs/1603.01529 )
- a built in way to do schema evolution ( Adapted from https://www.inkandswitch.com/cambria/ )
- local first / p2p deployment and operation even for native apps, based on https://github.com/libp2p/rust-libp2p , faciliated by https://github.com/cloudpeers/x
We're not nearly there yet, but ideally it should be so easy to write small collaborative apps that it is a good option even if you don't care about the idealistic motivations for decentralized apps.
I can see a decentralized design for paid hosting like that.
Since this is written in rust: is there also a version of freenet in rust in the works?
That is an example of the contract API - you can find a better explanation of it here: https://github.com/freenet/locutus/issues/9
We're not re-implementing Freenet in Rust, this is a separate project with related but different goals - however it does borrow a number of ideas from Freenet (like using a small-world network as a DHT).
Not sure we're going to stick with the name "Locutus" when we launch, so for now it's just a working title for the project.
With respect to reading more, currently there isn't too much beyond the Github project, although you can learn more about my previous work here: https://en.wikipedia.org/wiki/Freenet
For example let's say I set of a chat room, and someone spams multiple GBs of data into a channel, can my moderators (in principle) remove those messages without essentially just publishing a new message saying "please ignore all this spam"?
How do you deal with "network splits", that is a smart contract that could have two equally valid states?
You say you use contracts as the key in a key-value store, can you have the same contract with two different data sets? Like two different chat rooms that work the same way but which have different moderators and different message histories?
Correct, in Locutus contract state is mutable, with the contract determining whether changes are permitted and how they are applied to the state.
> For example let's say I set of a chat room, and someone spams multiple GBs of data into a channel, can my moderators (in principle) remove those messages without essentially just publishing a new message saying "please ignore all this spam"?
Yes (although such spamming shouldn't be possible in the first place thanks to the reputation system).
> How do you deal with "network splits", that is a smart contract that could have two equally valid states?
It should be very rare, but contract states that get out of sync can always be "merged" to produce a new state, peers will do this automatically as soon as they figure out the mismatch. The small world protocol that determines network topology should make network splits very unlikely.
> You say you use contracts as the key in a key-value store, can you have the same contract with two different data sets? Like two different chat rooms that work the same way but which have different moderators and different message histories?
Yes, a contract consists of web assembly code to specify the contract functionality, and also "parameters" which are arbitrary data that "configures" the contract (chat room name, owner, etc).
I'll be keeping a close eye on it!
Not possible, or just disincentivized?
Also, although web assembly can theoretically be highly optimized by compiling to native code, there are hard limits on scalability especially since many things need to be executed in a specific order. So you have some mechanism for sharding, or are all computations repeated by 100% of the network? Also is there a mechanism for sharding data?
Anyway, I believe that the future of cryptocurrencies, money, and new types of browsers or even normal web applications will all skew heavily towards web assembly.
It should be possible to build a cryptocurrency on Locutus, using the arbiter mechanism to prevent double-spending.
> So you have some mechanism for sharding, or are all computations repeated by 100% of the network? Also is there a mechanism for sharding data?
Computations are not replicated across the network. There is a mechanism that serves a similar purpose to sharding but is more "organic".
Peers are assigned locations in the network when they join (a number between 0.0 and 1.0). Contracts also have locations determined from a hash of the contract code itself, and peers store contracts that are close to their location. The more people using a contract the more widely cached it will be, as a form of auto-scaling.
Locutus uses a small-world network to allow contracts to be found very quickly in an entirely decentralized way.
As it is right now, are you planning to have byzantine consensus for these contracts? Or just try to do verifiable computation?
The contract ensures that the state is valid both before and after any change and every peer who sees the state will ensure it is valid, so it is verifiable computation in that sense.
Happy to chat - you can pm me on reddit or twitter, username "sanity" in both cases.
It's most closely related to https://freenetproject.org/ - which was a previous project of mine.
Just curious. :)
Hope more language start targeting WASI so the entire industry can get behind a single runtime.
For those unfamiliar, this would replace things like containers and allow more portability. It’s the dream of “write once, run anywhere” accept is language agnostic.
I’d imagine there would be a k8s-like infra tool for managing instances of WASM processes.
We already are trying to do write once, run anywhere with containerization, except that containers use lots of memory and space because you need to virtualize an entire OS.
Whereas WASM is just the bytecode for my program, and I can give that to a WASM interpreter or a compiler to compile to machine code.
I don't understand this particular one.
I've hosted my own email for the last 20+ years, every single component of the stack is open-source, all you need is your favourite Linux distro, a bit of patience and a [virtual] server with a static IP.
Isn't email decentralized the moment you stop using Gmail or Office365 - or, $deity forbid, your ISP's webmail...?
[1] In practice, spam mitigation measures will make it very difficult to get other mail servers to trust your home IP address.
The append only aspect of blockchains means that if someone posts URLs that contains information that is legally required to be removable in some circumstances, the entire blockchain could become illegal to reproduce in some jurisdictions.
For instance, if someone registers www.emanuel-macrons-personal-phoneno-is-888-8888888.xyz that could be a GDPR violation and thus that URL would need to be removable by EU regulations.
And it's just not GDPR, that's just the most obvious example.
I've been running my own DNS servers for 20+ years too.
Don't we typically describe the DNS system as "hierarchical and decentralized"[0]?
> 7. Stay up to date Follow FreenetOrg on Twitter.
lol
This has not much to do with dogfooding.
Literally no need to use discord or Twitter. For a project that complains about centralized entities using more (GitHub) than necessary is so dumb imo. You need to make an account to use Twitter and Discord. Seems like a big step backward.