| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| | |
Removed unnecessary lint
Closes #2556
See merge request tpo/core/arti!4210
|
| | | |
|
| | |
| |
| |
| | |
Removed unnecessary lint
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This disentangles the ReplyLog from the IptManager.
This will allow us to make the InternalPowError type more public (in
order to use it in the OnionServiceStatus code) without also having to
make the CreateIptError type more public.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
| |
This previously returned a &str for sort of unclear reasons, which was
only used in logging. Remove that.
|
| | |
|
| | |
|
| |
|
|
|
| |
These are the call sites where using this fucntion is correct.
(Outside tor-rtmock, which we'll do separately.)
|
| |
|
|
|
|
|
|
|
|
| |
Previously, arti's primary keystore was referred to as its "default"
keystore. However, "default" is inaccurate here: there is no way to
meaningfully override this "default" (the "default" store acts as the
main keystore). Throughout the codebase, we query all keystores for keys
(including the secondary ones), but only ever write to the
default/primary keystore. This is OK for now, because it enables us to
have one mutable keystore, and multiple secondary, read-only stores.
|
| |
|
|
|
|
|
|
|
| |
Currently, the `DegradedReachable` status is only reported by the the IPT
manager and `DegradedUnreachable` is unused.
Soon we'll the publisher reporting `DegradedReachable` or
`DegradedUnreachable` or `Running`, depending on how the descriptor
uploads went.
|
| |
|
|
|
| |
These TODOs were addressed a while ago (when we introduced
`IptManager::ipt_errors`).
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fixes #1212
|
| |
|
|
|
| |
This alphabetises the imports, ready for us to do some more manual
tidying.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Mark code with "TODO 504" and "TODO 789".
See merge request tpo/core/arti!1992
|
| | |
| |
| |
| |
| |
| |
| |
| | |
I've done this by looking for every non-test instance of pick_relays
or pick_n_relays, and for every non-test usage of any non-ID-related
method on Relay or UncheckedRelay.
Part of #504.
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
| |
We should be reporting all IPT errors, not just the ones coming from the
IPTs that are "current".
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1966#note_2996978
|
| | |
|
| |
|
|
|
|
| |
This will enable the `IptManager` to more accurately report its status.
Part of #1083
|
| |
|
|
| |
Closes #1083
|
| |
|
|
| |
Part of #1083
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The `IptManager` now reports its status as `Recovering` (with the
`latest_error` set to `IptError::FaultyIpt`) if it doesn't have enough
good IPTs to publish. Its status is `Degraded` if it has published some
IPTs, but needs to establish more.
Note: unconditionally setting `latest_error` to `IptError::FaultyIpt` is
not entirely correct. We will need to get the actual errors, if any,
from the `IptEstablisher`.
Part of #1083
|
| |
|
|
|
|
|
| |
The `OnionServiceStatus` API can now report errors coming from
`IptManager`.
Part of #1083
|
| |
|
|
|
| |
Since these are `*StatusSender` APIs, it seems more idiomatic to call
them `send*`.
|
| |
|
|
| |
Part of #1271
|
| |
|
|
|
|
|
| |
NB: `KeyMgr::remove_with_type` will need to be renamed to
`KeyMgr::remove_entry`.
Part of #1271
|
| |
|
|
| |
Part of #1271
|
| | |
|