| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
This fixes a `clippy::large_enum_variant`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A CircId is now a circ_id and a UniqId is a unique_id so we stop
confusing them in the code.
Furthermore, channel_id that are CircId are now circ_id. Channel IDs are
different and encoded internally into a UniqId.
This is the first step to clarify semantic before we change the logging
to log both unique ID and circ ID.
No behavior change.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
`RawCellStream` was removed long ago, in
c559754116678866eabe525f5b189b50cc78b5cc.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously when initializing a stream, we constructed most of the
stream-related queues outside of the reactor and passed the relevant
halves of the queues (senders or receivers) into the reactor.
A downside of the above approach is that the reactor may be better
informed about what queues to construct, and how to construct them. For
example the reactor knows what type of flow control that the hop is
using, so it knows whether we need queues for passing rate limits and
drain rates for XON/XOFF flow control.
This commit moves the construction of these queues into the reactor and
passes the relevant halves out of the reactor. In the future we can make
better decisions about which queues are needed depending on the flow
control method used instead of always constructing them (see arti#2068).
Reviewing with `--color-moved` might be helpful as a few lines have been
moved.
|
| |
|
|
|
|
|
|
|
| |
This will make it possible to tell whether a path has been replaced
in the tunnel.
Since the UniqId type might change its representation in the future,
I've documented that we don't guarantee anything about the strings
used to distinguish paths.
|
| | |
|
| |
|
|
| |
This will soon be used by the relay tests too.
|
| | |
|
| |
|
|
| |
This will be needed for the relay circuit reactor tests.
|
| |
|
|
| |
We'll soon need this for the relay reactor tests too.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Replace circuit-scoped `CircSyncView` with per-hop alternative
Closes #2351
See merge request tpo/core/arti!3680
|
| | |
| |
| |
| | |
And update the docs
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note: this commit only contains the removal of the old `CircSyncView`,
and it of course doens't compile. A future commit will replace the
removed file with the `syncview.rs` from the client module.
This change is split over two commits because it makes reviewing easier
(`git mv`ing the new file over the old results in a confusing diff,
because `git` refuses to show it as a move).
|
| | |
| |
| |
| |
| | |
This will soon replace `CircSyncView` wholesale. The preliminary
renaming will make the future diffs easier to review.
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 04ab3cd848d7977baf58dd64ebfcad6aa54ecb17.
Reverted because we no longer need to "peek" into the opaque
`CircChanMsg` of a circuit reactor: now the implementation-dependent
part of the reactor is in charge of handling the channel messages,
and extracting `Relay` objects out of RELAY/RELAY_EARLY cells,
which then get processed in the base reactor.
|
| |
|
|
|
|
|
|
|
| |
This will be used in a future commit, inside the new generic circuit
reactor.
We need it because RELAY cells are handled very similarly, so we need
some way of finding out if a given generic chancell is actually a RELAY
cell that we can handle in an implementation-agnostic way.
|
| |
|
|
|
| |
This will be used in the stream reactor too (and the stream reactor will
eventually replace the corresponding client impl).
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Move the client specific unit tests into the client module.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the CircuitRx* based solely on the client circuit
message and moves it into the top level of the crate so all reactors can
use them.
The client reactor then upon receiving the message, it converts the
AnyChanMsg into a ClientCircChanMsg. On error, this leads to a shutdown
of the entire reactor due to a fatal error.
In order to pull this off, we added a CircuitAction::Shutdown that is
handled as a priority.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
Next commit will also move the Relay specific set into the relay module.
These two sets are becoming specific to the reactor as the circuit
reactor communication channel will use AnyChanMsg instead.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| | |
|
| |
|
|
| |
This is part of an implementation for proposal 368.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
| |
Possible fix for #2232.
|
| |
|
|
|
|
|
|
|
| |
Unlike assert!(matches!(..)), assert_matches prints the value of the
expression on a failure.
Probably we should use this macro more widely in the future.
This might help diagnose recurrences of #2232
|
| | |
|
| |
|
|
| |
These will be shared with the relay code.
|
| | |
|
| | |
|
| |
|
|
| |
Closes #2067.
|
| |
|
|
|
| |
Some of these are relay-specific, so it makes more sense to pull this
into a top-level module.
|
| |\
| |
| |
| |
| | |
proto: Move flow_ctrl module under stream.
See merge request tpo/core/arti!3335
|
| | | |
|
| | |
| |
| |
| | |
This will be used by exits too, so I am moving it out of `client`.
|
| |/
|
|
|
|
|
| |
Everybody should use create_firsthop() and extend(), and let
tor-proto decide which handshake is best.
Closes #1990.
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Remove half-streams when they expire.
Closes #264
See merge request tpo/core/arti!3267
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This tests that the half-stream expiry works as expected.
Note: it doesn't! This test currently fails, because there's a bug in
the way half-streams are expired. Because we don't do it on a timer, and
instead garbage-collect the half-streams on each reactor iteration, if
the reactor is stuck long enough `.await`ing a message on one of its
channels (for example, the `input` one), there is a chance it will
accept a cell on a half-stream that should've been expired.
A future commit will fix this bug.
|
| | | |
|