| 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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Remove half-streams when they expire.
Closes #264
See merge request tpo/core/arti!3267
|
| | |
| |
| |
| |
| | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3267#note_3259820
|
| | |
| |
| |
| |
| | |
This will enable us to pass the timeout estimator to the circuit reactor
in tor-proto.
|
| |/
|
|
| |
Closes #2174. See that ticket for rationale.
|
| |
|
|
|
|
|
|
| |
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-circmgr`.
Signed-off-by: hashcatHitman <[email protected]>
|
| | |
|
| |
|
|
|
|
| |
We're seeing the logic that resets the timeouts when 18/20 connections
fail not triggering when we're expecting it to, this logging may help
figure out what's going on there.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Now that our MSRV is 1.83, clippy is happy to make more
recommendations for us.
|
| |
|
|
|
|
|
| |
This commit adds an explicit type annotation to the learning_timeouts()
function, as leaving it out yielded an error while trying to compile
tor-circmgr in a project that had this crate deep down in its supply
chain.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Impose a maximum on our fallback estimated timeout
Closes #1693
See merge request tpo/core/arti!2842
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The fallback timeout is the one that we use when we have
insufficient data. We reset our observations, and maybe rebuild
our circuits, when we find that too many circuits have failed
recently. When we do so, we double our fallback timeout.
Previously we had no limit, which could lead to overflow (#1693).
In this commit we impose a maximum of 2 hours,
which is ridiculously high.
(C tor uses a maximum of INT32_MAX seconds, which is even more
ridiculously high.)
Closes #1693.
|
| |/
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
| |
This may help debugging #1792.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
clippy: Allow some of our existing code patterns
See merge request tpo/core/arti!1396
|
| | | |
|
| | | |
|
| |/
|
|
|
|
| |
Ideally we would be allowed to use vanilla gen_range() here, but there
doesn't seem to be a way to allow a specific clippy-forbidden method
using #[allow] and we probably don't want to make a blanket allow.
|
| |
|
|
| |
This simplifies our logging a little, and implements part of
|
| |
|
|
|
| |
Apparently 1.68 now warns when you call into_iter() on something
that's already an iterator. Fair enough. Let's stop doing that.
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
|
| |
This only affects uses of thread_rng(), and affects them all more or
less indiscriminately. One test does not work with
ARTI_TEST_PRNG=deterministic; the next commit will fix it.
|
| | |
|
| |
|
|
|
| |
Remove all `use` statements for `TryFrom` and `TryInto`. These are
now redundant in Rust 2021.
|
| |
|
|
|
|
| |
This edge-case was there even before the migration of
595fe1ab881b94106649, but now it's more explicit and ought to be
revisited.
|
| | |
|
| |
|
|
|
|
|
| |
This closes arti#256. It makes our behavior match Tor's more closely,
though it has a simpler implementation than Tor. I think that the extra
complexity in Tor's logic is because we used to record timeouts in
the histogram as well as in the success/failure log.
|
| | |
|
| |
|
|
|
| |
Our old algorithm could, on some inputs, exhaust RAM. That's not great,
since we try to be robust againt corruption to the state file.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Previously we used Duration::mul_f64, which panics if its output is
out-of-range. That shouldn't actually be possible for the values
we're giving it, but probably it's better to just multiply in a safe
way.
This resolves a couple of XXXXs and therefore relates to #231.
|
| | |
|
| |
|
|
| |
Also fix some commonwealth spellings that had slipped in.
|
| |
|
|
|
| |
Also add a comment about a possible problem behavior in read-only
estimators.
|
| |
|
|
|
|
|
|
|
|
| |
As per arti#175, we'd like to be able to handle newer Arti versions
storing additional state in the persisted state files, without dropping
this data on the floor when we write out changes to these files.
Use the #[serde(flatten)] mechanism to achieve this, by adding catch-all
HashMap<String, JsonValue> fields to all structs that are at risk of
this happening to them.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is a big change, but it does simplify the type of Builder a
little, and isolates locking across different (potential) timeout
estimator types.
|
| | |
|
| |
|
|
|
|
|
| |
There are some missing parts here (like persistence and tests)
and some incorrect parts (I am 90% sure that the "exploratory
circuit" flag is bogus). Also it is not integrated with the circuit
manager code.
|
| | |
|