Skip to content

Instantly share code, notes, and snippets.

@balupton
Last active February 9, 2021 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balupton/5d87d07ce617d743e78f8137ab1766a1 to your computer and use it in GitHub Desktop.
Save balupton/5d87d07ce617d743e78f8137ab1766a1 to your computer and use it in GitHub Desktop.
Proposal for a Decentralised Content Address Network on Existing Technology

Proposal for a decentralised content addressed network that can work today on existing technology

  1. Setup service on cloudflare workers, or any http server with a key value store database and routing
  2. Request to /somefile of that trusted service: https://fountain.bevry.workers.dev/somefile
  3. Redirects to multiaddr: https://fountain.bevry.workers.dev/multiaddr/hash
  4. Returns alt-svc header of alternative hostnames that use the same file
  5. Returns digest header with expectations of checksum for range
  6. Client uses alt-svc header response to fetch ranges from other locations
  7. Also fetches digest range responses from alt-svc peers to verify response is correct (head requests)
  8. Keeps track of which hostnames returned digest responses with concurrence to trusted sources, add to their trust score
  9. Trust has manual verification and automatic trust scores, warnings occur on divergence
  10. Once range verified it can be saved locally or piped to one's own cloud provider
  11. Cloudflare workers can implement this with kv for small files, or piping to s3 for large files, or piping to requester for tools like curl or web browsers for local saving
  12. Alternatively hash.torrent can be requested to provide a torrent file with http seeds to same hosts that would be included in the alt-svc header
  13. .ipfs can also be provided
  14. Perhaps instead of .ipfs and .torrent they can be done as alt-svc protocols
  15. Anyone can alert of a new peer to be included and replicated by posting to the http service with the hostname and cid which if ping fails 3 times, then it is dropped
  16. Http servers can sync and subscribe to peer updates via braid
  17. Videos can also be streamed by just using HLS (open bur controlled by apple) and DASH (patented) without anything new or fancy

Royalty free codec:

  • av1 for video, opus for audio, webm for container
  • avif for image

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment