<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-circmgr/src/preemptive.rs, branch derive-traits</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=derive-traits</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=derive-traits'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2021-12-20T19:27:55Z</updated>
<entry>
<title>preemptive.rs: Use Instant::checked_add instead of raw subtraction</title>
<updated>2021-12-20T19:27:55Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2021-12-20T19:27:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=091065454e86b81052689bd2ba704045f86694ad'/>
<id>urn:sha1:091065454e86b81052689bd2ba704045f86694ad</id>
<content type='text'>
The implementations of `Add` / `Sub` (et al.) on `std::time::Instant`
can panic if the underlying OS structure can't represent the result
(like arti#266). Use Instant::checked_add and print a warning instead,
to prevent panicking.

Also, we now add instead of subtracting; I suspect it's reasonable that
you might not be able to go backward past the first `Instant` created on
some platforms, but going *forward* should probably work?
</content>
</entry>
<entry>
<title>Minor circuit predictor tweaks and comments.</title>
<updated>2021-12-07T21:48:09Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2021-12-07T21:48:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=cac4ce759e70700a13ad75cf2eb1c3e2234cf4c1'/>
<id>urn:sha1:cac4ce759e70700a13ad75cf2eb1c3e2234cf4c1</id>
<content type='text'>
Most notably, make min_exit_circs_for_port actually get used.

Also add a couple of comments.
</content>
</entry>
<entry>
<title>Make preemptive circuits reconfigurable.</title>
<updated>2021-12-07T21:42:58Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2021-12-07T21:42:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0f8d6207578e6fabd8470df7745bfb7c342cf408'/>
<id>urn:sha1:0f8d6207578e6fabd8470df7745bfb7c342cf408</id>
<content type='text'>
This required re-centralizing the configuration object for preemptive
circuits, since previously the settings from it were a bit spread out
over the crate.
</content>
</entry>
<entry>
<title>Allow configurability on preemptive circuits</title>
<updated>2021-12-07T15:04:41Z</updated>
<author>
<name>Neel Chauhan</name>
<email>neel@neelc.org</email>
</author>
<published>2021-12-07T15:04:41Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0e9c2d274ef5a1f3a21579d43ced512f17656797'/>
<id>urn:sha1:0e9c2d274ef5a1f3a21579d43ced512f17656797</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add a semicolon.</title>
<updated>2021-11-30T20:43:21Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2021-11-30T20:43:21Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d3aecd5192cb18bd872c099fcf1c1da99cc38818'/>
<id>urn:sha1:d3aecd5192cb18bd872c099fcf1c1da99cc38818</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add tests &amp; address review commentary</title>
<updated>2021-11-30T16:58:08Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2021-11-30T16:09:38Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9a94f72e42ecfb7032de06784533aba6a5c8b61b'/>
<id>urn:sha1:9a94f72e42ecfb7032de06784533aba6a5c8b61b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Actually build preemptive circuits (and minor fixes)</title>
<updated>2021-11-29T14:47:09Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2021-11-29T14:47:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ca42139944ca7c4e6bc9a69c1639c2e89d417419'/>
<id>urn:sha1:ca42139944ca7c4e6bc9a69c1639c2e89d417419</id>
<content type='text'>
The new CircMgr::build_circuits_preemptively function actually causes
preemptive circuits to be built; it gets called from arti-client, like
the other daemon tasks the CircMgr has.
</content>
</entry>
<entry>
<title>Introduce PreemptiveCircuitPredictor and TargetCircUsage::Preemptive</title>
<updated>2021-11-23T16:37:52Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2021-11-23T16:37:52Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8a5a9575c6319f42f638e5bcdbc1ff2a4a186fe5'/>
<id>urn:sha1:8a5a9575c6319f42f638e5bcdbc1ff2a4a186fe5</id>
<content type='text'>
In preparation for making Arti build circuits preemptively, this commit
introduces `TargetCircUsage::Preemptive`, a circuit usage that works
somewhat differently from other ones: it requires at least 2 circuits to
exist that can exit the port it contains in order for an existing
circuit to match against it (path-spec.txt § 2.1.1); if that's not the
case, that usage will require building new circuits (in order that we
build enough to have 2 available).

This required refactoring how circuit reuse worked; now,
`CircList::find_open` uses the new `AbstractSpec::find_supported` trait
method, which we customize to implement the above check in the case of
`Preemptive` circuit usages. To make that work, `OpenEntry` now takes
two type parameters (the spec and circuit types), instead of taking a
builder type parameter and using its associated types. (We also got rid
of type constraints on that struct, yay!)

A WIP implementation of a preemptive circuit predictor that implements
path-spec.txt § 2.1.1 is also included, but this will require additional
effort to wire it up with the `CircMgr` properly.
</content>
</entry>
</feed>
