View on GitHub

noshtastic

a broadcast negentropy meshtastic nostr relay

Negentropy for Noshtastic: A Surprisingly Good Fit


1. Introduction: An Unlikely Match

When evaluating synchronization strategies for Noshtastic, I initially had doubts about whether negentropy would work in a broadcast network with constrained frame sizes. Negentropy was originally designed for a very different environment:

Given these differences, I assumed major modifications would be required to adapt negentropy to Noshtastic. However, early results have been surprisingly promising.


2. Modifying Negentropy for Noshtastic

To test the feasibility of negentropy for Noshtastic, I made a few key modifications:

Frame Size Adaptation

The rust-nostr/negentropy implementation requires 4KB frames. I modified it to support 200-byte frames instead, ensuring it still functioned correctly.

These modifications were implemented in a fork of rust-nostr/negentropy, controlled by a tiny-frame feature flag.

Rethinking the Client-Server Model

Traditional negentropy operates with a clear client-server distinction, where:

This model doesn’t fit Noshtastic, where nodes broadcast rather than communicate in strict pairs. I made several key changes:

These changes allow negentropy to function in a fully decentralized, broadcast-based environment.


3. Key Takeaways & Next Steps

While I initially expected negentropy to require heavy modifications, it has proven to be remarkably adaptable to Noshtastic’s needs.

What Works Well

⚠️ Challenges & Open Questions

Going forward, I’ll continue refining the approach and testing its scalability in real-world conditions.


← Back to Blog Index