n0-computer / iroh

A toolkit for building distributed applications
https://iroh.computer
Apache License 2.0
2.23k stars 144 forks source link

feat: make iroh-gossip message size configurable #2312

Closed link2xt closed 2 months ago

link2xt commented 2 months ago

There is a TODO here: https://github.com/n0-computer/iroh/blob/370075c6d5689ad4349664eb9b51ec0a5e7e4e81/iroh-gossip/src/net.rs#L30-L31

I ran into this problem, after trying to send a large message over gossip it stops working (in Delta Chat). Maybe it is our error handling that is wrong, have not investigated further yet.

I wanted to send PCM audio, in 4096 bytes with a single channel of 32-bit floats at 8kHz I can only encode 128ms of audio (8 * 4096 / 32 / 8000) per message. Will split into chunks of 3k bytes now just to make sure, but would be nice to have less overhead and just avoid the problem of the channel silently failing because the message is too large.

link2xt commented 2 months ago

Something larger than 128kb would be good enough, this is what we want to support for WebXDC APIs.

dignifiedquire commented 2 months ago

seems like this should be just configurable