Git Product home page Git Product logo

Comments (7)

abuvanth avatar abuvanth commented on August 15, 2024 1

yes same issue for me. i am running relay node without docker

from libp2p-relay.

abuvanth avatar abuvanth commented on August 15, 2024 1

@abuvanth Yes, its gossip-sub in libp2p.

I found out during developing, the relay node (libp2p) starts wondering about too many messages from the same IP and then the treshold scores becomes negative! This kicks out all peers as unwanted. (enable DEBUG=libp2p:*) on relay side / and peer see you can watch it!

In production environment this should not be the case so fast!

So the solution at the moment is to set the treasholds in libp2p config to negative infinity! At least this is my current solution to it: https://github.com/silkroadnomad/libp2p-relay/blob/main/relay/src/relay.js#L38

You can just set RELAY_DEV_MODE=true inside .env ? https://github.com/silkroadnomad/libp2p-relay/blob/main/.env.example#L1

Let me know if it helped.

it works. thanks for this solution

from libp2p-relay.

silkroadnomad avatar silkroadnomad commented on August 15, 2024

After some minutes already the websocket relay with enabled logging
shows: "libp2p:gossipsub IHAVE: ignoring peer 12D3Kooxxxxxxxxx with score below threshold [ score = -45 ]"

from libp2p-relay.

abuvanth avatar abuvanth commented on August 15, 2024

may be the issue is in libp2p lib?

from libp2p-relay.

silkroadnomad avatar silkroadnomad commented on August 15, 2024

@abuvanth Yes, its gossip-sub in libp2p.

I found out during developing, the relay node (libp2p) starts wondering about too many messages from the same IP and then the treshold scores becomes negative! This kicks out all peers as unwanted. (enable DEBUG=libp2p:*) on relay side / and peer see you can watch it!

In production environment this should not be the case so fast!

So the solution at the moment is to set the treasholds in libp2p config to negative infinity! At least this is my current solution to it: https://github.com/silkroadnomad/libp2p-relay/blob/main/relay/src/relay.js#L38

You can just set
RELAY_DEV_MODE=true
inside .env ?
https://github.com/silkroadnomad/libp2p-relay/blob/main/.env.example#L1

Let me know if it helped.

from libp2p-relay.

abuvanth avatar abuvanth commented on August 15, 2024

will check and let you know

from libp2p-relay.

silkroadnomad avatar silkroadnomad commented on August 15, 2024

@abuvanth if you want you can have a look at a "plain WebRTC" adaptation and fork of the "universal connectivity" example of a libp2p-relay in RUST (!) https://github.com/silkroadnomad/universal-connectivity/tree/main/rust-peer
It works completely with WebRTC only and supports also pub-sub-peer discovery (without any websockets, letsencrypt and nginx)

Also please apologize, I am beginning in RUST and I discovered the relay doesn't do yet circuit-relay as the websocket relay you are using here. This is especially a little annoying in certain Hotels, corporate LANs and sometimes mobile networks too, as they often block peer-to-peer traffic and sorts.

from libp2p-relay.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.