| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Network-health wants these to see whether a given relay is listed in
the consensus.
cc @juga
|
| |
|
|
| |
The function this comment is asking us to write is `circtarget_from_pieces`.
|
| |
|
|
|
|
| |
(Adding comments explaining that these errors are really
unlikely to occur, unless there is a bug in our code or in Rust's
time handling.)
|
| |
|
|
|
|
| |
This issue with walking over the ring is an issue we really must
solve on the services timeframe, as is the one about looking only at
the rings for which a blinded ID is germane.
|
| |
|
|
|
| |
This makes them configurable, since we allow the user to override
any consensus parameter.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This change reduces the cost of cloning a `NetDir`. It's fine
since–although we replace the HsDir once–we never modify it once it
exists.
Closes #883.
|
| |
|
|
|
|
|
|
| |
Apropos a question that arose on IRC, to which I felt the answer
wasn't 100% unambiguous.
Also, reference the usual implementation (it can't be a link because
it's an upward reference).
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Found by clippy nightly
|
| |
|
|
|
|
|
|
|
|
|
| |
This function will be used to look up a relay by a set of LinkSpecs
given from an incoming HsDesc or INTRODUCE2 message. It differs
from other "lookup relay by IDs" functions in that it needs to be
able to return "here's a relay", "couldn't found a relay", or
"learned that this relay is impossible."
Closes #855: This is the only new API needed for ChanTarget
validation, I think.
|
| |
|
|
|
|
|
|
| |
We'll probably need the hsdir list to be shuffled deterministically for
testing purposes (this might be desirable, for example, when we write a
test for HS descriptor download retries).
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
| |
lifetime configurable.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
| |
Now that we require a version of Rust that allows
`b.then_some(v)`, clippy complains about our use of
`b.then(|| v)`.
|
| |\
| |
| |
| |
| | |
Download HS descriptors
See merge request tpo/core/arti!1118
|
| | |
| |
| |
| | |
We'll add this later, about here.
|
| | | |
|
| | |
| |
| |
| | |
This is the HsDirIndex, not the Hs[Blind]Id.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this
cargo +stable clippy --locked --offline -p tor-netdir --features=hs-client --all-targets
I got this:
64 | use {hsdir_params::HsDirParams, hsdir_ring::HsDirRing, itertools::chain, std::iter};
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
| | |
| |
| |
| | |
Fixes a rustdoc warning.
|
| |/
|
|
| |
Fixes a rustdoc warning.
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1094#note_2891857
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Don't have it take the TP, so that the caller must call it multiple
times. Instead, have it return all the relevant relays.
|
| |
|
|
|
|
|
|
| |
I don't think the server-side support will want to explicitly call
current and then secondary. Rather, it will want to iterate over all
the relevant ones.
And fix the name, and add another comment about whether we need this.
|
| |
|
|
|
|
|
|
| |
Change its name to hs_* like we do with things at this layer.
But, it turns out, that at least for hs client connections to fetch
the descriptor, I don't seem to need to call it yet ? Maybe it's not
needed.
|
| |
|
|
|
| |
* Change its name to Hs* like we do with things at this layer
* Make the Upload variant cfg-conditional
|
| |
|
|
|
| |
Provide iter_for_op, by changing iter into iter_filter_secondary and
having a new entrypoint iter.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
There are too many things called "index" here. `idx` could be read to
mean the table index `RouterStatusIdx`, the hsdir hash `HsDirIndex`,
or an entry in some other one of these tables.
Here's, it's just the sequence number of the index in the test netdir.
Use `pos` for that. (`seq` would have been another possibility.)
|
| |
|
|
|
| |
This was removed in c3e74973b4201f71275d8cf4c0c954cfb8d0eba5
netdir: Use an even smaller rep for list of microdescs
|
| |
|
|
|
|
|
|
|
| |
This is an `IndexVec` key type. Some places used `idx`, some `rsi`,
some `rs_idx`.
Use `rsidx` for it everywhere, including in locals, function names,
and fields. `rsidx` is a compromise. `rsi` might be a bit opaque,
but we want a one-"word" name since it appears inside other names.
|
| |
|
|
| |
Fixes #756
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012#note_2876824
|
| | |
|
| | |
|
| |
|
|
|
| |
Deferred formatting changes which would have obscured the commits they
were prompted by.
|
| | |
|
| |
|
|
|
|
| |
* Provide an accessor for the HSDIR flag
* Provide a function for testing a relay for hsdir inclusion
* Provide an iterator on NetDir that returns the hsdirs
|
| |
|
|
|
|
|
|
|
|
|
| |
* Implement Netdir::compute_rings in terms of a new
HsDirRing::compute, that currently does nothing.
* Actually call Netdir::compute_rings (since now it doesn't panic).
* Make Netdir::compute_rings not be pub. We do this unconditionally,
rather than exposing the distinction between a netdir-without-hsdir
and a netdir-with-hsdir.
|
| |
|
|
|
| |
This already allows us to get rid of some duplication, and will be
useful more widely in a moment.
|
| |
|
|
|
|
|
|
|
| |
The file which contains this type is called hsdir_params.rs. We have
a general problem with slight confusion about when to includen "dir"
and when to include "ring".
Resolve this in favour of the rule now added to the module-level doc
comment.
|