summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | dirmgr: Use new statuses() helper methodIan Jackson2022-06-221-21/+6
| | | | | | | | | | | | | | | | The two call sites become clearer, IMO.
| * | | dirmgr: DirBootstrapStatus: Provide statuses and entries_mutIan Jackson2022-06-221-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to use these in a moment. One returns entries and the other statuses simply because that's what's actually going to be wanted.
| * | | dirmgr: Remove a TODO commentIan Jackson2022-06-221-4/+0
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/587#note_2815945
* | | | Start a changelog for Arti 0.5.0Nick Mathewson2022-06-241-0/+88
| | | |
* | | | Merge branch 'error_cleanup_2' into 'main'eta2022-06-2424-162/+303
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Error refactoring: bytes, cert, proto. See merge request tpo/core/arti!604
| * | | | tor-proto: split and elaborate tor_bytes::Error instancesNick Mathewson2022-06-2314-55/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of these were for decoding particular objects (we now say what kind of objects), and some were unrelated tor_cert errors that for some reason we had shoved into a tor_bytes::Error. There is now a separate tor_cert::CertError type, independent from tor_cert's use of `tor_bytes::Error` for parsing errors.
| * | | | tor-proto: Split CellErr based on activity.Nick Mathewson2022-06-236-18/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failing to encode is fundamentally different from failing to decode. We now treat those separately, and describe _what_ we failed to encode or decode.
| * | | | tor-proto: clean up error names and messagesNick Mathewson2022-06-2312-85/+90
| | | | | | | | | | | | | | | | | | | | | | | | | This avoids adding additional information for now; that will come on the next commits.
| * | | | tor-bytes: Split EncodeError from ErrorNick Mathewson2022-06-233-8/+18
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there is currently only one error type that can occur when encoding, it doesn't make sense to use the full Error type here. This split will help us downstream, as we no longer need to categorize tor_bytes::Error as "an error in encoding or decoding". I considered renaming Error to DecodeError, but that had pretty huge downstream effects, and didn't seem to be worth it.
* | | | Fix a couple of typos in rustdoc comments.Nick Mathewson2022-06-242-2/+2
| | | |
* | | | Update README.md files from rustdoc.Nick Mathewson2022-06-245-127/+199
| | | |
* | | | Run cargo upgrade in preparation for release.Nick Mathewson2022-06-241-10/+10
| | | |
* | | | Merge branch 'tor-netdoc/use-base64ct' into 'main'Ian Jackson2022-06-234-14/+83
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Replace `base64` crate with `base64ct` crate in `tor-netdoc` See merge request tpo/core/arti!600
| * | | base64: Move some tests into a separate function, placating clippyIan Jackson2022-06-231-11/+15
| | | |
| * | | base64: Add yet more test casesIan Jackson2022-06-231-0/+17
| | | |
| * | | Add some more test cases for base64Arturo Marquez2022-06-221-0/+17
| | | | | | | | | | | | | | | | | | | | These tests are borrowed from other parts of the `tor-netdoc` crate.
| * | | Improve base64 testsArturo Marquez2022-06-221-1/+13
| | | | | | | | | | | | | | | | Request for changes: `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600#note_2816252`
| * | | Add link to upstream issueArturo Marquez2022-06-221-1/+3
| | | | | | | | | | | | | | | | As per request, here: `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600#note_2816252`
| * | | Remove unused `base64` crateArturo Marquez2022-06-212-2/+0
| | | |
| * | | Replace `base64` crate with `base64ct` crateArturo Marquez2022-06-214-11/+30
| |/ / | | | | | | | | | | | | | | | | | | Note: the `base64ct` crate rejects invalid characters when the decoding is done on padded strings. However, the `FromStr` impl for `B64` can have both padded **and** unpadded inputs, so all inputs are now padded first, before decoding.
* | | Merge branch 'error_cleanup' into 'main'Nick Mathewson2022-06-2228-81/+128
|\ \ \ | |/ / |/| | | | | | | | Error cleanup, part 1 See merge request tpo/core/arti!601
| * | fs-mistrust: convert Io error variant to a struct.Nick Mathewson2022-06-222-6/+18
| | |
| * | tor-cell: convert BytesErr to a struct variantNick Mathewson2022-06-224-7/+22
| | |
| * | tor-cell: error usefulness and style fixesNick Mathewson2022-06-226-17/+26
| | |
| * | Improve error messages in tor-checkable.Nick Mathewson2022-06-223-3/+5
| | |
| * | tor-socksproto: Style and info fixes in errors.Nick Mathewson2022-06-224-9/+16
| | | | | | | | | | | | | | | (The use of Cow<> in the error message isn't strictly necessary here, but it's a pattern I want to encourage.)
| * | Style fixes to tor-bytes errors.Nick Mathewson2022-06-221-5/+9
| | | | | | | | | | | | | | | Also note an issue with the design of tor-bytes::Error that should probably go in a separate MR.
| * | Style fixes to tor-protover errors.Nick Mathewson2022-06-221-3/+3
| | |
| * | tor-llcrypto: style fixes on BlindingErrorNick Mathewson2022-06-221-2/+2
| | |
| * | Style fixes to tor-units errors.Nick Mathewson2022-06-221-2/+2
| | |
| * | Style fixes to tor-events errors.Nick Mathewson2022-06-221-2/+2
| | |
| * | 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
| | | |