<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src/circuit.rs, branch arti-v1.2.5</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.2.5</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.2.5'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2024-05-29T11:28:05Z</updated>
<entry>
<title>proto: Add a test for closing streams.</title>
<updated>2024-05-29T11:28:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-05-28T20:29:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e358e5f84f2fc4d80f56b8be221c6c23a7eae709'/>
<id>urn:sha1:e358e5f84f2fc4d80f56b8be221c6c23a7eae709</id>
<content type='text'>
This test verifies that when we invoke the code to close a stream,
an END message is actually sent.

The test comes in two versions:

* `drop_stream` closes the stream by dropping it.  It currently
  passes on main.
* `close_stream` closes the stream by running `AsyncWriteExt::close`
  on the writer.  It is a regression test for #1368.  It currently
  fails on main.
</content>
</entry>
<entry>
<title>proto: Improve documentation about DataStream lifetimes and closing</title>
<updated>2024-05-29T11:28:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-05-28T16:52:56Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=99dcd037aa81863da56180900e8b6f0aeb143f2d'/>
<id>urn:sha1:99dcd037aa81863da56180900e8b6f0aeb143f2d</id>
<content type='text'>
In particular, clarify that dropping the DataWriter on its own does
nothing unless the DataReader is also dropped.

Related to #1368.
</content>
</entry>
<entry>
<title>proto: Make DataWriter::close actually do something.</title>
<updated>2024-05-29T11:28:01Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-05-28T16:30:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6739f33781b957da7cb00128ba2eadc92dbabf72'/>
<id>urn:sha1:6739f33781b957da7cb00128ba2eadc92dbabf72</id>
<content type='text'>
Previously we had a bug where `&lt;DataWriter as AsyncWrite&gt;::close`
(or `shutdown` in tokio-land) would not actually have any effect.
It _would_ drop the `StreamTarget` held by the `DataWriter`, but
since the `DataReader` also held a `StreamTarget`, the
MPSC channel would not get closed, and the circuit reactor would
not realize that the stream wanted to shut down.

Now we use `mpsc::Sender::close_channel` to make our closes
effectual.

Closes #1368.

Additionally, we fix a bug where `poll_close()` never actually did
anything if the buffer had nothing in it when it was called.
Previously, `poll_flush_impl()` would exit immediately if it had no
data to flush.  That isn't what we want when we are closing!
</content>
</entry>
<entry>
<title>proto: Make Channel explicitly Arc&lt;.&gt;</title>
<updated>2024-05-16T16:24:12Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-05-16T15:51:41Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=822ff7b1ba21ed59b697aab45fd0b00f88479cef'/>
<id>urn:sha1:822ff7b1ba21ed59b697aab45fd0b00f88479cef</id>
<content type='text'>
Previously, Channel was a type that you could Clone that implicitly
its state.  Now, Channel always appears as an Arc&lt;Channel&gt;.

This change has several benefits:

  * It makes the relationship between Channel struct and the
    underlying channel more clear.
  * It enables Channel to participate in the RPC system,
    where everything has to be an Arc&lt;.&gt;
  * It enables us to have a Weak&lt;Channel&gt;, if we ever want to.
  * It will let us move various members out of ChannelDetails.

We did this change a while ago with ClientCirc.
</content>
</entry>
<entry>
<title>proto: Fix compilation with stream-ctrl but not experimental-api.</title>
<updated>2024-05-14T12:04:03Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-05-12T19:53:33Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e7d474345fe99a8c9203f90d70b5a5b236086be3'/>
<id>urn:sha1:e7d474345fe99a8c9203f90d70b5a5b236086be3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make filter conditional, to fix build with hs-service disabled.</title>
<updated>2024-03-26T16:55:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-03-26T13:13:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0f39aadd7e40bc8502d0fddd066ccc3a9f00163e'/>
<id>urn:sha1:0f39aadd7e40bc8502d0fddd066ccc3a9f00163e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename the old IncomingStreamRequestContext to StreamReqInfo.</title>
<updated>2024-03-26T16:55:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-03-26T12:51:46Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=500f7c562d0b28f3047fc5cee7cce34ee077517c'/>
<id>urn:sha1:500f7c562d0b28f3047fc5cee7cce34ee077517c</id>
<content type='text'>
(Doing this to prevent us having two structs with the same name.)
</content>
</entry>
<entry>
<title>Add an IncomingStreamRequestFilter to check early properties</title>
<updated>2024-03-26T16:55:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-03-20T15:39:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=25da33c91ccbd3ac266edf871925ee6a341d4729'/>
<id>urn:sha1:25da33c91ccbd3ac266edf871925ee6a341d4729</id>
<content type='text'>
Based on designs in #1124.

Note that there is a TODO here about a hack I had to do to appease
the borrow checker.
</content>
</entry>
<entry>
<title>We now need circuit::handshake to exist unconditionally.</title>
<updated>2024-03-26T15:43:43Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-03-20T18:07:18Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e29b6598173185bef13e9023ce0abf89224c782d'/>
<id>urn:sha1:e29b6598173185bef13e9023ce0abf89224c782d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor the logic for constructing crypt layers.</title>
<updated>2024-03-26T15:43:43Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-03-20T18:00:49Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9be8d835556f8d703a88693dd11888b41b851791'/>
<id>urn:sha1:9be8d835556f8d703a88693dd11888b41b851791</id>
<content type='text'>
The key insights here are:
 - That relay cell format and crypto protocols aren't orthogonal:
   Once we have GCO, it will require V1.
 - That we only need the actual functions for layer construction to
   be generic; we don't need to proliferate generic parameters
   everywhere.
 - That the circuit::handshake module already does most of what we
   want.
</content>
</entry>
</feed>
