HelloZeroNet / HelloZeroNet/ZeroNet

Use BitTorrent for file sharing

Open
#2,781 6 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
18.8k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

I think ZeroNet should transition over to using BitTorrent directly instead of trying to imitate it.

BitTorrent is a much more robust and well-developed protocol. I mean no disrespect to ZeroNet, but projects like [libtorrent](https://github.com/arvidn/libtorrent) have very large budgets devoted to them, probably greater than all of ZeroNet, and it's just for transferring data and nothing else. BitTorrent can also handle larger files, as well as other things.

BitTorrent is an open standard. If ZeroNet started to use it, it'd be possible to interact with other BitTorrent-based projects. This is useful. For example, you could embed videos from BitTorrent directly into zites, and people could download zites in their BitTorrent clients.

If ZeroNet started using BitTorrent for new sites, it could focus on the core functionality, like building decentralized interactive websites, like using Tor instead of trying to re-invent the wheel. With that, making new implementations would also become much easier, because you could use a ready-made BitTorrent library instead of having to re-write the entire file sharing module.

Two semi-recent developments on BitTorrent have made this situation more interesting, and cleared away the last blockers:
* [BEP 52](https://www.bittorrent.org/beps/bep_0052.html) switches the hash algorithm from SHA-1 to SHA-256, changes hashing to the level of individual files, and implements something similar to [TTH](https://en.wikipedia.org/wiki/Merkle_tree#Tiger_tree_hash) to get smaller torrents while keeping piece sizes at 16 KiB
* [BEP 46](https://www.bittorrent.org/beps/bep_0046.html) (or possibly [BEP 50](https://www.bittorrent.org/beps/bep_0050.html), or a custom solution as an extension) allows to dynamically update content

BEP 50 is a good example of this: ZeroNet handles updates (correct me if I'm wrong here) by naively gossiping them, whereas BEP 50 has a very clever structure for making sure updates are propagated in an efficient manner, basically creating an overlay network. Using BitTorrent allows ZeroNet to make use of all of these improvements, while still giving it the freedom to create extensions as needed. If useful, these extensions could be made into a BEP and pawned off onto upstream maintainers.

To be clear here, I'm not proposing that anything be explosively decommissioned, like Tor or Python v2. There's no urgent security flaw that mandates it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.