Sender | Message | Time |
---|---|---|
24 Jul 2024 | ||
In reply to @pointoffailure:monero.social While we don't currently have a hard limit I'd recommend against having contract state larger than 10 megabytes, a large file would need to be broken up. However like I said Freenet isn't optimized for distribution of large files, other Freenet peers will treat it as antisocial behavior and will disconnect from your peer. In short, Freenet isn't well suited to the BitTorrent usecase, think of it more as a distributed computer rather than a content distribution network. | 21:14:51 | |
In reply to @philientaylor:gitter.im* In theory there is no limit to the size of files that can be shared over Freenet however it really isn't optimized for large files so I wouldn't recommend it. There are some features on our roadmap that will make it a bit better at handling large contract states but even then I want to discourage people from using it like BitTorrent as that's not what it's designed for. | 21:15:27 | |
You do realize though, humans will be humans and "not recommended" != "won't". You'll have people that will host large files whether you want them to or not. Humans abuse things. | 21:43:02 | |
I was just wondering whether big files can cause a partial DDOS of the network and if it's possible to fill up user drives with junk this way or not. So currently downloads are terminated if they take too long, yes? | 21:43:05 | |
But it is probably possible to write a contract that starts a background download of a huge state by chunks. Will peers feel well in this scenario? | 21:56:30 | |
Its definitely an attack vector that will need to be monitored and eventually mitigated. The best option would be to set a selection of user controls that users can use to limit what size contracts they are willing to process. | 22:11:01 | |
If freenet runs per user instead of per machine it's something that could be exaggerated in my case where I have a single large machine in a small rack that serves all users in my household (4 physical processors, 3 GPUs and 128GB RAM. Imagine a huge contract being downloaded 4 times on the same machine because of 4 users logged in at the same time.) | 22:13:34 | |
Or even simpler: a hidden cryptominer in the contract code which essentially runs on a huge distributed computer. Horrific! I was going to sleep but I can't, I'm dreaming of attack vectors :) | 22:16:47 | |
Welcome to my life. It's my full time job to find and resolve attack vectors. I get paid well š | 22:25:34 | |
In reply to @quilnux:fulltermprivacy.comTrue, that's why Freenet peers monitor their neighbor's resource consumption and will disconnect from a peer that's consuming a lot more than its providing. Pushing a large amount of data into Freenet will be treated as antisocial behavior by other peers and they'll disconnect. | 22:35:54 | |
In reply to @pointoffailure:monero.socialNot explicitly, peers will view it as antisocial behavior and disconnect. | 22:36:55 | |
In reply to @pointoffailure:monero.socialFreenet peers monitor contract resource usage including CPU, contracts that use excessive resources will be deleted. Peers are constantly monitoring cost-benefit both for contracts and neighboring peers. | 22:38:45 | |
In reply to @pointoffailure:monero.social* Freenet peers monitor contract resource usage including CPU, contracts that use excessive resources will be deleted. Peers are constantly monitoring cost-benefit ratios both for contracts and neighboring peers. | 22:39:11 | |
Cool! I understood enough to sleep tight tonight, thank you :) | 22:56:52 | |
25 Jul 2024 | ||
In reply to @gogo2464:matrix.org That's not what I mean, I'm just asking about serving static assets without needing to compile it into WASM. Ideally, I could push the data straight into the DHT, literally a JPEG or JavaScript file like in Hyphanet, and then retrieve the asset unchanged. It's common to have two-tiered applications like this. Most web frameworks let you attach a static directory that just serves the files, you don't need to manually write a handler for each one. In AWS you'd use S3 for static assets and lambda for contracts. | 04:52:14 | |
In reply to@nsotelo:matrix.orgThere could be a default contract to be reused whenever you just need to distribute a small volume of static assets. Could also be some kind of tool to incorporate it, with a simple interface where you just specify a file path and hit "publish". But larger files are gonna need to be offloaded to IPFS or whatever else. At least that's what I understood | 07:36:11 | |
| 07:38:09 | |
| 07:39:54 | |
I think developers are definitely used to the abstraction of having two broad types of data - āstateā probably implies one which is more lightweight, mutable, fast to read and write - and on the other hand something like āassetsā, āobjectsā or just āfilesā, which can by arbitrarily large, maybe immutable, hopefully persistent and available, possibly expensive. I guess the reason we have this abstraction is cos the two types of data represent two pretty different ways of optimising systems. Iām interested to see how Freenet goes with serving files as part of state and whether it does end up presenting as a big practical problem that there isnāt this kind of separation built in. When ive been thinking about building apps on freenet I have also found myself thinking it needs another system like ipfs for the latter type | 07:53:26 | |
In reply to @elvecent_not:matrix.org Definitely can be done but it's extra tooling to manage, extra resource to compile and extract it from the contract at runtime. Hyphanet already solves this problem, you just upload a dumb blob of bits and retrieve it with the key. Maybe it's too difficult to store blobs alongside contracts and delegates in the "backend". But at surface value looks like this is supported. To be clear I'm not talking about large files, rather things like CSS, icons, fonts, scripts, etc that usually don't go beyond a few MB. | 08:16:50 | |
* Definitely can be done but it's extra tooling to manage, extra resource to compile and extract it from the contract at runtime. Hyphanet already solves this problem, you just upload a dumb blob of bits and retrieve it with the key. Maybe it's too difficult to store blobs alongside contracts and delegates in the "backend". But at surface value looks like this is feasible and supported by the architecture. To be clear I'm not talking about large files, rather things like CSS, icons, fonts, scripts, etc that usually don't go beyond a few MB. | 08:18:03 | |
In reply to@nsotelo:matrix.orgI think the only overhead is zipping at compile time and unzipping at runtime? I haven't seen the code though | 08:38:23 | |
Ah, and if you want to have mutable content with static address, you'd have to introduce a redirection, so that one contract points to another, the latter being variable | 08:39:56 | |
In reply to @nsotelo:matrix.org You won't need to compile static assets into WASM, the wasm is the contract or "key", the data is the "value". You can also reconfigure contracts without recompiling them because each contract has a block of bytes containing its configuration parameters that can be changed without recompilation. So a contract that, for example, distributed data that must be signed with a specific signing key could be reused by anyone without recompilation, they just need to change the signing key which would be provided in the contract's parameters. | 14:29:59 | |
16:06:10 | ||
16:37:00 | ||
26 Jul 2024 | ||
From a user perspective, how would they get the key to retrieve the data? Is here a search engine that can be used or does the user have to magically find out what they key is, and then remember it to get to it later? | 18:33:01 | |
* From a user perspective, how would they get the key to retrieve the data? Is there a search engine that can be used or does the user have to magically find out what they key is, and then remember it to get to it later? | 18:33:27 | |
In reply to @quilnux:fulltermprivacy.comNo magic required. In the early stages we'll provide a default index page that will provide links to useful contracts - similar to the original Freenet. Later this will be replaced by a decentralized search engine. | 20:18:58 | |
Gotcha. Is there any information on how such a search engine would work? Even just a preliminary outline would be a good link if you have one. | 20:33:08 |