| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |\
| |
| |
| |
| |
| |
| | |
Refactor common code that builds circtargets for HS.
Closes #1223
See merge request tpo/core/arti!3530
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This code was duplicated across hsclient and hsservice.
Logically, it belongs in netdir, since that's where we have the
latest required-protocol information, and the ability to look up
relays by IDs.
Closes #1223
|
| |/
|
|
|
|
|
|
|
| |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
|
|
|
| |
Abolish the constants with the transitional names.
This also abolishes the controversial name `H_S_DIR`, which Rust case
transformation rules generated from `HSDir`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're going to separate RelayFlag from RelayFlags.
We could continue to provide a bunch of constant values for
RelayFlags, for each individual type, but that would involve an ad-hoc
derive, and would still be a bit of an unusual API.
Instead, we're going to make ``RelayFlag` a normal enum.
In this commit, we change everyone to refer to it by its singular
name. Hopefully separating out this bulk change makes both this, and
the core commit, easier to review.
|
| |
|
|
| |
I would do `#[deprecated]` but empirically that has no effect...
|
| |
|
|
|
| |
Add underscores so that the spec keywords and the flag constants
correspond (according to `paste`'s case-changing rules).
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
| |
We had two functions with different return types but identical
semantics. Replace them with one function returning `impl Iterator`.
Make it return owned addresses. These are small.
|
| |
|
|
|
|
|
|
| |
This will let us model the actual structure of routerstatus entries in
netdocs more closely. They don't have the addresses in a single list.
When this code was written this would have been much more awkward,
but now we have RPITIT.
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |\
| |
| |
| |
| | |
tor-proto,tor-netdir: add flow control consensus parameters
See merge request tpo/core/arti!3249
|
| | | |
|
| |/
|
|
|
|
|
|
| |
This is fine because we still default to non-cc circuits unless the
"flowctl-cc" feature is enabled. See `exit_circparams_from_netparams`
and `onion_circparams_from_netparams` from `tor_circmgr::build`, where
both will only call `build_cc_vegas()` if `cfg(feature = "flowctl-cc")`,
and otherwise call `build_cc_fixedwindow()`.
|
| |
|
|
|
|
|
|
| |
Replaced use of [`static_assertions::const_assert`] with the newly
available "assert in const" pattern. This completely removes the
dependency on `static_assertions` for `tor-netdir`.
Signed-off-by: hashcatHitman <[email protected]>
|
| | |
|
| |
|
|
| |
Now we only need one type.
|
| |
|
|
|
| |
Our approach to sharing code between md and plain consensuses is now
the new "variety" system, not generics.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This is much code motion.
This splits many types into two. For example, `Conensus` is
now`plain::Consensus<RS>` and `md::Consensus<RS>`.
We're going to get rid of the generics later in this branch.
|
| |
|
|
|
|
|
|
|
|
| |
```text
warning: duplicated attribute
--> crates/tor-hsservice/src/timeout_track.rs:630:14
|
630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
| |
The two main causes of errors were:
- Since some of the lifetime rules have changed, we no longer need
to do as many "bind a variable and immediately return it"
patterns, and so clippy now warns about them.
- We needed to adjust the explicit captures (`use<...>`)
in a couple of our RPIT instances.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds the three new parameters specified in Prop 362 [0].
Two of these replace hardcoded defaults in the code.
The third, HiddenServiceProofOfWorkV1ServiceIntroTimeoutSeconds, is not
implemented yet, but will be in a future commit.
[0]: https://spec.torproject.org/proposals/362-update-pow-control-loop.html
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Implement proposal 360 (limit HsDesc inflation opportunities)
Closes #2046
See merge request tpo/core/arti!3070
|
| | | |
|
| | |
| |
| |
| | |
(maxima are as amended in torspec!411)
|
| |/
|
|
| |
Made with https://crates.io/crates/typos-cli
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
|
| |
On one hand, this can be quite noisy when something *is* out of range.
On the other hand, a clamped value shouldn't normally happen, and is
likely to result in surprising and otherwise difficult-to-debug
behavior.
|
| | |
|
| |\
| |
| |
| |
| | |
tor-netdir: decrease minimum hsdir_interval from 30 to 5
See merge request tpo/core/arti!3042
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This matches the spec change:
<https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/406>
Progress on:
<https://gitlab.torproject.org/tpo/core/chutney/-/issues/40038>
|
| |/
|
|
|
|
| |
We will construct this object based on the circuit parameters _and_
on the target's supported protocol versions, so we need to do so
when we have both pieces of info.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we logged a warning whenever `choose_multiple_weighted`
returns `Ok(iter)`, whenever `iter` contains fewer relays than
requested.
However, this is expected behavior of `choose_multiple_weighted` if the
filtered list of relays doesn't have the requested number of relays, in
which case it should return all of the relays in the filtered list.
In particular, this condition occurs regularly in test networks when
looking for candidate relays to add to the potential guard set while
excluding those already in the potential guard set.
We still warn if the returned list is fewer than requested, *and* fewer
than available in the filtered list.
|
| |
|
|
|
|
| |
Since we don't know what kind of traffic we'll use a rendezvous
point for, we don't want to use it if it isn't "Fast" (reasonably
high bw) and "Stable" (unlikely to crash soon).
|
| |
|
|
|
|
| |
> The actual impact of this patch is to prevent usage of MiddleOnly
> relays as Introduction Points. The Rendezvous Point logic isn't
> hooked up yet - nick
|
| | |
|
| |
|
|
|
|
| |
Now that choose_multiple_weighted can once more return
fewer items than requested, we should warn when it does so,
to be consistent with our other cases of warning about #1907.
|
| |
|
|
|
|
|
|
| |
Rand 0.9.1 reverted the changes that caused #1903,
in https://github.com/rust-random/rand/pull/1623.
This broke our test that made sure that rand wasn't going to change
their behavior _again_ :)
|
| |\
| |
| |
| |
| | |
various crates: MSRV TODO standardization and cleanup of an old TODO
See merge request tpo/core/arti!2945
|
| | |
| |
| |
| |
| | |
- https://github.com/rust-lang/rust-clippy/issues/11764 was fixed upstream, so
this is no longer needed.
|
| | |
| |
| |
| |
| | |
This name reflects its purpose better than the original one,
since it includes required protocols as well as recommended ones.
|
| | | |
|
| | | |
|
| |/ |
|