Closed noahfigueras closed 1 year ago
I'm closing this, as I found out it is not related to the yamux
package. I had to increase the defaultDataLimit
on the libp2p relay node circuitRelayServer()
. Following is the config that solved my issue:
const relayNode = await createLibp2p({
peerId: id,
addresses: {
listen: ['/ip4/0.0.0.0/tcp/37465/ws'],
//announce: ['/dns4/127.0.0.1/tcp/443/wss/']
},
transports: [
webSockets(),
circuitRelayTransport()
],
connectionEncryption: [
noise()
],
streamMuxers: [
yamux({
maxMessageSize: 1 << 20
})
],
services: {
identify: identifyService(),
relay: circuitRelayServer({
reservations: {
defaultDataLimit: BigInt(1 << 20), // the default maximum number of bytes that can be transferred over a relayed connection
}
}),
pubsub: floodsub()
},
peerDiscovery: [
pubsubPeerDiscovery({
interval: 1000
})
],
})
I'm trying to migrate from mplex to yumex as it's the recommended by libp2p. But, with mplex I can transfer large sets of data with no problem, but every time I try with yumex the transfer loses chunks of data. I tried setting bigger limits and also transfering data through multiple streams but I lose data almost every time and my relay node in libp2p always gives me the following error
Error: data limit exceeded
. I wonder if there's any way I can push a long array of data through a stream ?ERROR: