<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-guardmgr/src/ids.rs, branch main</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=main</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2022-10-25T15:15:53Z</updated>
<entry>
<title>Convert guard samples to use ByRelayIds.</title>
<updated>2022-10-25T15:15:53Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-10-24T17:09:48Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3a994c32dc9a960736a00617a90be382fa4cfcd3'/>
<id>urn:sha1:3a994c32dc9a960736a00617a90be382fa4cfcd3</id>
<content type='text'>
This required a number of changes, which I've tried to document.
I've taken a conservative approach to modification, and I'm not
using any of the by_*_mut() functions (yet).  For cases which
potentially modify the whole set, I'm using into_values() and
collect() to ensure that it's re-indexed correctly, even though the
identities don't change.

I introduce some "TODO pt-client" comments here which I will resolve
in the next commit(s).
</content>
</entry>
<entry>
<title>impl HasRelayIds for GuardId.</title>
<updated>2022-10-25T13:23:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-10-24T15:20:11Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8528d61a78124d3aca7582349941cca5e6db5c1e'/>
<id>urn:sha1:8528d61a78124d3aca7582349941cca5e6db5c1e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>guardmgr: Hold FallbackDir in fallback::set::Entry</title>
<updated>2022-10-21T13:21:43Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-10-20T13:53:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=fa1d2f453ade3c927ab71e14fc485396763b81f2'/>
<id>urn:sha1:fa1d2f453ade3c927ab71e14fc485396763b81f2</id>
<content type='text'>
This resolves an old TODO, and will simplify our work a little.
</content>
</entry>
<entry>
<title>guardmgr: Add bridges sample, encode sample ID in FirstHopId.</title>
<updated>2022-10-21T13:21:43Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-10-19T21:40:17Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=19fdf196d89e670f3487caa756a8194076f9226b'/>
<id>urn:sha1:19fdf196d89e670f3487caa756a8194076f9226b</id>
<content type='text'>
The most important part of this commit is to make sure that each
`FirstHopId` includes the `GuardSetSelector` from which the guard
was selected.  Doing this lets us be certain that when we report
that a guard has succeeded or failed, we're reporting it in the
right context.

Additionally, this commit uses strum to make an iterator over the
samples, so that we can make sure that our "for each sample" code is
robust against future changes, and we don't miss the bridge sample.
</content>
</entry>
<entry>
<title>tor-linkspec: Remove the old OwnedFoo::new() functions</title>
<updated>2022-10-06T19:13:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-10-05T18:08:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=299ebd729d697cde69dc720e358abf933af2a054'/>
<id>urn:sha1:299ebd729d697cde69dc720e358abf933af2a054</id>
<content type='text'>
These are now builders.
</content>
</entry>
<entry>
<title>Make sure all HasRelayIds constaints allow ?Sized.</title>
<updated>2022-08-10T14:39:47Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-05T16:53:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6dc8b1af20ce25d37fee53ff0ec2997a7d96929c'/>
<id>urn:sha1:6dc8b1af20ce25d37fee53ff0ec2997a7d96929c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Final (?) API revisions for tor-linkspec</title>
<updated>2022-08-10T14:39:37Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-05T15:47:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2d4507ff35f8e8cf874c81d3754804b2c20f31aa'/>
<id>urn:sha1:2d4507ff35f8e8cf874c81d3754804b2c20f31aa</id>
<content type='text'>
With this change, each individual identity type becomes optional.
The functions that expose them unconditionally are now in a "legacy"
trait that only some downstream types are expected to implement.

There are new convenience APIs in HasRelayIds:
  * to return Option&lt;&amp;keytype&gt;,
  * to see if one identity-set contains another.

This commit will break several downstream crates!  For the
reviewer's convenience, I will put the fixes for those crates into a
series of squash! commits on this one.

tor-netdir
----------

Revise tor-netdir to accept optional identities.  This required some
caveats and workarounds about the cases where we have to deal with a
key type that the tor-netdir code does not currently recognize at
all.  If we start to add more identity types in the future, we may
well want more internal indices in this code.

tor-proto
---------

In order to make tor-proto support optional identities, there were
fewer changes than I thought.  Some "check" functions needed to start
looking at "all the ids we want" rather than at "the two known IDs";
they also needed to accommodate that case where we don't have an ID
that we demand.

This change will also help with bridges, since we want to be able to
connect to a bridge without knowing all of its IDs up front.

The protocol currently _requires_ the two current ID types in some
places. To deal with that, I added a new `MissingId` error.

I also removed a couple of unconditional identity accessors for
chanmgr; code should use `target().identity(...)` instead.

tor-chanmgr
-----------

This is an incomplete conversion: it does not at all handle channel
targets without Ed25519 identities yet.  It still uses those
identities to index its internal map from identity to channel; but
it gives a new `MissingId` error type if it's given a channel target
that doesn't have one.

We'll want to revise the map type again down the road when we
implement bridges, but I'd rather not step on the channel-padding
work in progress right now.

tor-guardmgr
------------

This change is mostly a matter of constructing owned identity types
more sensibly, rather than unwrapping them directly.

There are some places marked with TODOs where we still depend on
particular identity types, because of how the directory protocol
works.  This will need revisiting when we add bridge support here.

tor-circmgr
-----------

These changes are just relatively simple API changes in the tests.
</content>
</entry>
<entry>
<title>guardmgr: Avoid a case of using HasRelayIds key methods.</title>
<updated>2022-08-02T18:33:32Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-02T18:33:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6ee95351267e9006ff2c5829059c87e03587815d'/>
<id>urn:sha1:6ee95351267e9006ff2c5829059c87e03587815d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>guardmgr: Replace IdPair with RelayIds</title>
<updated>2022-08-02T16:40:57Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-07-26T14:19:12Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2d32a4602b3cfc9445fd9f4c2a864ee724f0f9c4'/>
<id>urn:sha1:2d32a4602b3cfc9445fd9f4c2a864ee724f0f9c4</id>
<content type='text'>
I believe that this was the original motivation behind #428.
</content>
</entry>
<entry>
<title>Use derive_more to derive AsRef.</title>
<updated>2022-03-30T14:41:40Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-03-29T19:16:35Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=df3c51c8a0429b22b0ea62dbb356aff3f97de257'/>
<id>urn:sha1:df3c51c8a0429b22b0ea62dbb356aff3f97de257</id>
<content type='text'>
</content>
</entry>
</feed>
