<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-circmgr/src/impls.rs, branch arti-v1.4.3</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.3</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.3'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-04-23T18:36:28Z</updated>
<entry>
<title>circ: Remove CircParameters reference in call stack</title>
<updated>2025-04-23T18:36:28Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-22T16:35:17Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0c9b5c88c3b02250368ddd4606bacaf3eb387bad'/>
<id>urn:sha1:0c9b5c88c3b02250368ddd4606bacaf3eb387bad</id>
<content type='text'>
This avoids cloning the object and instead allows us to have a
CircParameters per hop on the circuit path. This will come handy with
congestion control where each hop might have different congestion
control parameters.

Part of #1817

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>squash! Upgrade rand dependency to 0.9.</title>
<updated>2025-03-18T16:09:44Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-03-18T13:01:31Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2f8993c22c2b86010e4fd8b5169ef0ab83f8c754'/>
<id>urn:sha1:2f8993c22c2b86010e4fd8b5169ef0ab83f8c754</id>
<content type='text'>
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
</content>
</entry>
<entry>
<title>circmgr: Remove the CircParameters build .expect()</title>
<updated>2025-01-16T14:16:01Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-15T15:46:15Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ea59eb5a2137a06dbe66f3034d247ff502d9232d'/>
<id>urn:sha1:ea59eb5a2137a06dbe66f3034d247ff502d9232d</id>
<content type='text'>
Instead, return an error and make all call site handle it.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>circ: Specialize the circparams from netparams function</title>
<updated>2025-01-16T14:16:01Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2025-01-15T14:41:07Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9e7f59968f7ed07d18b152d6730efa43fc15ae33'/>
<id>urn:sha1:9e7f59968f7ed07d18b152d6730efa43fc15ae33</id>
<content type='text'>
Congestion control parameters have specific values depending on the
circuit type. Instead of using a CircuitType, which is removed in this
commit, specialize the function in this case onion and exit.

This allows us to get rid of CircuitType and solely use TargetCircUsage
instead.

At this commit, we use .expect() on the Builder. Future commit will
remove this to return a Result in case of failure. Worth noting that we
don't expect one.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>circmgr: Modify CircParameters for congestion control</title>
<updated>2025-01-16T14:16:01Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2024-04-30T14:35:21Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5917b347fc726a23a83cc4251082acd6962218e8'/>
<id>urn:sha1:5917b347fc726a23a83cc4251082acd6962218e8</id>
<content type='text'>
The congestion control parameters are created from the consensus
parameters (netparams) and then put into the CircParameters object that
is then passed down the tor-proto crate.

Because different parameters are selected depending on the circuit type
(onion vs exit vs sbws), a CircuitType enum is introduced for the sole
purpose of being used to select the right parameters.

Related #534

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>CircMgr: Start writing tests.</title>
<updated>2024-10-03T12:56:16Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-09-24T19:54:46Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6454be10f160b9b4780aa0e807297afa41b5ca25'/>
<id>urn:sha1:6454be10f160b9b4780aa0e807297afa41b5ca25</id>
<content type='text'>
</content>
</entry>
<entry>
<title>CircMgr: Make CircMgr and HsCircPool generic over builder type.</title>
<updated>2024-09-24T13:45:21Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-09-16T16:35:37Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e6f0b59e595f5ab5bd8d58d3c6aab8dface9a851'/>
<id>urn:sha1:e6f0b59e595f5ab5bd8d58d3c6aab8dface9a851</id>
<content type='text'>
This will allow for testing, as the CircuitBuilder can be replaced with
a mocked version.

This did require moving some of what was in the CircuitBuilder impl into
the AbstractCircuitBuilder type, since Drop implementations can't be
specialized, but that's fine, as we'll probably be doing more of that in
the future anyways.
</content>
</entry>
<entry>
<title>tor-circmgr: Remove AbstractSpec and FakeSpec.</title>
<updated>2024-09-16T14:57:33Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-09-11T17:36:31Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a7d7933ffe86dd0f85f58f219860cd3e576aafdf'/>
<id>urn:sha1:a7d7933ffe86dd0f85f58f219860cd3e576aafdf</id>
<content type='text'>
AbstractSpec and FakeSpec actually make testing more difficult, since
they prevent using FakeBuilder in code that relies on the concrete
TargetCircUsage and SupportedCircUsage types. Removing them means
FakeBuilder can be used in more places, and also means that the test
code is closer to the real code, since TargetCircUsage and
SupportedCircUsage are now exercised directly in more tests.

This did require making one change to a test, which I think was
previously testing behaviour that was true for FakeSpec but not for the
real code:

The mgr::test::isolated test previously asserted that, in the case where
three circuits were requested, two with isolation and one without, the
non-isolated circuit would be shared with one of the isolated circuits.

This was allowed by the FakeSpec::supports function. However, in the
actual code, the path is as follows:

* AbstractCircMgr::get_or_launch
* AbstractCircMgr::prepare_action
* CircList::find_open
* AbstractSpec::find_supported
* abstract_spec_find_supported
* OpenEntry::supports
* SupportedCircUsage::supports
* StreamIsolation::compatible_same_type

StreamIsolation::compatible_same_type checks owner_type, which is
always zero for non-isolated streams and always non-zero for isolated
streams, meaning that a isolated stream will never be compatible with a
non-isolated stream. The seems like desirable behaviour, so I simply
modified the test to make four connections, two isolated and two not,
and checked that the isolated streams never share any circuits, and that
the two non-isolated streams use the same circuit. As far as I can tell,
this is the intended behaviour in the existing code.
</content>
</entry>
<entry>
<title>tor-circmgr: make `GuardMgr` mandatory</title>
<updated>2024-08-13T00:21:53Z</updated>
<author>
<name>Steven Engler</name>
<email>smengler3@gmail.com</email>
</author>
<published>2024-08-13T00:09:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=acf1e81bb8621ec322ebd56b89c47c28958d3bfb'/>
<id>urn:sha1:acf1e81bb8621ec322ebd56b89c47c28958d3bfb</id>
<content type='text'>
Functions that took `Option&lt;&amp;GuardMgr&gt;` now take only `&amp;GuardMgr`.

Three unit tests were removed that covered behaviour when no guard
manager was set.
</content>
</entry>
<entry>
<title>tor-circmgr: Remove addressed TODO.</title>
<updated>2024-04-05T11:16:11Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-03-22T18:52:02Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=50c68d3d95a4a550d245ca5f20005815c5107cbf'/>
<id>urn:sha1:50c68d3d95a4a550d245ca5f20005815c5107cbf</id>
<content type='text'>
This was addressed in !2046, but I forgot to remove the TODO.
</content>
</entry>
</feed>
