summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-config: style fixes on CfgPathError.Nick Mathewson2022-06-221-6/+6
| |
| * tor-config: Don't format source error as part of error messageNick Mathewson2022-06-221-2/+2
| | | | | | | | This is one I missed earlier.
| * Style fixes to retry-error error messages.Nick Mathewson2022-06-221-3/+3
| |
| * Style fixes to safelog errors.Nick Mathewson2022-06-221-3/+3
| |
| * Editorial improvements on fs-mistrust errorsNick Mathewson2022-06-226-24/+22
| | | | | | | | | | | | These changes make sure that the errors conform to our preferred style, and include a description of what exactly we were doing when something went wrong.
* | Merge branch 'display_source_cleanup' into 'main'eta2022-06-219-37/+38
|\| | | | | | | | | Do not include error source() in display() format. See merge request tpo/core/arti!598
| * Do not include error source() in display() format.Nick Mathewson2022-06-219-37/+38
| | | | | | | | | | | | | | | | | | According to doc/Errors.md, and in keeping with current best practices, we should not include display an error's `source()` as part of that error's display method. Instead, we should let the caller decide to call source() and display that error in turn. Part of #323.
* | Merge branch 'stalled_directory' into 'main'Ian Jackson2022-06-216-209/+593
|\ \ | | | | | | | | | | | | | | | | | | Detect and report stalled directory downloads Closes #468 See merge request tpo/core/arti!587
| * | Refactor DirStatus data structures.Nick Mathewson2022-06-211-74/+186
| | | | | | | | | | | | | | | | | | | | | AttemptId is now linked to DirStatus in StatusEntry. DirBootstrapStatus now has an inner enum to make invalid status unrepresentable.
| * | Make display formats work with older derive_more.Nick Mathewson2022-06-142-2/+2
| | |
| * | tor-dirmgr: Make DirStatus non-public.Nick Mathewson2022-06-143-5/+4
| | | | | | | | | | | | | | | I believe this type was made public in error: No other crate uses it, and no API exposes it.
| * | Report directory blockage problems from arti-client.Nick Mathewson2022-06-141-1/+16
| | | | | | | | | | | | Closes #468.
| * | Add a blockage-reporting mechanism to tor-dirmgr.Nick Mathewson2022-06-143-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `DirBootstrapStatus` type now exposes a blockage() method to return an `Option<DirBlockage>`. The blockage types reported are more low-level than I'd like, but they are IMO good enough for now: we'll want to get experience with actual vs hypothetical problems before we refine them.
| * | Add a couple of TODO items.Nick Mathewson2022-06-141-0/+7
| | |
| * | Do not update_progress on load if nothing happened.Nick Mathewson2022-06-141-6/+10
| | | | | | | | | | | | | | | If there was no partial information, then calling update_progress will now report a stall in this case, which is not what we want.
| * | DirMgr: Track errors, stalls, and resets as part of status.Nick Mathewson2022-06-134-3/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "reset" happens whenever we have to start a download attempt over -- either because we ran out of retries, or we found something wrong with the consensus after fetching certificates. An "error" happens when we have a recoverable error from one or more directory sources. A "stall" happens whenever a round of downloads or cache loads leads to no change in the status. We don't yet use this as part of our status reporting.
| * | Refactor our logic for distinguishing download attemptsNick Mathewson2022-06-133-85/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used the "if-modified-since" time associated with the consensus download, and/or the "valid-after" time in the consensus attempt, to put multiple attempts into sequence, and to tell one from another. But that approach was always a kludge, and will soon get more unreliable as the DirStatus logic gets a bit more complex. With this commit, we change separate download attempts to be identified with an AttemptId that increments whenever we decide to get a different directory from the one we have. IMO this new code is _much_ cleaner.
| * | Refactor most DirStatus users to use DirProgress.Nick Mathewson2022-06-134-71/+66
| | | | | | | | | | | | This is all crate-internal APIs, fortunately.
| * | Move `at_least_as_new_as` to DirProgress.Nick Mathewson2022-06-131-4/+18
| | |
| * | Turn the DirProgress in DirStatus into a named field.Nick Mathewson2022-06-131-52/+73
| | |
| * | Rename DirStatusInner to DirProgress.Nick Mathewson2022-06-132-38/+38
| | | | | | | | | | | | | | | | | | This is about to become only a _part_ of what defines a DirStatus: a DirStatus will also include a reset count, and some kind of info about how long we've gone without progress.
* | | Merge branch 'channel' into 'main'Ian Jackson2022-06-2118-98/+796
|\ \ \ | |_|/ |/| | | | | | | | Plumb channel padding timing parameters from netdir to tor-proto See merge request tpo/core/arti!586
| * | tor-chanmgr: Change to use unwrap_voidIan Jackson2022-06-213-8/+6
| | | | | | | | | | | | | | | As per discussion in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813573
| * | channel padding: Rename ChannelsParams from ChannelsConfig (rustfmt)Ian Jackson2022-06-212-2/+2
| | | | | | | | | | | | Consequential ordering changes.
| * | channel padding: Rename ChannelsParams from ChannelsConfigIan Jackson2022-06-217-98/+98
| | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2814276 Change names and comments and docs everywhere.
| * | channel padding: chanmgr: Clarify a commentIan Jackson2022-06-211-3/+3
| | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813574
| * | tor-proto: Have Channel::reconfigure throw ChannelClosedIan Jackson2022-06-211-2/+2
| | | | | | | | | | | | | | | Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813567
| * | tor-proto: err: Provide ChannelClosed as a separate unit errorIan Jackson2022-06-215-18/+38
| | |
| * | channel padding: Use IntegerMilliseconds in netdirIan Jackson2022-06-212-20/+18
| | |
| * | tor-netdir: Make CHANNEL_PADDING_TIMEOUT_UPPER_BOUND pubIan Jackson2022-06-211-1/+1
| | | | | | | | | | | | We need this because it is a type parameter for the types of nf_ito_*.
| * | channel padding: Use IntegerMilliseconds in padding::ParametersIan Jackson2022-06-215-20/+30
| | |
| * | tor-units: IntegerTimeUnit: Provide try_mapIan Jackson2022-06-211-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets a caller map the inner value, eg to convert the type. I don't provide `map` as well as `try_map` now, since I don't need it; we could add it later if it is desirable (although try_map can always be used instead). I was hoping to provide a `TryFrom` instead, but that necesasrily overlaps with the std conversion impl from IntegerMilliseconds<T> to IntegerMilliseconds<U> where T == U.
| * | tor-units: IntegerTimeUnit: Relax condition on TIan Jackson2022-06-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is semantically quite meaningful for these to contain something that isn't `TryInto<u64>`. (Of course the `Duration` conversion won't work without that.) Indeed, this condition was only applied to two out of the three types. Prompted by being near this code, but not actually necessary for anything I'm doing here.
| * | tor-units: IntegerTimeUnit: Provide as_time_unit deconstructorIan Jackson2022-06-211-0/+24
| | | | | | | | | | | | We're going to need this to use this in the padding timer parameters.
| * | channel padding parameters update: Drop a redundant cloneIan Jackson2022-06-211-1/+1
| | |
| * | channel padding: Change timeout to match C TorIan Jackson2022-06-211-1/+6
| | | | | | | | | | | | Pending an official value from the spec.
| * | Fix docs for `CtrlMsg::ConfigUpdate`Ian Jackson2022-06-211-5/+2
| | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813565
| * | Fix typoseta2022-06-212-3/+3
| | |
| * | channel padding: Test timeout updatesIan Jackson2022-06-212-1/+50
| | |
| * | tor-chanmgr tests: Add config_update tracking to FakeChannelIan Jackson2022-06-211-1/+7
| | |
| * | channel padding: Honour NetDir for timeoutsIan Jackson2022-06-211-3/+47
| | | | | | | | | | | | But padding is still not enabled by default.
| * | channel padding: Add the parameters from the spec to NetDirIan Jackson2022-06-211-0/+28
| | |
| * | channel padding: Plumb settings from chanmgrIan Jackson2022-06-219-27/+192
| | |
| * | channel padding: Introduce ChannelsConfig and reconfigure facilityIan Jackson2022-06-214-3/+242
| | | | | | | | | | | | Nothing geenrates config updates yet.
| * | chanmgr: inner (map): Reorganise to prepare for having more stateIan Jackson2022-06-211-14/+27
| | | | | | | | | | | | | | | | | | The main copy of the (global) configuration for the client's channels is going to have to live here, inside this mutex. So this really needs to become a struct with names fields.
| * | channel padding timer: Support reconfigurationIan Jackson2022-06-211-4/+15
| | | | | | | | | | | | Nothing calls this yet.
| * | channel padding timer: Allow creation without providing parameters yetIan Jackson2022-06-212-16/+32
| | | | | | | | | | | | It turns out that we are going to want this.
| * | channel padding: Test creation in disabled stateIan Jackson2022-06-211-0/+12
| | | | | | | | | | | | | | | We're about to split the main new() function off so write a separate test for new_disabled().
| * | channel padding: Make Parameters a pub struct with builderIan Jackson2022-06-214-3/+16
| | | | | | | | | | | | chanmgr is going to want to make one of these from a NetDir.
| * | tor-chanmgr: tests: Have unwrap_open return a (mut) referenceIan Jackson2022-06-211-2/+2
|/ / | | | | | | | | This avoids confusing bugs where you try to modify the result and nothing happens!