| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
AuthCert is about to lose its copy of H(KP_auth_sign_rsa) so it needs
to return an owned value.
|
| |
|
|
|
|
|
| |
Previously, this value was stored in a u16. However, because this
number is usually always derived from some sort of list type, such as
`Vec`, it makes more sense to use usize for this, as it avoid
unnecessary casting and error checking.
|
| |
|
|
|
|
|
| |
On nightly, clippy now warns against this and recommends using a `match`
instead.
See https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
|
| |
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Part of #1885.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This commit implements proposal 330 in the context of `tor-dircommon`,
by replacing the single `Authority` structure used in a list context by
a single structure called `AuthorityContacts` which contains all
v3idents, upload, download, and vote endpoints in one central place.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit moves the `DirTolerance` structure from `tor-dirmgr` into
`tor-dircommon`.
|
| |
|
|
|
| |
This commit moves the `DowenloadSchedule` related types from
`tor-dirmgr` into `tor-dircommon`.
|
| |
|
|
|
|
| |
This commit moves `NetworkStatus` from `tor-dirmgr::config` to
`tor-dircommon::config` in order to start the work on a common place for
configuration options shared by both directory implementations.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit initializes the `tor-dircommon` crate: A crate serving the
purpose to form an umbrella for the lowest common denominator primitives
found across crates implementing (parts of) the directory specification.
For now, the only such primitive is the found within the `authority`
module, which has been refactored from `tor-dirmgr` into this crate,
alongside additional getter functions due to the lack of `pub(crate)` in
this context.
In the future, we may move further primitives away from `tor-dirmgr`
into `tor-dircommon`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
This resolves some nightly clippy warnings.
|
| | |
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
| |
- Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`.
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently clippy nightly is better (or worse?) about detecting
complex functions than before, so I'm suppressing these warnings
where they occur.
I have mixed feelings about these warnings: On the plus side,
they really do help to detect functions that are twistier than they
need to be. On the minus side, they get confused by tracing macros,
and the "allows" do pile up. But on the plus side, those "allows"
do provide a way to find functions that need to be refactored,
and they are never uglier than the functions they decorate.
|
| |
|
|
|
| |
This name reflects its purpose better than the original one,
since it includes required protocols as well as recommended ones.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
In the directory code, we have functionality to advance the
consensus download state whenever possible, even if there is more we
could download in the current state.
That's fine, but when we're in this position, we need to be sure
that we're taking any action based on the current state (such as
installing notably parameters or, notably, protocol recommendations)
before we move on.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
We want to store this separately from the consensus,
because we want to access it very early in our load-from-cache
process, without checking the consensus that contains it
for timeliness.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part of #1849.
Note that these functions are distributed across crates,
so that if (in the future) we stop doing API breaks
with every release, we will get the right outputs.
Note also that these functions build the list of protocols
out of specific symbolic features, rather than numbers:
this makes it easier to avoid errors about "which feature was
Relay=4 again", and easier to avoid accidentally referring to a
protocol that doesn't exist, like "Consensus" (should be "Cons")
or "HsDir" (case is wrong).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
```text
warning: doc list item overindented
--> crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9
|
322 | /// indicates that no more messages will be received for this request.
| ^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
note: the lint level is defined here
--> crates/arti-rpc-client-core/src/lib.rs:8:9
|
8 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]`
```
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
|
|
| |
I'm about to make our parsers reject some strings at construction
time, so it makes sense to have these functions become fallible.
This is a breaking change.
|
| |
|
|
|
|
|
| |
MockSleepProvider and MockSleepRuntime have been declared deprecated
by the docs for some time. We're about to mark them `#[deprecated]`.
This commit has been split out for clarity of review.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Here we move the responsibility for removing ExtDoc entries for
vanished blobs into the _caller_ of read_blob(): we want to tidy all
such entries in one go.
Unlike a (reverted) previous approach, this time we don't need a
retry loop.
|
| | |
|
| |
|
|
| |
We'll want to use this information to tell us whether to retry.
|
| |
|
|
| |
I'm about to add a retry mechanism.
|
| |
|
|
|
| |
We've already stopped ignoring any DB errors, so we may as well make
sure that any FS errors we encounter are also reported.
|