Js-ipfs local node connectivity review

Suggesting a live discussion about js-ipfs connecting to mainnet and local browser extensions and nodes out of the box.

We are confirmed for: Tuesday, February 9, 2021 5:30 PM

1 Like

Notes / background on related issues from Fission’s early research.

What we are trying to accomplish is to have really great native IPFS support with js-ipfs. By native, we mean IPFS connections, not HTTP gateway connections. This is all likely related to the IPFS in Browser mission.

Fission Background

By default js-ipfs connects to 4 *.preload.ipfs.io , 4 bootstrap.libp2p.io , and 4 delegate nodes. We have been told that those are demo servers, so Fission runs WSS on our core IPFS servers and connects to them automatically when we initialize a js-ipfs instance.

We also set things up with a (shared) web worker so that one instance of js-ipfs is shared in an iframe across apps / subdomains that are on Fission.

We use js-ipfs to “pin” locally, and then publish updates to our end point, which updates a _dnslink per user. Additionally we run a Fission IPFS node that pins all the user’s data.

Brooke spoke in depth at the IPFS Security WG for more details.

libp2p has disabled ws connections by default

See https://github.com/libp2p/js-libp2p-websockets/releases/tag/v0.15.0 breaking changes. We need to override this when we want to connect to the user’s local ipfs node.

Can’t connect to local nodes

Because there’s no listener for web sockets by default.
Neither WS or WSS.
Ideally the transport should be enabled by default.

IPFS Companion window.ipfs support

Can’t connect to IPFS companion because window.ipfs is disabled.

1 Like

Live notes from call https://hackmd.io/5r1NtTuuSYeAQ955dRatnw?both

Cut / Paste of Markdown from HackMD

js-ipfs local node connectivity review

  • What the plan to make companion to work ?
  • making js-ipfs work with the whole stack ?
    • Work natively with network

js-ipfs bootstrap servers?

  • Who runs them?
  • Vasco: rendezvous?
  • less of a centralization point
  • rendezvous discovery – eg. webrtc-* – centralized solution
  • set of rendezvous servers, you register, you can also discover people who provide the service
  • use them as bootstrap nodes – register the peers that are important, other peers can find them, by making a query

js-ipfs pubsub? which servers

  • register and discover
  • register – it’s a string – pubsub and topic
  • register in the rendezvous server as providing pubsub? not just pubsub, but the topic that is being available

bootstrap servers aren’t going away
http delegates are flaky
webrtc needs to be run ourselves

Dashboard of bootstrap nodes
Like http gateways

Leveraging Brave, IPFS Companion

Lidel is working on this?

Browser js-ipfs <–> full node in Brave / IPFS Companion, this should work out of the box!

ipfs.provider – then it spins up locally

All the stuff in the browser isn’t in the local node?

Pin everything in Fission IPFS in the cloud <–> local node, pin everything

Why local nodes?

More capable - storage, caching, connectivity to network

Offline

mDNS – discover each other

Discovery – like bootstrap – Default to trying to discover peers to IPFS Companion, Brave? Same ports available

Like mDNS – try discovery from browser – dial localhost, known ports

Try and create Circuit Relay with local node? UDP on localhost?

QUIC / websockets

IPFS Companion – not more powers, but daemon, systray, go-ipfs – browser node could leverage

When Fission app is trying to connect to it – instead of rejecting, using a native UI, give it permission, store data on disk – can accept connections for those. By creating Circuit Relay you get more powerful capabalities.

IPFS Cluster – some overlap with “follow”

Get users to progressive adopt a local node

Local node as cluster endpoint? That’s for sync

Circuit Relay – this is for systray local app
HTTP API to configure Circuit Relay

Identity Dapps – identifying where the gaps are?

Fleek – building similar things, Space

Brave – Lidel. No story of node sharing with content.

  • problem of isolation isn’t solved
  • even if you do a desktop thing – assumption is in full control? CSP when you load – not access to read or write into it
  • everyone write and delete – spying issues

Funded person?

yes! find scope going forward

ws / localhost

Leveraging ws://localhost provided by local IPFS node · Issue #177 · ipfs/in-web-browsers · GitHub

treat localhost as not secure for some browsers

dial a peer? can configure it as a delegate, but can’t connect to it

Configure it as a relay

Storytelling – what are the needs?

Help team talk about challenges! Collect more needs and stories

go-ipfs / js-ipfs do the forwarding?

Have to configure being a relay? Be a relay for local by default?

PeerIDs, exchange keys, then they relay

Pinning services should do this, too

Which repo to use?

GitHub - ipfs/in-web-browsers: Tracking the endeavor towards getting web browsers to natively support IPFS.

Lidel

Pitches from community?

Look for that

Links

Gozala Symbiotic network Symbiotic network - HackMD

Fission notes Js-ipfs local node connectivity review - #2 by boris