| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
|
| | |
| |
| |
| | |
This is one I missed earlier.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| |\|
| |
| |
| |
| | |
Do not include error source() in display() format.
See merge request tpo/core/arti!598
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Detect and report stalled directory downloads
Closes #468
See merge request tpo/core/arti!587
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
AttemptId is now linked to DirStatus in StatusEntry.
DirBootstrapStatus now has an inner enum to make invalid status
unrepresentable.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
I believe this type was made public in error: No other crate uses it,
and no API exposes it.
|
| | | |
| | |
| | |
| | | |
Closes #468.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
If there was no partial information, then calling update_progress
will now report a stall in this case, which is not what we want.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
This is all crate-internal APIs, fortunately.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
Plumb channel padding timing parameters from netdir to tor-proto
See merge request tpo/core/arti!586
|
| | | |
| | |
| | |
| | |
| | | |
As per discussion in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813573
|
| | | |
| | |
| | |
| | | |
Consequential ordering changes.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2814276
Change names and comments and docs everywhere.
|
| | | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813574
|
| | | |
| | |
| | |
| | |
| | | |
Addresses
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813567
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
We need this because it is a type parameter for the types of nf_ito_*.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
We're going to need this to use this in the padding timer parameters.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Pending an official value from the spec.
|
| | | |
| | |
| | |
| | |
| | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813565
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
But padding is still not enabled by default.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Nothing geenrates config updates yet.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
Nothing calls this yet.
|
| | | |
| | |
| | |
| | | |
It turns out that we are going to want this.
|
| | | |
| | |
| | |
| | |
| | | |
We're about to split the main new() function off so write a separate
test for new_disabled().
|
| | | |
| | |
| | |
| | | |
chanmgr is going to want to make one of these from a NetDir.
|
| |/ /
| |
| |
| |
| | |
This avoids confusing bugs where you try to modify the result and
nothing happens!
|