| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Suggestion from here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2407#note_3075481
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
deprecated
Incomplete is a better name.
This lets us use Truncated for the old, deprecated, conflation of
"Incomplete" with what is now "MissingData".
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Tidy up an error message. Now this can be on one line with variable
name interpolation.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Here we add the constructor, and document it, and change the call
sites.
No functional change yet.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Some tests in other crates test this, but none in tor-bytes!
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
We don't support this yet, see #727.
|
| | |/ / / /
|/| | | |
| | | | |
| | | | | |
As mentioned in #727, this is not supported yet.
|
| |\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug 1613: Add support for inserting externally generated and removing arbitrary service discovery keys
Closes #1613
See merge request tpo/core/arti!2396
|
| | | | | |
| | | | |
| | | | |
| | | | | |
remove_service_discovery_key methods
|
| | | |_|/
| |/| | |
|
| | |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
tor-hsservice: Improve descriptor publisher status reporting
Closes #1216 and #1572
See merge request tpo/core/arti!2397
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
netdirs (fmt).
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
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).
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
We never return `UploadError::Timeout` (timeouts are represented as
`BackoffError::Timeout`).
|
| | | | |
| | | |
| | | |
| | | | |
This type is a `Result`, renaming for clarity.
|
| | | | |
| | | |
| | | |
| | | | |
The descriptor publisher docs live in the `publisher` module.
|
| | | | |
| | | |
| | | |
| | | | |
Closes #1216
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This makes it clearer that some of these functions are essentially
infallible.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This enables us to report a "broken" service status if restricted
discovery is enabled but the authorized_clients list is empty.
|
| | | | |
| | | |
| | | |
| | | | |
Closes #1572
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, the `DegradedReachable` status is only reported by the the IPT
manager and `DegradedUnreachable` is unused.
Soon we'll the publisher reporting `DegradedReachable` or
`DegradedUnreachable` or `Running`, depending on how the descriptor
uploads went.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This will allows us determine the ComponentStatus of the publisher
(it'll be either `Running` or `Degraded`, depending on whether the
upload failed).
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
After uploading the descriptor, the publisher transitions into the
`Idle` state. This transition happens even if the upload was
unsuccessful, so it shouldn't cause the onion service status to become
`Running` (because `Running` implies the service is fully reachable, and
if the publisher failed to upload the descriptor to some or all HsDirs,
that won't necessarily be the case).
A future commit will set the publisher's onion svc `State` to
`Running`/`Recovering`/`Broken` according to the upload status.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This resolves a TODO.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, these were stored in the immutable state behind a mutex, but
since they're not really immutable (we update them if the config
changes), it makes more sense to put them in `State`.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
These TODOs were addressed a while ago (when we introduced
`IptManager::ipt_errors`).
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
These aren't dead code anymore, with the exception of
`PublisherStatusSender::send_recovering`, which isn't used.
|
| | | | |
| | | |
| | | |
| | | | |
We now log the onion service status on change.
|
| | | | |
| | | |
| | | |
| | | | |
This is already implemented.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This TODO was added in !2353 and was supposed to be about reporting a
broken/degraded onion service status if the restricted discovery config
watcher fails.
|
| | |_|/
|/| | |
|
| | | | |
|