| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| |
|
|
| |
This is part of #1254.
|
| | |
|
| |
|
|
| |
This will become useful later when we build a `HashSet` of `HsDirIndex`.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This makes `ring_items_at()` take an extra parameter which specifies
whether an item is acceptable or not. The newly added filtering
capabilities will be used to implement the part of the spec that says
that if a node was selected for a replica, then it shouldn't be
considered when choosing `spread` nodes for any other higher-numbered
replicas.
|
| |
|
|
|
| |
This updates the docs to reference the `spread` parameter (rather than
`spread_fetch`).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Debug two types as compact hex strings
See merge request tpo/core/arti!1104
|
| | | |
|
| |\ \
| |/
|/|
| |
| | |
tor-netdir: API changes to support hsconn hsdir fetch
See merge request tpo/core/arti!1094
|
| | | |
|
| | | |
|
| |/
|
|
| |
This eliminates an untyped `usize` index.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hidden services directory hashring is a ring of hsdir relays,
sorted by a hash that the spec calls the "index". That's `HsDirIndex`.
This was a bad idea because the word "index" is seriously overused,
but in Arti we must use the same terminology.
At least, qualify it everywhere. Now one of these hsdir sort position
hashes is always, in our code, an `hsdir_index`.
I think this is necessary even inside modules called `hsdir_*`,
because those can deal with other kind of "index" too.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
Deferred formatting changes which would have obscured the commits they
were prompted by.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This will enable us to pass these around more conveniently.
And make empty_from_params take an owned params, which it would like.
|
| |
|
|
|
| |
This was omitted in !1004. (Because this code isn't actually wired up
yet, it typechecked anyway. But we need to fix it.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This logic is a bit tricky, so I've tried to document it and add
fairly good tests. The silver lining is that the external API for
all of this logic will make it invisible and hidden.
There are some cases where I added functions that I think might
eventually get lowered into MdConsensus: But I don't want to lower
too much right now, since the convention for our netdoc accessors is
that they are fairly unsophisticated, and they show you the document
as it is.
Closes #686
|
| |
|
|
|
|
|
|
|
|
| |
* It is the NetDir's responsibility to tell the caller what the time
period is.
* There can be up to two secondary time periods.
* Each time period has a single SRV.
* Secondary time periods only apply for onion services, when they
publish.
* When publishing, the correct input is a time period.
|
|
|
These are a bit complex internally, but the API they present is
pretty simple. I've left some discussion of points where the design
isn't totally fleshed out, and where we need to look harder at the
spec.
Part of #716.
|