- cross-posted to:
- mesh@piefed.social
- cross-posted to:
- mesh@piefed.social
I like the fact that this sets repeater loop detection as minimal by default instead of off. While I’m not sure how often loops actually occur, it’s better to have less loops.
In theory, loop detection is a solved problem, at least for Ethernet switches, where a periodic “tracer” packet is sent out and if that exact packet is seen coming in, then clearly a loop exists. Whereas an Ethernet switch would include the outbound port number in the tracer packet so that it can then disable that port – to terminate the loop – a MeshCore repeater would presumably just need to decline to repeat traffic that it believes is part of a loop.
The complexity, and where I think the “minimal” setting comes from, is how long to suppress a loop, since that necessarily is dropping traffic from being repeated. So while detecting a loop is easy, the treatment for a loop is not.
Yeah, and when you get path hash sizes of 2 bytes and 3 bytes, there are a lot more unique combinations, and therefore a loop is less likely to occur. So, if you do see one, then you can stamp down on it much faster than you can with, say, a 1 byte ID.
I don’t remember for certain, and I’d have to check the website to be sure, but I want to say in one byte mode, under minimal, that it would repeat the same ID up to four times before terminating it.
I think in practice, this will serve as a soft stick to encourage more use of longer hash path sizes for larger nets. It’s basically a prioritization scheme: 1 byte path hashes that are taxing the repeater only sometimes make it through, preserving bandwidth for longer hashes which can be more efficiently routed. A classic tradeoff of range, performance, and network health.
We just discussed this setting in our group: iirc there’s a ring buffer of 160 previous repeated message hashes, and no repeater will repeat those again by default. So loop detection only comes into play after that. In practice it’ll ever only kick in on really busy dense meshes. We still set it on moderate though.



