waku-org / bounties

Community bounties for the waku ecosystem
10 stars 2 forks source link

CLI to enable file transfer using The Waku Network as a signal/discovery network. #18

Open fryorcraken opened 9 months ago

fryorcraken commented 9 months ago

Context

Waku Is Uncompromising Web3 Communication at Scale. A family of robust, censorship-resistant communication protocols, designed to enable privacy-focused messaging for web3 apps.

Disclaimer: Waku is experimental, you may find blocking issues while developing your web app. We will prioritize their resolution to unblock you, which means you may have to pause development until done. Thank you for your patience and understanding.

Your participation in this bounty is subject to your acceptance of our terms and conditions. Please see waku-org/bounties#applying-for-a-bounty for details.

Rewards

1000 DAI

Timeframe to Completion

Once the application is approved, the result must be submitted within 30 days.

Application Evaluation

To ensure you are selected for this bounty, provide the following information:

Bounty

Dennis Trautwein built a very interesting tool pcp to enable file transfers using libp2p:

This tools uses IPFS DHT to enable the two peers to find each other and exchange multiaddr details. With this bounty, we propose to build a similar tool where The Waku Network is used instead of IPFS DHT.

A DHT query to find your peer can easily take several minutes.

Impact

Demonstrates how the Waku network can be used as a signal network to enable peers to connect directly to each other, enabling high bandwidth/low latency data exchange.

Deliverables

Acceptance Criteria

Resources

Learn more about Waku at https://docs.waku.org/. Join our Discord to get support at https://discord.waku.org/. Various examples available at https://github.com/waku-org/js-waku-examples/.

vpavlin commented 9 months ago

I like this a lot. Doing it on command-line will be much easier than potential follow up with JS/browser

I am a bit confused about the mention of lightpush. Are you actually suggesting to transfer the file using Waku SDK, or once the connection details are exchanged over Waku the tool goes into libp2p directly for the large data transfer?

Second question is circuit-relay - if we use Waku nodes for circuit-relay, then those nodes will "pay" for the bandwith - so maybe we need to actually have 2 bootstraps and peer discoveries - for signaling and for data transfer - or maybe that is what you explained and I did not undestand it from the bounty spec

fryorcraken commented 9 months ago

A libp2p protocol needs to be defined for the data exchange. I am trying to make this as easy as possible and hence suggested lightpush. However, this may not be the best approach, I see two ways forward:

  1. Define a libp2p protocol to enable the data exchange (inspiring themselves from pcp)
  2. Use Waku Relay (and not light push) on a specific cluster/shard that both parties agree with, the expectation is that only those 2 nodes connect to it.

I think (1) might be more advisable as this also opens the door for other use cases (WebRTC, video call, etc). Updated the description.

Second question is circuit-relay - if we use Waku nodes for circuit-relay, then those nodes will "pay" for the bandwith - so maybe we need to actually have 2 bootstraps and peer discoveries - for signaling and for data transfer - or maybe that is what you explained and I did not undestand it from the bounty spec

I am not sure I understand the proposal or question. Is circuit-relay available in nwaku? enabled? circuit relay is enabled by default in go-waku

Yes, node providing circuit-relay do "pay" for bandwidth, but that's true whether or not this bounty is done.

fryorcraken commented 9 months ago

https://twitter.com/dtrautwein_eu/status/1730141516922786296?t=Q8fwFfQXuTm7F9L9gaFu3g&s=19

vpavlin commented 9 months ago

but that's true whether or not this bounty is done.

Yes, what I meant is that if we use/encourage circuit-relay to transfer large data, they might not be happy:)

Is circuit-relay available in nwaku?

It is, but only as server, not client at the moment (https://github.com/waku-org/nwaku/issues/2130)

I am not sure I understand the proposal or question.

Yeah, I think I overcomplicated things:) Disregard:D

fryorcraken commented 9 months ago

Is circuit-relay available in nwaku?

It is, but only as server, not client at the moment (waku-org/nwaku#2130)

that should be good enough. But how does one enable circuit relay server on nwaku?

danisharora099 commented 9 months ago

Is circuit-relay available in nwaku?

It is, but only as server, not client at the moment (waku-org/nwaku#2130)

that should be good enough. But how does one enable circuit relay server on nwaku?

it's enabled by default last i checked