While relays and file upload services are a simple and effective way to get started, I think p2p is the future.

Running a relay or file uploader is expensive, and you need content moderation. On the other hand, p2p is "free" because people are already paying for their own internet access and on-device storage, or even cloud storage. P2p is also much more censorship resistant.

Video hosting is so expensive that I imagine it will be the first thing to be moved onto bittorrent. If you don't like torrenting with random people, you could connect to people in your Nostr social network.

When Nostr becomes popular and free relays dwindle, maybe p2p becomes more common for event sync as well. Direct connections are also better for DM privacy.

If bittorrent is too clunky for general-purpose file sharing, we can devise our own file sharing on Nostr. Nostr is already based on content-addressed events. Just need a binary format and some standard for file chunking.

Reply to this note

Please Login to reply.

Discussion

IPFS also tries to solve this problem. I kind of thought support for IPFS URLs would be fantastic for sharing files in Nostr.

Thoughts on Jackal? They are doing some cool things with IPFS.

https://www.jackalprotocol.com/

I've never heard of Jackal before. What are they doing?

We spent a long-time crafting a standard for file chunking by evolving Merkle DAGs, which are modified Merkle Trees used for file storage.

These Scionic Merkle DAGs are a significant improvement over IPFS Merkle DAGs. https://github.com/HORNET-Storage/scionic-merkletree

IPFS is arguably one of the most popular P2P file sharing platforms in the world, as you know. Their entire system is cryptographically secure due to their Merkle DAGs.

Our merkle branches contain fewer useless hashes. As the folder grows, the branch size decreases logarithmically compared to Merkle DAGs. Stats can be seen on the GitHub page.

These new Scionic Merkle DAGs can be used for a user-sever model where relays store files beyond notes, or a P2P model as you described here. We’re setting up a #Nostr relay that supports them now.

I don’t mind pursuing both futures, but I lean toward the paid user-server model. I’d be curious to see where you and JB take the P2P model, as Robin Linus and I are working on a way to paid relays over Lightning in an atomic way, with preimages as file chunks. nostr:note12fxpjxw6w6l78dye7w073t8paakrc6demp4emlze3zcdw00n029q7xtrg9

Robin Linus and I are working on a way to pay* relays over Lightning in an atomic way

The P2P network IPFS achieves it syncing between peers one merkle branch/leaf at a time… with the syncing protocol BitSwap, or their evolution of it called GraphSync.

The Scionic Merkle DAGs have smaller branches than Merkle DAGs and is equipped to interact with a syncing protocol capable of ranged requests like GraphSync. It’s ultimately the evolution of IPFS.

The P2P network IPFS achieves it’s* syncing between peers

This is an important effort, and I hope it goes well!

Thank you! We hope you’ll consider adopting it into Iris for photos/videos etc. Our first client with it will either be a fork of Iris or Snort, so you can experience how it works first.

We’ll be coding a JS version of the Scionic Merkle DAGs soon for all webapps.

I’m not technical enough to see exactly how Nostr and Holepunch (BitTorrent but better) fit together, but I have a strong sense that they definitely do.

Very curious to how all of that will play out!

First: That cover image is dope. Dunno why, i just like it.

As for file-sharing over Nostr: There have been proposals to handle WebRTC bootstrapping over Nostr events - the same approach, and more, can be used for file-sharing too. What, however, I don't see being so easy is moving the tasks relays do into a p2p network - the purpose is to have multiple relays to increase the censorship resistance. p2p networks are often sporadic and can collapse any time, they aren't really that stable. Personally, I think that as long as people are interested, free relays will keep existing. Heck, I run my own and whoever finds it is free to use it - I just don't guarantee for it to stick around, and you shouldn't trust this with any other relay too.

What would be interesting is if we could move the announce-part of a torrent into Nostr to bootstrap peering. It certainly is possible and there are tools like libp2p that could be facilitated - or just Webtorrent itself. So, look into the NIP proposals, maybe there is something that you could pick up, modify, hack a client together, and show off =) I'd certainly be interested in this.

Think Youtube-over-Nostr but with the videos coming from other peers watching the same video or provided on dedicated servers? Who knows.

I like your arguments about the technical solution. But I miss your thoughts on economics.

Who should carry the burden of storage? Reader or writer? Does the uploader pay that you can see the content (as with advertising) or does the downloader pay to see it (as with Netflix)?

Or even: should the reposter, referencer or liker also carry some weight caused through redistribution?

Maybe someday every phone hosts a relay:

nostr:note1wfcdmftt90rlj2qswal8k4f579wt4lpyzxpxwm4zpedgrhkv0hfs2rtlep

A local database in the client side is indeed a step forward.

It would greatly reduce the actual burden to relays.

Feeling bullish...

nostr:note1ywj0vv4sg7z2jc2whktw9dq2g7vpcn6wep7xrq7w2f8jus4cn2nsdyqj49

Feeling bullish...

nostr:note1ywj0vv4sg7z2jc2whktw9dq2g7vpcn6wep7xrq7w2f8jus4cn2nsdyqj49

Feeling bullish...

nostr:note1ywj0vv4sg7z2jc2whktw9dq2g7vpcn6wep7xrq7w2f8jus4cn2nsdyqj49

Feeling bullish...

nostr:note1ywj0vv4sg7z2jc2whktw9dq2g7vpcn6wep7xrq7w2f8jus4cn2nsdyqj49

P2P only works if you can traverse the firewalls. Most mobile networks cannot be traversed without a server to hop through.. still, it would be cool, relays could run a coturn service for this.

Multiple projects have proven that can be done, anyone who can connect outbound and use open peers to relay their stuff for them. Look at Gnutella for example that used to power Limewire, that could do it. But so can Tox, and Session uses a different mechanism with servers that communicate P2P with each other rather than everything being P2P.

Yes, my point is, it can be done with a service like you describe. If all you have is a mobile device, a service still has to be run by someone who isn't you that has a port open to the internet and is willing to shoulder the burden of relaying your traffic between peers.

100%. P2P is a model I'd like to see.

Ultimately I'd like to be able to store medical records and selectively share/unshare with given individuals. This was a proposal by one of the devs here to tkae back our control for medical data.

Direct p2p doxxes IPs