| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This will help us keep its members private from the rest
of sqlite.rs, and ensure that things are kept consistent.
(This violates rust formatting for clarity. I'll reindent after.)
|
| | |
|
| |
|
|
|
| |
This is in preparation for making it opaque from the rest
of the code, so that we can more easily reason about it.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This can only happen because of a bug or because of db corruption,
and we probably shouldn't ignore it.
|
| |
|
|
|
|
|
| |
Previously, we would leave the ExtDocs blob to expire on its own,
and it would hang out for up to a week.
Closes #1655.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Also, document that old values will be kicking around
for a little while.
Fortunately:
- Nothing actually looked at these values before.
- All elements in this table have an expiration date, so once a new
version of Arti has been running for a week or two, the old
erroneous values will go away.
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
| |
Fixes: #1691
|
| |
|
|
|
| |
`DirMgrConfig::update_from_config` uses the old value and not the new
value, so it should be reported using `Reconfigure::cannot_change`.
|
| | |
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |
|
|
|
|
|
| |
With this extension trait, we no longer need to construct
`CompoundRuntime` directly outside of tor-rtcompat. This in turn
will make it a little less painful when we have to add more generics
to CompoundRuntime.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-dirmgr: Return an error if storage is readonly and DB is missing/incompatbile.
Closes #1497
See merge request tpo/core/arti!2283
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
missing/incompatbile.
This fixes a bug in `SqliteStore`'s constructor: previously, it would
unconditionally try to create the missing database, even if it didn't
have write access. As a result, it was impossible to reliably start
multiple concurrent arti processes configured with the same (empty or
nonexistent) cache_dir, because many of them would fail with errors such
as
```
attempt to write a readonly database: Error code 8: Attempt to write a readonly database
```
Returning a `LocalResourceAlreadyInUse` error kind here enables us to
leverage the retry loop from `TorClientBuilder::create_unbootstrapped`
(which retries on local resource errors if `local_resource_timeout` is
set).
Closes #1497
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
| |
Sadly, rustc seems to want us to mark this allow in several places.
|
| |\
| |
| |
| |
| |
| |
| | |
dirmgr::storage: Treat a missing blob file as an absent object.
Closes #1466
See merge request tpo/core/arti!2200
|
| | |
| |
| |
| | |
SQL is case-insensitive, but it is still nice to be consistent.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch removes files from dir_blobs if they are not referenced
from the database, or if their filenames are not valid UTF-8.
(If they were not valid UTF-8, we wouldn't have put them in our
database.)
To ensure that there can't be any race conditions, we only do this
when the file is a bit old.
|