code
Clone this repository
https://tangled.org/gdiazlo.tngl.sh/swim
git@tangled.org:gdiazlo.tngl.sh/swim
For self-hosted knots, clone URLs may differ based on your setup.
- Replaced Semaphore + Kcas queue with native Eio.Stream
- Removed unused try_acquire function
- Simplified implementation to ~20 lines
- Maintains thread safety and backpressure via Eio scheduler
- Add missing 'fmt' dependency
- Move test/benchmark dependencies (eio_main, qcheck, alcotest) to with-test
- Update version constraints to match environment (mirage-crypto >= 2.0, etc.)
- Remove unused eio_main from library link phase
- Add max_gossip_queue_depth to config (default 5000)
- Enforce limit in Dissemination.enqueue by dropping oldest items (ring buffer)
- Prevents unbounded memory growth when broadcast rate exceeds gossip bandwidth
- codec: avoid creating 2KB temp buffers for every piggybacked message in encode_packet
- types: replace Printf.sprintf with String.concat for User_msg encoding
- buffer_pool: remove unnecessary memset 0 on acquire (buffers are overwritten or viewed)