!ygHfYcXtXmivTbOwjX:matrix.org

freenet

579 Members
Community & Dev room | Freenet | Declare your digital independence | https://freenet.org/ | Keep it friendly, be welcoming to newbies, and stay on-topic63 Servers

Load older messages


SenderMessageTime
24 Jul 2024
@iancjclarke:matrix.orgIan Clarke
In reply to @pointoffailure:monero.social
If I host a 1TB file(contract state) will freenet try to download the whole terabyte on disks of all unfortunate users who "discovered"(clicked on the link) my contract?

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
@iancjclarke:matrix.orgIan Clarke
In reply to @philientaylor:gitter.im
This is cool to learn about. I have some static files I thought about sharing over Hyphanet because they were in the size of GB. Does that mean I could similarly use Freenet instead to share these large files as part of the latest state of the contract? I'm hoping that, as I'm trying to only manage the deltas of these big files, the contracts might similarly space-manage? Since you're speaking only about web apps, I'm thinking I'll still benefit from Hypha to share the versions of these large files, ideally with distribution to match demand as designed, even if I'd use Freenet to receive the state and access the download of assets via the Hyphanet.
*

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
@quilnux:fulltermprivacy.comquilnux 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
@pointoffailure:monero.socialpointoffailureI 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
@pointoffailure:monero.socialpointoffailureBut 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
@quilnux:fulltermprivacy.comquilnux 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
@quilnux:fulltermprivacy.comquilnux 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
@pointoffailure:monero.socialpointoffailureOr 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
@quilnux:fulltermprivacy.comquilnux Welcome to my life. It's my full time job to find and resolve attack vectors. I get paid well šŸ˜ 22:25:34
@iancjclarke:matrix.orgIan Clarke
In reply to @quilnux:fulltermprivacy.com
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.
True, 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
@iancjclarke:matrix.orgIan Clarke
In reply to @pointoffailure:monero.social
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?
Not explicitly, peers will view it as antisocial behavior and disconnect.
22:36:55
@iancjclarke:matrix.orgIan Clarke
In reply to @pointoffailure:monero.social
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 :)
Freenet 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
@iancjclarke:matrix.orgIan Clarke
In reply to @pointoffailure:monero.social
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 :)
* 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
@pointoffailure:monero.socialpointoffailureCool! I understood enough to sleep tight tonight, thank you :)22:56:52
25 Jul 2024
@nsotelo:matrix.orgnsotelo
In reply to @gogo2464:matrix.org
He probably means to serve other programming languages thab rust or typescript...

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
@elvecent_not:matrix.orgelvecent_not
In reply to@nsotelo: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.

There 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
@elvecent_not:matrix.orgelvecent_not
  1. e. apart from volume, that's just a matter of tooling sitting on top of the platform. If someone implements it, there you are

07:38:09
@elvecent_not:matrix.orgelvecent_not
  1. e. apart from volume, that's just a matter of tooling sitting on top of the platform. If someone implements it, there you are. The platform itself offers enough flexibility to support the use case

07:39:54
@meri:radical.directorymeriI 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 type07:53:26
@nsotelo:matrix.orgnsotelo
In reply to @elvecent_not:matrix.org
There 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

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
@nsotelo:matrix.orgnsotelo* 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
@elvecent_not:matrix.orgelvecent_not
In reply to@nsotelo: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 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.
I think the only overhead is zipping at compile time and unzipping at runtime? I haven't seen the code though
08:38:23
@elvecent_not:matrix.orgelvecent_notAh, 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 variable08:39:56
@iancjclarke:matrix.orgIan Clarke
In reply to @nsotelo: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.

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
@jordee2023:matrix.org@jordee2023:matrix.org left the room.16:06:10
@seng17:matrix.orgseng17 joined the room.16:37:00
26 Jul 2024
@quilnux:fulltermprivacy.comquilnuxFrom 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
@quilnux:fulltermprivacy.comquilnux* 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
@iancjclarke:matrix.orgIan Clarke
In reply to @quilnux:fulltermprivacy.com
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?
No 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
@quilnux:fulltermprivacy.comquilnux 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

There are no newer messages yet.


Back to Room ListRoom Version: 9