summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Add status tracking to FallbackDir.Nick Mathewson2022-03-308-25/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this by creating a new FallbackSet type that includes status information, and updating the GuardMgr APIs to record success and failure about it when appropriate. We can use this to mark FallbackDirs retriable (or not). With this change, FallbackDir is now stored internally as a Guard in the GuardMgr crate. That's fine: the FallbackDir type really only matters for configuration.
| * | Implement Ord for Ed25519Identity.Nick Mathewson2022-03-302-1/+2
| | |
| * | Update semver_status from recent round of movement.Nick Mathewson2022-03-301-0/+4
| | |
| * | dirmgr: do not pass fallbacks to the CircMgr.Nick Mathewson2022-03-301-6/+1
| | | | | | | | | | | | | | | | | | | | | This is the final step in allowing the CircMgr to use the GuardMgr's view of the fallbacks. Compilation is restored and tests pass.
| * | circmgr: Use guard-manager's view of the fallbacks when possible.Nick Mathewson2022-03-304-14/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're building a path with the guard manager involved, we now ask the guard manager to pick our first hop no matter what. We only pick from the fallback list ourselves if we're using the API with no guard manager. This causes some follow-on changes where we have to remember an OwnedChanTarget object in a TorPath we've built, and where we gain the ability to say we're building a path "from nothing extra at all." Those are all internal to the crate, though. Closes #220, by making sure that we use our guards to get a fresh netdir (if we can) before falling back to any fallbacks, even if our consensus is old. Compilation should be fixed in the next commit.
| * | GuardMgr: Return fallback directories when appropriate.Nick Mathewson2022-03-301-26/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only do this when we fail to get a regular guard (e.g., because they're all down), and when we have been asked for a guard for a one-hop directory. Most of the change in this commit is plumbing to make all of the types match up. As before, compilation may still be broken.
| * | Fix typos in guardmgr/lib.rsNick Mathewson2022-03-301-2/+2
| | |
| * | GuardMgr: some prep work for returning fallbacks as guards.Nick Mathewson2022-03-303-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need to extend our notion of "the origin of a guard" to include "somewhere outside the guard list"; we need the ability to return a FallbackDir as a Guard; and we need to remember a few more pieces of information in each pending request. As before, this commit may break compilation; it will be restored soon.
| * | Turn FallbackList into a real type, and store one in GuardMgr.Nick Mathewson2022-03-3014-37/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guard manager is responsible for handing out the first hops of tor circuits, keeping track of their successes and failures, and remembering their states. Given that, it makes sense to store this information here. It is not yet used; I'll be fixing that in upcoming commits. Arguably, this information no longer belongs in the directory manager: I've added a todo about moving it. This commit will break compilation on its own in a couple of places; subsequent commits will fix it up.
| * | Reformat tor-circmgr/Cargo.tomlNick Mathewson2022-03-301-21/+30
| | |
| * | guardmgr: move error types into new err.rs module.Nick Mathewson2022-03-303-73/+79
| | | | | | | | | | | | This is more in keeping with the rest of our code.
| * | Move fallback.rs into guardmgr.Nick Mathewson2022-03-3012-8/+20
|/ / | | | | | | | | | | | | This is the logical place for it, I think: the GuardMgr's job is to pick the first hop for a circuit depending on remembered status for possible first hops. Making this change will let us streamline the code that interacts with these objects.
* | Merge branch 'disallowed_lint' into 'main'eta2022-03-3022-46/+2
|\ \ | | | | | | | | | | | | Remove allow(clippy::disallowed_methods) lint flag. See merge request tpo/core/arti!437
| * | Fix a let_and_return lint violation that had somehow slipped in.Nick Mathewson2022-03-301-3/+1
| | |
| * | Remove allow(clippy::disallowed_methods) lint.Nick Mathewson2022-03-3022-43/+1
| | |
* | | Merge branch 'daemon-separation' into 'main'eta2022-03-3011-300/+382
|\ \ \ | |/ / |/| | | | | | | | Make daemon tasks self-contained; introduce NetDirProvider See merge request tpo/core/arti!436
| * | Make daemon tasks self-contained; introduce NetDirProvidereta2022-03-3011-300/+382
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various background daemon tasks that `arti-client` used to spawn are now handled inside their respective crates instead, with functions provided to spawn them that return `TaskHandle`s. This required introducing a new trait, `NetDirProvider`, which steals some functionality from the `DirProvider` trait to enable `tor-circmgr` to depend on it (`tor-circmgr` is a dependency of `tor-dirmgr`, so it can't depend on `DirProvider` directly). While we're at it, we also make some of the tasks wait for events from the `NetDirProvider` instead of sleeping, slightly increasing efficiency.
* | Merge branch 'no-system-time' into 'main'eta2022-03-3027-49/+125
|\ \ | | | | | | | | | | | | | | | | | | Don't use SystemTime::now() Closes #306 See merge request tpo/core/arti!365
| * | typotrinity-1686a2022-02-281-1/+1
| | |
| * | use wallclock where possible in teststrinity-1686a2022-02-2618-23/+64
| | |
| * | fix teststrinity-1686a2022-02-252-14/+21
| | |
| * | remove most usage of SystemTime::nowtrinity-1686a2022-02-2512-12/+40
| | |
* | | Update README.md files using readmes scriptNick Mathewson2022-03-293-1/+15
| | |
* | | Upgrade to rusqlite 0.27.0Nick Mathewson2022-03-292-5/+5
| | |
* | | Run cargo-update in preparation for Arti 0.2.0Nick Mathewson2022-03-291-96/+97
| | | | | | | | | | | | | | | (Doing this a few days ahead of time to give updated code time to get testing)
* | | Start a changelog for Arti 0.2.0Nick Mathewson2022-03-281-2/+136
| | |
* | | Remove a now-irrelevant commentNick Mathewson2022-03-281-2/+0
| | |
* | | Merge branch 'isolation-followup' into 'main'Nick Mathewson2022-03-2810-445/+620
|\ \ \ | | | | | | | | | | | | | | | | implement IsolationHelper for StreamIsolation See merge request tpo/core/arti!434
| * | | remove usage of 'token' where it's no longer a tokentrinity-1686a2022-03-273-16/+19
| | | |
| * | | implement IsolationHelper for StreamIsolationtrinity-1686a2022-03-252-14/+12
| | | | | | | | | | | | | | | | but don't use it in a dyn Isolation context
| * | | move StreamIsolation to isolation moduletrinity-1686a2022-03-244-109/+108
| | | |
| * | | implement IsolationHelper for tuple of IsolationHelpertrinity-1686a2022-03-241-0/+159
| | | |
| * | | fix with_coverage script to exclude pub(crate) mod test from resultstrinity-1686a2022-03-241-1/+1
| | | |
| * | | move isolation in separate moduletrinity-1686a2022-03-245-330/+336
| | | |
| * | | seal trait Isolationtrinity-1686a2022-03-241-1/+11
| | | |
| * | | rename *_isolation_group to *_isolationtrinity-1686a2022-03-246-19/+19
| | | |
* | | | Merge branch 'main' into 'main'Ian Jackson2022-03-251-2/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fixed typo on arti-client README.md See merge request tpo/core/arti!432
| * | | | Fixed typo on arti-client README.mdsolanav2022-03-241-2/+0
| |/ / /
* | | | Merge branch 'dir-filter' into 'main'Ian Jackson2022-03-259-39/+184
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | arti-client, dirmgr: Initial DirFilter code See merge request tpo/core/arti!431
| * \ \ \ Merge branch 'm' into 'dir-filter'Nick Mathewson2022-03-255-69/+23
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Simplify DirFilter API See merge request nickm/arti!1
| | * | | | DirFilter: Move nil default impls to trait default methodsIan Jackson2022-03-251-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means you can write a DirFilter and only write code to mess with the bits you want to. Also, it is less code here.
| | * | | | Abolish filter::DynFilter in favour of transparent DirFilterIan Jackson2022-03-255-55/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two reasons why the DynFilter newtype might be needed: 1. To impl Default. But we don't need it to impl Default since we can have an accessor which does the defaulting. 2. To hide the API. But this is usrely an unstable API. Just writing Arc<dyn> gets rid of a lot of unnecessary boilerplate and conversion code.
| | * | | | Make DirFilter be Debug + Send + SyncIan Jackson2022-03-252-9/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | Abolish the handwritten Debug impl for DynFilter, which is no longer needed.
| * | | | Expose DirFilter from arti-client.Nick Mathewson2022-03-243-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | This will make it possible to implement a directory-munging mechanism in arti-testing for #397.
| * | | | dirmgr: Initial DirFilter code.Nick Mathewson2022-03-246-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code sits behind a feature flag, and can be used to modify directories before storing them. This is part of the implementation for #397.
| * | | | Reformat {arti-client,tor-dirmgr}/Cargo.tomlNick Mathewson2022-03-242-38/+53
| |/ / /
* | | | Merge branch 'task-scheduler-2' into 'main'eta2022-03-255-36/+397
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Implement a periodic task scheduler, and a basic dormant mode See merge request tpo/core/arti!429
| * | | tor-rtcompat/scheduler: add unit tests, FireIn -> FireAteta2022-03-242-7/+142
| | | | | | | | | | | | | | | | | | | | Addressing review comments: added some unit tests for the new scheduler type, and made FireIn use an Instant instead (making it FireAt).
| * | | Implement a periodic task scheduler, and a basic dormant modeeta2022-03-235-36/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a revised version of !397; it implements a scheduling system for periodic tasks that can be externally controlled, and then uses the external control aspect to implement a basic dormant mode (#90). More technically, the scheduling system consists of a `Stream` that periodic tasks are expected to embed in a `while` loop or similar, a way for tasks themselves to choose how long to wait until the stream next yields a result, and a handle to control this outside of the task.
* | | | Merge branch 'netinfo-clock-skew' into 'main'Nick Mathewson2022-03-239-28/+268
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-proto: add the ability to learn clock skew from NETINFO cells See merge request tpo/core/arti!410