| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
| |
The old names were somewhat inaccurate. (I would have considered
keeping and deprecating the old names, but we already have breaking
changes in tor-netdir.)
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
|
| |
|
|
| |
Part of #1166
|
| |
|
|
|
|
|
|
| |
The publisher is the only user of `hs_dirs_upload`. It turns out it
never actually uses the first element of the yielded `Item`s, so we can
simplify `hs_dir_upload` to only return the HsDir `Relay`s.
Part of #1166
|
| |
|
|
|
|
|
|
|
| |
The descriptor publisher uses this function to obtain the list of
relevant time periods. It will soon also need to know the `srv_lifespan`
associated with each time period, so we change this function to return
`HsDirParams`.
Part of #1166
|
| |
|
|
| |
Closes #1254.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The hsdir selection algorithm for uploads and downloads is different
enough to justify splitting `hs_dirs` into 2 different functions.
More specifically, when selecting the relays to upload a service's
descriptors to, the service's `hsids` need to be matched up with the
correct `ring` (using the time period) before applying `select_nodes` to
pick the replicas. This is not the case when downloading, because
for downloads select relays from the current ring.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The consensus includes a listing for clients and for relays,
saying which protocol versions are _required_ for participation on
the network, and which versions are _recommended_. We have been
parsing this, but not yet exposing it.
This commit adds accessors to expose it, since we'll need that in
order to create CircTargets for introduction points and rendezvous
points.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The explicit list of variant names, that needs to be kept in sync, and
is a test failure semver break hazard, is now gone.
All the necessary code is now generated automatically, and cannot be
wrong.
I want this because I find myself wanting to add a second
implementation of FlagEvent, for another type.
|
| |
|
|
|
| |
Previously this was a private method only visible from Relay, but now
we can use it on any two HasAddrs objects.
|
| | |
|
| |\
| |
| |
| | |
# Conflicts:
# crates/tor-netdir/semver.md
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This method will let users get the latest `NetParameters`, with
user-configured overrides, even if there is no current directory at
all.
Part of #528
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want the set of identities supported by a relay to be extensible
in the future with minimal fuss; we'd also like to make working
with these ID sets more convenient. To handle that, this commit
adds a new trait for "Something that has the same IDs as a relay"
and a new object for "an owned representation of a relay's IDs."
This commit introduces a similar trait for "Something with a list of
SocketAddr, like a relay has." There's no owned equivelent for
that, since Vec<SocketAddr> is already a thing.
Closes #428.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Over the years we've found that most callers who want a netdir want
what C Tor calls a "reasonably live" network directory: One that is
not expired by too much, or too far in the future. But a few want a
_strictly_ live directory: one that says it is valid now, with no
tolerances. And a few want _any_ directory, no matter how expired
it is.
This commit adds net methods to NetDirProvider to provide these
directories. I think that most use cases will want to explicitly
think about what kind of directory they want, so I've made `netdir`
the simplest method. I might remove `timely_netdir` by the end of
this branch; see TODO comments.
Part of #518.
|
| |
|
|
|
|
| |
There's no reason to enforce their being Fn closures, and allowing
them to be FnMut allows us to count which filters make us rejected
given relays.
|
| | |
|
|
|
Our own code is the only stuff that consumes NetDirProvider, and all
the code that consumes it wants it to be Send and Sync.
Making this change avoids our having to define a new function to
upcast Arc<dyn Foo> to Arc<dyn NetDirProvider + Send + Sync>.
|