Repository navigation
Define the time filter algorithm in the spec - #303
Open
maximmaxim345 wants to merge 8 commits into
Open
maximmaxim345 wants to merge 8 commits into
maximmaxim345 wants to merge 8 commits into
Conversation
# Conflicts: # README.md # messaging.md
# Conflicts: # README.md # messaging.md
kahrendt
reviewed
Oct 14, 2026
Matches the reference implementation change: Sendspin/time-filter#10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the time filter algorithm from the time-filter repository into Clock Synchronization, so the spec defines it directly instead of only linking to it.
The algorithm itself stays a MUST, like before. The parameter values are now a SHOULD, where before they were only the library's defaults. The burst strategy from the library README is now a MUST instead of a known-good baseline, with at least 8 messages per burst and at most 10 s between burst starts. Servers must not close the connection only because bursts are late, since a network stall can delay them.
The filter now ignores samples with a
max_errorof 0 or less, the same as the reference implementation:I dropped the
aiosendspinlink since it doesn't follow the burst pattern.Open question: Should the parameter values be a MUST?
The player sync accuracy floor is measured against the client's own filter, not the server clock, so a badly tuned filter can be compliant but out of sync. This PR makes the values a SHOULD, but I'm not sure that's the right level.
MUST:
sendspin-jsandsendspin-rsuse other values today.SHOULD (this PR):
No keyword, like before:
Implementations
Only
sendspin-cppmatches the reference everywhere:sendspin-cppsendspin-dotnetSendspinDroidmax_erroraiosendspinSsendspin-jssendspin-rs>=in the drift test, conversions refused above 0.2 driftmeasurementrounds halves away from zerosendspin-jsusesprocess_std_dev0.01,forget_factor1.1,drift_process_std_dev0,adaptive_cutoff2.0 and nomax_error_scale.sendspin-rsusesprocess_std_dev0.01,forget_factor1.001,drift_process_std_dev0,adaptive_cutoff0.75 and nomax_error_scale.Closes #293