<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src/circuit/reactor, 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-06T13:33:05Z</updated>
<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: 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: Rewrite circuit reactor run_once() loop to use select! (fmt).</title>
<updated>2025-01-29T14:40:27Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-28T19:21:20Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=1aeaefad0d2c07710e00ce0eb86843b8c4b06cdd'/>
<id>urn:sha1:1aeaefad0d2c07710e00ce0eb86843b8c4b06cdd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-proto: Rewrite circuit reactor run_once() loop to use select!.</title>
<updated>2025-01-29T14:34:58Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-28T15:09:33Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2eb09f4f925569e08cc54b69d4062a53d01bdfe1'/>
<id>urn:sha1:2eb09f4f925569e08cc54b69d4062a53d01bdfe1</id>
<content type='text'>
This rewrites the circuit reactor main loop to use `select_biased!` to poll
multiple futures simultaneously.

The new `run_once()`, like the old, first waits for an initial
`CtrlMsg::Create`. Then, it uses a `select_biased!` to poll the
`chan_sender` sink and shutdown channel for readiness.

When the channel sink is ready, we poll the `control` and `input`
channels like before, as well as the new `ready_streams` `Stream`
(`ready_streams` is a `futures::Stream` that replaces the previous
`send_outbound()` function).

Most of the implementation remains unchanged, except the `handle_input`,
`handle_cell` and `handle_control` functions no longer send anything on
the `chan_sender` channel. Instead, they may do some (synchronous)
processing, and send instructions for the remaining work that needs to
be done (for example, for writing the cell to the `chan_sender`
channel). These instructions are handled at the end of `run_once()`,
and are encoded in the `RunOnceCmdInner` enum.

What this change does **not** do:
  * the control channel *still* bypasses congestion control. We could
    fix this by making the various reactor functions send the
    `RunOnceCmdInner` commands to `run_once()` via a channel
    (instead of returning them). This would enable the reactor to stop
    reading the commands (except for handle `Sendme`, which would be
    handled separately) if it's blocked on congestion control.
</content>
</entry>
<entry>
<title>tor-proto: Use SendRelayCell within CtrlMsg::SendRelayCell.</title>
<updated>2025-01-29T14:26:27Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-28T17:54:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3ff6964d1653450e49b85aace526b9141aa711a9'/>
<id>urn:sha1:3ff6964d1653450e49b85aace526b9141aa711a9</id>
<content type='text'>
</content>
</entry>
</feed>
