aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/congestion/rtt.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* tor-proto: rtt: return clock stall/jump status from `update()`Steven Engler2026-05-071-4/+13
|
* tor-proto: Port to web-time-compatNick Mathewson2026-03-261-3/+3
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* proto: Add an accessor for the max observed circ RTT.Gabriela Moldovan2025-09-161-0/+6
| | | | We will need this to calculate the END ack timeout.
* clippy: fix `clippy::duplicated_attributes` warningsSteven Engler2025-08-111-1/+0
| | | | | | | | | | ```text warning: duplicated attribute --> crates/tor-hsservice/src/timeout_track.rs:630:14 | 630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
* proto: Make RttEstimator::{ewma,min}_rtt_usec() return `Option`.Gabriela Moldovan2025-06-271-8/+6
| | | | | | | | | | A `None` value signals to the conflux code to know to fall back on the initial RTT of the circuit. Without this change, the conflux switching logic is broken as we end up staying on the leg with the best initial RTT forever (the other leg is never picked, because its `ewma_rtt()` is stuck on `u32::MAX`, and never updated as we never send on it).
* proto: Rewrite can_crosscheck_with_current_estimate for clarity.Gabriela Moldovan2025-06-251-1/+1
| | | | | | | The expanded expression makes it easier to see that `can_crosscheck_with_current_estimate()` can never return `true` if `self.ewma_rtt` is `None`, and that the `expect()` from `is_clock_stalled()` cannot panic.
* proto: Make RTT estimates default to None (fmt).Gabriela Moldovan2025-06-251-2/+6
|
* proto: Make RTT estimates default to None.Gabriela Moldovan2025-06-251-31/+48
| | | | | | | | | | The `RttEstimator` now uses `None` to represent not-yet-measured RTTs. Previously, all the measured RTTs defaulted to 0, in contradiction with the `RttEstimator::{min,ewma}_rtt_usec()` docs, which state that both functions are supposed to return `u32::MAX` if there is no estimate. Closes #2049
* fix: fix typosDimitris Apostolou2025-01-301-4/+4
|
* congestion: Use getters for all parametersDavid Goulet2025-01-161-4/+4
| | | | | | Allows us to remove the pub. Signed-off-by: David Goulet <[email protected]>
* congestion: Add standard clippy checks to testsDavid Goulet2025-01-161-0/+14
| | | | Signed-off-by: David Goulet <[email protected]>
* congestion: Make a test_utils.rsDavid Goulet2025-01-161-1/+2
| | | | | | | | Instead of having the congestion.rs test module public, make a test_utils.rs file that contains code for other unit tests within the congestion module. Signed-off-by: David Goulet <[email protected]>
* congestion: Remove duplicate RttParameters structDavid Goulet2025-01-161-39/+7
| | | | | | | Turns out that RoundTripEstimatorParams is the same exact thing so one less data structure. Signed-off-by: David Goulet <[email protected]>
* proto: Add generic objects for congestion controlDavid Goulet2025-01-161-0/+348
This commit adds the congestion window object, a round trip estimator (RTT) and a state enum. These 3 entities are used by congestion control in a generic way that is they are passed and used by any algorithm. At this commit, they are not used hence the allow deadcode attribute for now in order to minimize the build warnings. We also introduce the params.rs file containing the parameters, taken from consensus, used to configure these objects. They will be exposed to the tor-cirmgr crate to build the CircParameters. More will come. This also introduces the congestion/ directory that will contain more code in future commits. Related #534 Signed-off-by: David Goulet <[email protected]>