summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | arti-client: Convert a note to a comment.Gabriela Moldovan2024-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This was supposed to be a comment, not part of the docs.
| * | | | | arti-client: Remove duplicated documentation.Gabriela Moldovan2024-09-121-42/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `TorClient` and `InertTorClient` have a number of identical state-management functions. This makes the `InertTorClient` link to the `TorClient` docs instead of duplicating them.
* | | | | | Merge branch 'reader-3' into 'main'Ian Jackson2024-09-1216-255/+413
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework tor_bytes::Truncated Closes #1614 See merge request tpo/core/arti!2407
| * | | | | | tor-bytes: Fix Truncated refs in various docs.Ian Jackson2024-09-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "throws" terminology to avoid having to clutter the description with Err(). Many of these doc comments contain otiose text such as "returns Ok(()) on success" but let's not deal with that now.
| * | | | | | tor-bytes: Rename OnIncomplete to Completeness (fmt)Ian Jackson2024-09-121-1/+1
| | | | | | |
| * | | | | | tor-bytes: Rename OnIncomplete to CompletenessIan Jackson2024-09-121-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And rename its variants and update the docs to contemplate wider use, as suggested in #1620. As discussed here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075658
| * | | | | | tor_bytes: Clarify a method docIan Jackson2024-09-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apropos https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075638
| * | | | | | tor_bytes: Rename new_truncated_for_test to new_incomplete_for_test (fmt)Ian Jackson2024-09-121-2/+8
| | | | | | |
| * | | | | | tor_bytes: Rename new_truncated_for_test to new_incomplete_for_testIan Jackson2024-09-124-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No semver implications since this wasn't in the last release.
| * | | | | | tor-bytes: Add test case for from_possibly_incomplete_sliceIan Jackson2024-09-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075486
| * | | | | | tor-bytes: Add note about other kinds of invalid messageIan Jackson2024-09-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075485
| * | | | | | tor-bytes: Add imprecations about Incomplete and MissingDataIan Jackson2024-09-111-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075483
| * | | | | | tor-bytes: Fix a doc comment about error reportingIan Jackson2024-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a leftover from before I invented Error::MissingData.
| * | | | | | tor-bytes: Do many missed renames of Truncated to IncompleteIan Jackson2024-09-113-9/+9
| | | | | | |
| * | | | | | tor-bytes: Add warning about sub-readers (adjust to new name)Ian Jackson2024-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix semantic conflict of the suggested edit with the rename later in the branch.
| * | | | | | tor-bytes: Add warning about sub-readersIan Jackson2024-09-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggestion from here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075481
| * | | | | | tor-bytes: Update semver.md. No compile-breaking changes, now.Ian Jackson2024-09-111-1/+2
| | | | | | |
| * | | | | | tor-bytes: Rename Truncated to Incomplete, and restore old Truncated as ↵Ian Jackson2024-09-115-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated Incomplete is a better name. This lets us use Truncated for the old, deprecated, conflation of "Incomplete" with what is now "MissingData".
| * | | | | | tor-bytes: Only report Truncated for errors at the outer level (fmt)Ian Jackson2024-09-111-2/+10
| | | | | | |
| * | | | | | tor-bytes: Only report Truncated for errors at the outer levelIan Jackson2024-09-114-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is item 1 from https://gitlab.torproject.org/tpo/core/arti/-/issues/1614#note_3074562 and the alternative to item 2 presented in the 2nd half of https://gitlab.torproject.org/tpo/core/arti/-/issues/1614#note_3074648 (Item 3 was done earlier, but now we change the behaviour.) Fixes #1614.
| * | | | | | tor-bytes: Error: provide and call Error::incomplete_error (tidy)Ian Jackson2024-09-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tidy up an error message. Now this can be on one line with variable name interpolation.
| * | | | | | tor-bytes: Error: provide and call Error::incomplete_error (fmt)Ian Jackson2024-09-112-8/+11
| | | | | | |
| * | | | | | tor-bytes: Error: provide and call Error::incomplete_errorIan Jackson2024-09-114-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce the new constructor and call it at the error generation sites. But there is still not yet any functional change. Change the type of Truncated's field to be Sensitive. The original reason for not doing this no longer applies, since we don't generally want to open-code construction of this variant. Conveniently, changing the type means we get to find all the sites where one *is* constructed and adjust them. In reader.rs and tor-proto we can just call incomplete_error. In tor-cell, there's a call site where we previously provided an underestimate, and where the Reader isn't available. We adjust that ad-hoc but this is fine because the error variant will change. (relaycell is using a Reader from from_slice.)
| * | | | | | tor-bytes: Add a Reader constructor for tor-socksproto's use caseIan Jackson2024-09-113-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here we add the constructor, and document it, and change the call sites. No functional change yet.
| * | | | | | tor-bytes: Add a test case with missing inner dataIan Jackson2024-09-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests in other crates test this, but none in tor-bytes!
| * | | | | | tor-bytes: Add a Reader constructor for use in testsIan Jackson2024-09-115-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We could call from_possibly_incomplete_slice in these, but that's confusing and distracting. Here we add this constructor, and document it (in terms of the constructor to come), and change the call sites. No functional change. Doing this now will prevent unwanted changes to test behaviours when we change the behaviour of Readers made by Reader::from_slice.
| * | | | | | tor-bytes: derive impl PartialEq for ErrorIan Jackson2024-09-112-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I just perpetrated a bug by adding a variant to this which ended up not PartialEq to itself. This open-coded match is a footgun. No functional change.
| * | | | | | tor-cell: No longer treat certain tor-bytes errors as EK::InternalIan Jackson2024-09-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't see a justification for this. Rather than updating this code for the new distinction between what is going to be Incomplete (ie, our buffer didn't contain enough data and we want to read more) and MissingData, I think we can just do away with it. Perhaps in the future, tor_bytes::Error would implement HasKind.
| * | | | | | Change tor_bytes::Readable name to `b` in many placesIan Jackson2024-09-115-160/+160
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The codebase uses `r` sometimes and `b` at other times. Making this consistent makes widespread changes easier, and is clearer for humans. I think `b` is better than `r` because `r` might be "return". It is indeed used that way in a couple of places in reader.rs, even. I haven't changed *everywhere*, just Readable impls (where `r` is particularly likely to be "return value") and occurrences in tor-bytes. No functional change.
* | | | | | tor-hsservice: Satisfy cargo fmt.Gabriela Moldovan2024-09-121-2/+0
| | | | | |
* | | | | | arti: Remove onion service anonymity setting.Gabriela Moldovan2024-09-121-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | We don't support this yet, see #727.
* | | | | | tor-hsservice: Remove the anonymity setting from the config.Gabriela Moldovan2024-09-124-26/+19
| |/ / / / |/| | | | | | | | | | | | | | As mentioned in #727, this is not supported yet.
* | | | | Merge branch 'bug_1613' into 'main'gabi-2502024-09-125-15/+231
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | Bug 1613: Add support for inserting externally generated and removing arbitrary service discovery keys Closes #1613 See merge request tpo/core/arti!2396
| * | | | arti-client: implemented insert_service_discovery_key and ↵Morgan2024-09-101-1/+168
| | | | | | | | | | | | | | | | | | | | remove_service_discovery_key methods
| * | | | tor-keymgr: add an overwrite flag to KeyMgr::insert()Morgan2024-09-104-14/+63
| | |_|/ | |/| |
* | | | tor-guardmgr: Convert a TODO into a NOTE.Gabriela Moldovan2024-09-101-1/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | This behavior is OK, so this doesn't need to be a TODO. See the discussion at https://gitlab.torproject.org/tpo/core/arti/-/issues/1352#note_3015217 Closes #1352
* | | Merge branch 'publisher-svc-status' into 'main'David Goulet2024-09-1019-176/+667
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-hsservice: Improve descriptor publisher status reporting Closes #1216 and #1572 See merge request tpo/core/arti!2397
| * | | tor-hsservice: Add tests for status changes induced by descriptor uploads.Gabriela Moldovan2024-09-091-1/+185
| | | |
| * | | tor-netdir: Allow access to the `ConsensusBuilder` when building test ↵Gabriela Moldovan2024-09-091-1/+6
| | | | | | | | | | | | | | | | netdirs (fmt).
| * | | tor-netdir: Allow access to the `ConsensusBuilder` when building test netdirs.Gabriela Moldovan2024-09-0911-31/+32
| | | | | | | | | | | | | | | | | | | | This allows us to set SRVs for example (needed because by default, the test `NetDir` is built from a consensus that doesn't contain any SRVs).
| * | | tor-hsservice: Include descriptor upload errors in onion service status.Gabriela Moldovan2024-09-091-9/+17
| | | |
| * | | tor-hsservice: Change the error type in Problem::DescriptorUpload.Gabriela Moldovan2024-09-093-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need to return a list of descriptor upload errors. We can't return a `Vec<RetryError<DescUploadError>>` here because `DescUploadError` is a lower-level error type that can't express that e.g. the upload timed out.
| * | | tor-hsservice: Remove unused UploadError variant (fmt).Gabriela Moldovan2024-09-091-3/+1
| | | |
| * | | tor-hsservice: Remove unused UploadError variant.Gabriela Moldovan2024-09-092-6/+2
| | | | | | | | | | | | | | | | | | | | We never return `UploadError::Timeout` (timeouts are represented as `BackoffError::Timeout`).
| * | | tor-hsservice: Rename UploadStatus to UploadResult.Gabriela Moldovan2024-09-091-4/+4
| | | | | | | | | | | | | | | | This type is a `Result`, renaming for clarity.
| * | | tor-hsservice: Remove outdated comment about publisher.Gabriela Moldovan2024-09-091-17/+0
| | | | | | | | | | | | | | | | The descriptor publisher docs live in the `publisher` module.
| * | | tor-hsservice: Fill out the missing descriptor publisher docs.Gabriela Moldovan2024-09-092-8/+66
| | | | | | | | | | | | | | | | Closes #1216
| * | | tor-hsservice: Return Bug where possible.Gabriela Moldovan2024-09-091-4/+4
| | | | | | | | | | | | | | | | | | | | This makes it clearer that some of these functions are essentially infallible.
| * | | tor-hsservice: Update docs with new status reporting logic.Gabriela Moldovan2024-09-091-12/+32
| | | |
| * | | tor-hsservice: Add basic tests for publisher status reporting.Gabriela Moldovan2024-09-092-4/+52
| | | |