Comments (3)
bumping this
from js-libp2p.
Relayed connections are time/data limited which means they can be closed at any time so data-heavy protocols don't run over them by default.
This is normally overridable with a runOnTransientConnection
option but it looks like GossipSub doesn't have one of these - this will add it: ChainSafe/js-libp2p-gossipsub#485
Once that's been merged & released you should be able to configure it as:
import { createLibp2p } from 'libp2p'
import { gossipsub } from '@libp2p/gossipsub'
const node = await createLibp2({
// other config
services: {
pubsub: gossipsub({
runOnTransientConnection: true
})
}
})
What's happening in your example is the pubsub message is being sent from node2
to the relay over the direct websocket connection, then from the relay to node1
.
What you want is for the message to got from node2
to node1
over the relayed connection between them instead.
With the runOnTransientConnection
option you can remove gossipsub from the relay entirely.
from js-libp2p.
@chainsafe/[email protected]
contains the fix for runOnTransientConnection
- please try that and the suggestions on https://gist.github.com/vaibhavmuchandi/7cc3d28161ceff68de9bb036bf03a24d
This should resolve the issue, please re-open this issue if you're still having trouble getting it working.
from js-libp2p.
Related Issues (20)
- abstract-stream: should support undefined logger HOT 3
- logger: please export createDisabledLogger HOT 9
- Error trying to connect to peer node : 'maConn.log is not a function' HOT 3
- libp2p http transport example
- Where is this error being thrown?
- Datastore no longer retains self.data in v1 HOT 12
- `mss.handle` never resolves when `optimisticSelect` HOT 11
- Keychain depends on IPFS
- bug: The wrong multiaddr causes the program to enter a dead loop
- Splitted Data When Transmission Data Length Exceeding Send Window Limitation HOT 3
- Configuration for a working setup with VSCODE
- Dial queue timeout for multiple multiaddresses incorrectly used for each connection separately HOT 6
- `notifyOnTransient` also ignore disconnection events?
- @libp2p/webtransport Correct multiaddr format HOT 4
- Restarting a node quickly and connecting will not emit `onConnect`events in registrar HOT 2
- dht: kadDHT() causes TypeError: Cannot destructure property 'kBucketSize' of 'init' as it is undefined HOT 4
- Example returns empty object. HOT 4
- Unhandled error: ERR_SDP_HANDSHAKE_ABORTED HOT 2
- Make identify-push autodial smarter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-libp2p.