summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | impl HasAddrs for PtChannelAddr and ChannelMethodIan Jackson2022-10-201-0/+29
| | | |
| * | | HasAddrs: Make it clear that the set of addresses can be emptyIan Jackson2022-10-201-1/+4
|/ / / | | | | | | | | | Eg, a PT bridge may not have an address.
* / / integration-shadow: "shadow-small" tag -> "tpa"Jim Newsome2022-10-191-1/+1
|/ / | | | | The "shadow-small" tag no longer exists, and all "tpa" x86-64 runners can now run Shadow. https://gitlab.torproject.org/tpo/tpa/team/-/issues/40833#note_2835576
* | Merge branch 'update-shadow-stop-time' into 'main'Nick Mathewson2022-10-191-4/+1
|\ \ | | | | | | | | | | | | shadow ci: Set stop time to 30m instead of 27m See merge request tpo/core/arti!772
| * | shadow ci: Set stop time to 30m instead of 27mJim Newsome2022-10-141-4/+1
| |/ | | | | | | | | This was a temporary stop-gap to work around a busy loop that seemed to happen before. I am no longer able to reproduce any such problem.
* | Merge branch 'guard_spelling' into 'main'Nick Mathewson2022-10-192-2/+2
|\ \ | | | | | | | | | | | | fix a couple of spelling errors in guardmgr See merge request tpo/core/arti!778
| * | fix a couple of spelling errors in guardmgrNick Mathewson2022-10-192-2/+2
|/ /
* | Merge branch 'spelling_20221008' into 'main'Nick Mathewson2022-10-188-12/+12
|\ \ | | | | | | | | | | | | Several spelling fixes. See merge request tpo/core/arti!777
| * | Fix various typos (using typos tool and hand-inspection)Nick Mathewson2022-10-187-10/+10
| | |
| * | linkspec: Fix typo in error messages.Nick Mathewson2022-10-181-2/+2
|/ /
* | Merge branch 'channel_map' into 'main'Nick Mathewson2022-10-1812-502/+778
|\ \ | | | | | | | | | | | | ChanMgr: Revise code to tolerate multiple identities See merge request tpo/core/arti!773
| * | chanmgr: Add an error case if a final_attempt neither succeeds or failsNick Mathewson2022-10-182-1/+11
| | | | | | | | | | | | | | | This can happen in weird corner cases, so it's probably best to report it rather than having an "internal error."
| * | Refactor flow control in get_or_launch.Nick Mathewson2022-10-182-54/+97
| | | | | | | | | | | | | | | | | | | | | Now, instead of duplicate checks in various cases, we simply go through the loop one last time. This allows us to simplify some of our other logic around here.
| * | chanmgr: Split get_or_launch into sub-functions.Nick Mathewson2022-10-181-92/+95
| | | | | | | | | | | | | | | This function had grown huge and hard to reason about. Before I make it even worse, let's split it up.
| * | chanmgr: Refactor choose_action code into its own function.Nick Mathewson2022-10-181-86/+92
| | |
| * | Clarify a comment about the desired structure of ChanMgrNick Mathewson2022-10-181-1/+2
| | |
| * | Comments to explain effects of return in closure.Nick Mathewson2022-10-181-2/+6
| | |
| * | chanmgr: Remove "Ident" from AbstractChannelNick Mathewson2022-10-185-84/+24
| | | | | | | | | | | | | | | Thanks to our previous changes, we no longer need this type, or the methods that access it.
| * | chanmgr: replace the HashMap<> with a ByRelayIds.Nick Mathewson2022-10-184-312/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary so that we can look up channels (open and pending) by all of the Ids that we know about them. The operations needed here are pretty complex: to get them right, I've replaced most of the accessors on the inner `ChannelMap` with a function that holds the lock while another `FnOnce` is called. This still gets us the invariant that we can't accidentally await while holding the lock on the `ChannelMap`. I've removed the tests for the accessors that are no longer there. There are some subtleties here. Now that we have more than one kind of Id, it's possible to have a partial match. I've tried to explain all these cases in the comments. }
| * | proto: Make Channel::reparameterize take &self.Nick Mathewson2022-10-182-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though channels are practically changeable, they use locks internally so that you don't need a `&mut Channel` to send or receive traffic. It makes sense for reparameterizing the channel to also use a &self reference. I'll need this so that I can store channels in an `ByRelayIds<>` set, and still invoke their reparameterize methods.
| * | chanmgr: Add identities to pending state in map.Nick Mathewson2022-10-182-8/+46
| | | | | | | | | | | | | | | This will let us migrate from `HashMap<Ed25519Identity, Entry>` to `ByRelayIds<Entry>`.
| * | chanmgr: Require HasRelayIds for AbstractChannel::BuildSpecNick Mathewson2022-10-182-24/+50
| | | | | | | | | | | | | | | | | | This is mostly a testing only change for now too, but soon I'll use it to deal with the fact that we need to know the IDs to actually build a channel at all.
| * | chanmgr: Require HasRelayIds for AbstractChannel.Nick Mathewson2022-10-182-1/+43
| | | | | | | | | | | | | | | This is mostly a testing-only change for now, but soon I'll use it so we can have IdMap for our channel map.
| * | chanmgr: Remove the Poisoned state from the map type.Nick Mathewson2022-10-182-48/+12
| | | | | | | | | | | | | | | | | | | | | | | | The `ByRelayIds` type doesn't have a type equivalent to `hash_map::Entry`, since it's a set type rather than a map type. Therefore, the only plausible way to do entry mutation will be to remove the old entry and insert a new one. And so, we no longer need a "poisoned" state.
| * | proto: Implement HasRelayIds for Channel.Nick Mathewson2022-10-182-0/+10
| | |
| * | linkspec: Add ByRelayIds::remove_exact.Nick Mathewson2022-10-181-0/+65
| | | | | | | | | | | | | | | We need a function to remove an entry if it appears with _exactly_ the same relay Ids, but not otherwise. This method will do that.
| * | linkspec: Add an "all_overlapping" accessor to ByRelayIds.Nick Mathewson2022-10-184-1/+124
|/ / | | | | | | | | | | | | Also, add a few tests for this and the other accessors. We'll need this accessor to find whether we have any channels to _any_ of the identities that we're trying to connect to.
* | Merge branch 'id_tests' into 'main'eta2022-10-175-2/+264
|\ \ | |/ |/| | | | | | | | | Add a few tests for RelayId and friends Closes #605 See merge request tpo/core/arti!774
| * Write more tests for RelayId and RelayIdRef.Nick Mathewson2022-10-151-0/+138
| |
| * Write tests for RelayIdSet.Nick Mathewson2022-10-153-0/+122
| |
| * Fix deserialize impl for RelayId.Nick Mathewson2022-10-151-1/+1
| | | | | | | | | | | | | | We need to handle String, not just str, since some deserializers have to handle escapes and generate new strings. Found while writing tests; fixes #605.
| * linkspec: impl Hash for RelayIdRefNick Mathewson2022-10-152-1/+3
|/
* Merge branch 'reorganize_factory_code' into 'main'Nick Mathewson2022-10-136-289/+363
|\ | | | | | | | | ChanMgr: Reorganize factory, builder, transport code. See merge request tpo/core/arti!771
| * chanmgr: Edit comments, fix docsNick Mathewson2022-10-134-18/+49
| |
| * chanmgr: Remove RegistryAsFactory.Nick Mathewson2022-10-131-11/+6
| | | | | | | | | | Since there is no longer a blanket implementation of ChannelFactory for TransportHelper, we no longer need a separate type here.
| * ChanMgr: Reorganize factory, builder, transport code.Nick Mathewson2022-10-136-282/+330
|/ | | | There is no actual code change here: just movement.
* Merge branch 'rustdoc_fixes_20221013' into 'main'Nick Mathewson2022-10-138-21/+18
|\ | | | | | | | | Fix some rustdoc errors. See merge request tpo/core/arti!770
| * Fix some rustdoc errors.Nick Mathewson2022-10-138-21/+18
|/ | | | | | In addition to the usual "You named that method wrong!" errors, we have a new rustdoc error that complains about bogus "HTML tags" that are actually unquoted usage of types like `Result<Foo>`.
* Merge branch 'factory_redux' into 'main'Nick Mathewson2022-10-139-136/+258
|\ | | | | | | | | chanmgr: Build and use chanmgr factory APIs See merge request tpo/core/arti!769
| * Flatten TimeoutChannelFactory into ChannelBuilder.Nick Mathewson2022-10-132-48/+30
| |
| * chanmgr: clean up some TODO pt-client items and documentation.Nick Mathewson2022-10-133-80/+23
| |
| * Allow multiple ChannelBuilders to share a ChanMgrEventSender.Nick Mathewson2022-10-132-4/+9
| |
| * chanmgr: Use ChannelFactory via a Box<dyn<ChannelFactory>>.Nick Mathewson2022-10-132-4/+28
| | | | | | | | | | This will prepare for supporting multiple different ChannelFactory implementations.
| * chanmgr: Move Timeout functionality into a decorator object.Nick Mathewson2022-10-132-12/+51
| |
| * Have ChannelBuilder use TransportHelper.Nick Mathewson2022-10-134-27/+92
| | | | | | | | | | | | This lets us build channels using different TransportHelpers, including the (new) default TransportHelper, which just uses the old connect_to_one() code.
| * Implement ChannelFactory for (a wrapper of) TransportRegistry.Nick Mathewson2022-10-121-1/+23
| | | | | | | | This will let us just have ChanMgr take a `dyn ChannelFactory`.
| * chanmgr: Clean up async-ness on factory types.Nick Mathewson2022-10-122-12/+18
| | | | | | | | | | | | | | | | The traits that launch connections need to be async; the traits that don't, shouldn't be async. Additionally, we need a few more "Sync" annotations here for the futures to work.
| * Rename mgr::ChannelFactory to mgr::AbstractChannelFactoryNick Mathewson2022-10-123-19/+22
| | | | | | | | | | | | | | | | | | This is an internal type (distinct from factory::ChannelFactory) that we use to make the code in `tor_chanmgr::mgr` agnostic about what a channel actually is, and how it is actually launched. Therefore, I'm renaming it and giving better documentation in a couple of places, to prevent confusion.
| * Add several accessors to ChannelMethod.Nick Mathewson2022-10-121-0/+33
| | | | | | | | | | | | * Get `TransportId` * Get the target address (of any type) * Ask, "is this a direct connection"?
* | Merge branch 'readmes' into 'main'Nick Mathewson2022-10-1242-2109/+61
|\ \ | |/ |/| | | | | | | | | Abolish maint/readme and use doc include Closes #603 See merge request tpo/core/arti!768