| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
It was decided that the comparison chain was actually preferrable for
readability. So instead, we're just `allow`ing it until it stops being
a problem.
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a comparison chain in
`tor_proto::util::poll_all::test::ResolveAfter::poll` which was causing
a clippy warning. The lint in question, `clippy::comparison_chain`, was
a `clippy::style` lint in 1.85.1 and got moved to `clippy::pedantic` in
1.87.0 (see [rust-clippy!14219]).
Since some of us (like me) develop on MSRV, I'm fixing this lint now.
Gabi didn't have any strong opinions on whether I did it like this or
with an `allow` attribute, so I decided this was better since it means
we don't have to come back later just to remove the `allow`.
It should be noted that using a match like this can sometimes be a
performance regression (see [rust-clippy#5354] and [rust-clippy!6390]).
I would expect in this case the effect will be very little, if any, but
if tests in `tor_proto::util::poll_all::test` start taking much longer
and having an impact on CI or something, this could be why.
[rust-clippy!14219]: https://github.com/rust-lang/rust-clippy/pull/14219
[rust-clippy#5354]: https://github.com/rust-lang/rust-clippy/issues/5354
[rust-clippy!6390]: https://github.com/rust-lang/rust-clippy/pull/6390
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
| |
With this commit we now actually generate padding when we're told to.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
We no longer want to _ever_ block non-DATA cells, per discussion
in circuit-padding.md.
Closes #2190.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
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_3261239
|
| |\ \
| | |
| | |
| | |
| | | |
Migrate to waker noop
See merge request tpo/core/arti!3250
|
| | | | |
|
| | | | |
|
| | |/
|/| |
|
| |\ \
| | |
| | |
| | |
| | | |
Validate incoming padding, and permit it when it is valid.
See merge request tpo/core/arti!3241
|
| | |/ |
|
| |/
|
|
|
|
|
|
|
|
|
| |
Previously we would replace padding with any cell that was already
in the queue. But that doesn't make sense: If we have a cell queued
for hop 1, then we shouldn't use it as padding for hop 2, since hop
2 will never see it! Instead, we look at the target hops for the
already queued cells.
Ref:
- https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3225/diffs?commit_id=3998e0559fbcc06f8ea88968051cebca71489a52
|
| | |
|
| |
|
|
| |
Include suitable dire warnings about actually using it.
|
| | |
|
| |
|
|
|
| |
Explain how exactly its "you-must-poll-me" behavior relates to the
rest of the Sink ecosystem.
|
| | |
|
| |
|
|
|
|
|
|
| |
This type wraps a futures::Sink, and allows it to be temporarily blocked
and unblocked.
I'm going to use this to implement padding-based circuit blocking,
according to the designs in !3225.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the ChannelFrame<> for the entirety of the outbound client handshake
that is the ClientInitiator channel type.
With this change, the codec.rs code is not needed anymore along its
CodecError as well which has been normalized onto the crate::Error
instead in order to simplify error handling and avoid duplication of
error types.
Unit tests have been modified to reflect this change of what can be done
with a channel frame. Also renamed to focus on client behavior.
Part of #1597
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
To be able to return a crate::Error from the Decoded/Encoder trait, it
needs to implement this conversion.
Part of #1597
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
```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
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
An async notification channel.
This uses `postage::watch::{Sender,Receiver}` internally.
|
| |
|
|
|
| |
This is a `Writer` rate limiter which can receive rate limit updates
from a `Stream`.
|
| |
|
|
|
|
| |
Previously it did not behave correctly when `bucket.max()` was 0 (it
would sleep for 0 time instead of infinitely, triggering a debug
assertion).
|
| | |
|
| | |
|
| |
|
|
| |
The token bucket is now refilled before changing the rate.
|
| | |
|
| | |
|
| |
|
|
| |
The user now sets a constant amount of bytes to wait for.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
These will be used for sending the conflux handshake outcome to the
reactor user.
|
| | |
|
| |
|
|
| |
For readability
|
| |
|
|
|
|
|
|
|
|
| |
We will soon have a `ConfluxSet` type. Some of its operations will
return `Bug` (for example, the method for getting the *only* leg of the
conflux set will return a `Bug` if the set has no legs, or more than 1
leg).
This conversion function will make it easier these errors to
`ReactorError`.
|
| |
|
|
|
| |
We are about to use this in the circuit reactor (instead of
`pollish_send_unbounded`).
|
| |
|
|
|
|
|
|
|
| |
We also pass along congestion signals that may or may not be used by our
congestion control algorithm.
Part of #534
Signed-off-by: David Goulet <[email protected]>
|