<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src, branch arti-v1.4.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-02-06T16:43:27Z</updated>
<entry>
<title>tor-proto: remove `use asynchronous_codec as futures_codec`</title>
<updated>2025-02-06T16:43:27Z</updated>
<author>
<name>Neel Chauhan</name>
<email>neel@neelc.org</email>
</author>
<published>2025-02-06T16:43:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4c45faf700ae3043cf0961407ccdb686de847ac8'/>
<id>urn:sha1:4c45faf700ae3043cf0961407ccdb686de847ac8</id>
<content type='text'>
Closes #1690.
</content>
</entry>
<entry>
<title>tor-proto: Make ControlHandler::handler return non-optional result.</title>
<updated>2025-02-06T13:33:05Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-02-05T17:37:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b4f9e5b9241d7eb762682a757a95af7db0f203ad'/>
<id>urn:sha1:b4f9e5b9241d7eb762682a757a95af7db0f203ad</id>
<content type='text'>
The commands for which the function returned `Ok(None)` have been
refactored into `CtrlCmd`, so we no longer need `handle()` to return an
`Option`.
</content>
</entry>
<entry>
<title>tor-proto: Turn some CtrlMsgs into CtrlCmds.</title>
<updated>2025-02-06T13:33:05Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-02-05T15:11:48Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=af9a154a4333685c20847cc83262a24a4cd3161e'/>
<id>urn:sha1:af9a154a4333685c20847cc83262a24a4cd3161e</id>
<content type='text'>
All `CtrlMsg`s to which the reactor did not respond by sending a cell
down the channel are now `CtrlCmd`s.

Most of this is code motion, best reviewed with `--color-moved`.
</content>
</entry>
<entry>
<title>tor-proto: Make shutdown a CtrlCmd.</title>
<updated>2025-02-06T13:33:05Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-02-05T15:11:48Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=558dc7d21199ed7b49f3351fe5fc4aa1de15e7c5'/>
<id>urn:sha1:558dc7d21199ed7b49f3351fe5fc4aa1de15e7c5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>proto: Fix feature gated import</title>
<updated>2025-02-04T16:08:43Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-02-04T15:16:57Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=577021c706f7f1fac36bdef8339279071d09ca32'/>
<id>urn:sha1:577021c706f7f1fac36bdef8339279071d09ca32</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Move the begin cell handling into CircHop</title>
<updated>2025-02-04T16:08:43Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-30T20:05:37Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a0afb6e2238ca644c9c5436bd538b429b831a6fa'/>
<id>urn:sha1:a0afb6e2238ca644c9c5436bd538b429b831a6fa</id>
<content type='text'>
Move the BEGIN cell handling into CircHop following the previous commit
that move more code into CircHop.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Move the close stream action into CircHop</title>
<updated>2025-02-04T16:08:43Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-30T19:32:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=da3400896e8ae9ea14bb16429cf0b1fbec8417a8'/>
<id>urn:sha1:da3400896e8ae9ea14bb16429cf0b1fbec8417a8</id>
<content type='text'>
This is the first commit of a series to make CircHop own the code of its
related actions.

This commit moves the "close stream" code into CircHop now owning the
action and offloading the Reactor code.

In order to do this, and future changes like for example handling BEGIN,
the CircHop needs to be aware of its hop number. This change also allows
us to add the hop number to logging. It also copies the reactor unique
ID to each hop for logging purposes.

Future commit will continue to move more code into CircHop.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Remove ConversationInHandler</title>
<updated>2025-02-04T16:08:43Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-30T18:44:52Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5a9b05e38881e3d227b929b0a2103e9d552cbf71'/>
<id>urn:sha1:5a9b05e38881e3d227b929b0a2103e9d552cbf71</id>
<content type='text'>
It is unused but most importantly it allows any RELAY cell to be sent
from anywhere in the code which is really not desirable because it is
skipping congestion control.

It also allows us to remove the `control_tx` from the reactor which is
one less channel to track/understand/think about.

This opens up the door to all sorts of problems especially side channel
that can be exploited if we are not careful.

We can always bring this back if we need it but for now, it is unused
and allows us to remove the `CtrlMsg::SendRelayCell` control message.

No code behavior change.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Introduce a reactor ControlHandler</title>
<updated>2025-02-04T16:08:43Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-30T18:27:39Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c7b2e1c2970532395dd4d5864de7bdb75434c8d3'/>
<id>urn:sha1:c7b2e1c2970532395dd4d5864de7bdb75434c8d3</id>
<content type='text'>
This object only mission is to handle a control message (CtrlMsg). It
encapsulates a reference to the reactor and its lifetime is only the
time it takes to handle the message.

Main goal of this is to try to reduce reactor.rs size into logical
containers.

No code behavior change.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>tor-proto: Ensure rx end of chan reactor output sink is not dropped in test.</title>
<updated>2025-02-03T11:30:41Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-02-03T10:41:14Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=164d6b4d6c5dca240866e92ce0e083fec8cc73c0'/>
<id>urn:sha1:164d6b4d6c5dca240866e92ce0e083fec8cc73c0</id>
<content type='text'>
This hopefully fixes #1832.

I haven't been able to repro the failure from #1832 locally, but judging
from the logs, I suspect it's triggered by interleavings like:

  - `extend_fut` executes up until `circ.extend_ntor(..).await`, where
    it's blocked `await`ing a completion notification from the circuit
    reactor
  - `reply_fut` starts running:
    * `CircuitExtender` installs a meta-handler in the circuit reactor,
      and waits for an `EXTENDED2` cell
    * `test_extend()` reads a cell from the receiving end of the fake
      channel's output sink (`rx`)
    * `test_extend()` sends the `EXTENDED2` cell to the circuit reactor
      over `CircuitRxSender`
    * `rx` is dropped
  - `reply_fut` completes
  - in the channel reactor's `run_once()`, `select_biased!` resolves
    to an error, because the receiving end of the `output` sink (`rx`) was
    dropped. The reactor logs `got sink error: SendError { kind:
    Disconnected }` (see [`SendError`]), and exits
  - the circuit reactor exits too, because the receiving end of its
    `chan_sender` (which was in the channel reactor) was dropped

Returning the `rx` of the fake channel's output sink from `reply_fut`
*should* stop it from being dropped, and fix #1832.

[`SendError`]: https://docs.rs/futures/latest/futures/channel/mpsc/struct.SendError.html#method.is_disconnected
</content>
</entry>
</feed>
