Skip to content

Conversation

@jm-clius
Copy link
Contributor

@jm-clius jm-clius commented Oct 23, 2025

Add SDS-R into reliable channels as optional parallel or singular strategy for recovery.

There are three main design choices that need review here:

  1. SDS-R by default functions as a parallel mechanism to store retrieval: there is no lockstep mechanism where the one retrieval strategy serves as fallback if the other fails. This seems to me the most natural way of integrating SDS-R, after some consideration. In general, a reliable channels instance will attempt store retrieval after detecting a missed dependency without delay. SDS-R will kick in with some delay (generally min 30s). If by that point the missing dependency has been received (via relay or via Store retrieval), the pending repair will be removed from the buffer and never enter an SDS-R exchange. There is however a possible race condition that can cause a missing dependency to be requested (and retrieved) from a Store node and via SDS-R. This is not optimal, but I think a reasonable tradeoff for simplicity.

  2. Store retrieval can now be disabled completely, adding some configuration complexity i.t.o. retrievalStrategy ("store only", "sds-r only", "both", "none"). I'm not quite convinced this level of configurability is necessary, but there seems to be some use cases for a store-less reliable channel based on recent Discord discussions.

  3. SDS-R works better if the sync period is shorter, so I've added a simple adaptive strategy that triggers Sync more often if there are pending repair requests. This has an impact on bandwidth and message rates.

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 96.13 KB (-0.1% 🔽) 2 s (-0.1% 🔽) 599 ms (+33.77% 🔺) 2.6 s
Waku Simple Light Node 147.39 KB (-0.06% 🔽) 3 s (-0.06% 🔽) 553 ms (-12.08% 🔽) 3.6 s
ECIES encryption 22.62 KB (0%) 453 ms (0%) 175 ms (+1.84% 🔺) 627 ms
Symmetric encryption 22 KB (0%) 440 ms (0%) 447 ms (+141.95% 🔺) 887 ms
DNS discovery 52.17 KB (0%) 1.1 s (0%) 436 ms (+59.07% 🔺) 1.5 s
Peer Exchange discovery 52.92 KB (0%) 1.1 s (0%) 462 ms (+12.22% 🔺) 1.6 s
Peer Cache Discovery 46.64 KB (0%) 933 ms (0%) 740 ms (+75.31% 🔺) 1.7 s
Privacy preserving protocols 77.2 KB (-0.02% 🔽) 1.6 s (-0.02% 🔽) 969 ms (+79.44% 🔺) 2.6 s
Waku Filter 79.84 KB (+0.23% 🔺) 1.6 s (+0.23% 🔺) 868 ms (+53.39% 🔺) 2.5 s
Waku LightPush 77.94 KB (-0.02% 🔽) 1.6 s (-0.02% 🔽) 824 ms (+56.75% 🔺) 2.4 s
History retrieval protocols 83.61 KB (-0.07% 🔽) 1.7 s (-0.07% 🔽) 628 ms (-0.42% 🔽) 2.4 s
Deterministic Message Hashing 28.98 KB (0%) 580 ms (0%) 329 ms (-8.13% 🔽) 908 ms

@jm-clius jm-clius force-pushed the feat/sds-r-in-reliable-channels branch 2 times, most recently from 90fddd2 to 3ba50d4 Compare October 24, 2025 14:26
Base automatically changed from feat/sds-repair to master October 28, 2025 10:27
@jm-clius jm-clius force-pushed the feat/sds-r-in-reliable-channels branch from 3ba50d4 to 9d82564 Compare October 30, 2025 11:54
@jm-clius jm-clius marked this pull request as ready for review October 30, 2025 17:33
@jm-clius jm-clius requested a review from a team as a code owner October 30, 2025 17:33
@jm-clius jm-clius requested a review from fryorcraken October 30, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants