Skip to content

Latest commit

 

History

History
109 lines (65 loc) · 6.78 KB

active-local-discovery-in-brave.md

File metadata and controls

109 lines (65 loc) · 6.78 KB

Targeted Grant: Active local discovery in Brave

Issuer: @lidel and @autonome
Recipient: @RangerMauve

Project Description

This project’s goal is to get active local peer discovery working in IPFS-Companion on the Brave browser when embedded JS-IPFS node is used.

Part of this will be to find out what isn’t working in the current implementation and/or mDNS spec and to fix it, or propose changes that will enable discovery to work in decentralized fashion.

Secondary goal is to test and refine the Targeted Grant process.

Value

This work enables browser-to-browser IPFS connections in local networks, a powerful expression of offline and local collaboration use-cases of IPFS technology.

It will lay the groundwork for interoperable local network discovery between browser and non-browser nodes and also providers a low-barrier way for people to experience the true power of IPFS without installing separate daemon software.

It will also proof-check our existing specs related to mDNS local discovery, making it interoperable across varying runtime environments.

Deliverables

  • Local discovery between two JS-IPFS nodes running in Brave is merged to ipfs-companion.
  • Upstream fixes to js-libp2p-mdns, libp2p/specs (if needed)

Team

  • @RangerMauve - (Grant recipient) Active member of the dweb community. Done multiple grants with DAT and are key member in team that set up the DAT Foundation.

  • @lidel - (Protocol Labs) Technical advisor

  • @autonome - (Protocol Labs) Grant advisor

Detailed Requirements & Constraints

Our browser extension is whitelisted in Brave to have access to TCP and UDP socket APIs at chrome.sockets.*.
We take advantage of that when "Embedded with chrome.sockets" node type is selected in Preferences.

Right now, only the passive discovery of go-ipfs works (via compat submodule from js-libp2p-mdns): the IPFS node running in Brave is not announcing itself to other peers on the same local network, and a centralized signaling service at ws-star.discovery.libp2p.io needs to be used instead.

It is unknown if existing mdns discovery spec can be used in environment with chrome.sockets, and depending on the research done as a part of this grant, different solutions can be delivered:

  • If js-libp2p-mdns can be fixed, but requires changes to libp2p mDNS spec, PRs making changes to the libp2p spec and relevant libraries and app repositories need to be approved and merged before proceeding further.
  • If js-libp2p-mdns could not be used or fixed, a separate discovery module dedicated for use in runtimes with chrome.sockets can be created. If so, it should be:
  • Whitelisting additional chrome.* APIs is on the table, but requires PoC validating the need.

Milestones & Funding

Total Funding Amount: $3600

Milestones: (working 10 hours a week)

Milestone No. Milestone Description Funding Estimated Timeframe
1 Research relevant libraries specs and available APIs and prepare a standalone PoC $1200 ~35h
2 Submit PR changes to respective specs, libraries and projects $1200 ~20h
3 Addressing reviews, all PRs are merged $1200 ~10h

Acceptance Criteria

  • Local discovery between two JS-IPFS nodes running in Brave works in a LAN without connection to the internet (no centralized signaling service).
  • js-libp2p-mdns is in sync with the spec.
  • PRs making changes to the libp2p spec and relevant libraries and app repositories are approved and merged.
  • JS-IPFS node running in Brave can announce itself to go-ipfs 0.4.23 using mdns:compat from js-libp2p-mdns, or it is documented why it is not possible to implement it on top of chrome.sockets for future work in this problem space.

Resources

Support and Funding

This grant is funded by Protocol Labs.
Technical guidance will be provided by @lidel.