summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* Fixup broken doc comment from arti!220eta2022-01-101-1/+1
| | | | That's what I get for blindly trusting @nickm :p
* Merge branch 'ticket_178' into 'main'eta2022-01-101-9/+73
|\ | | | | | | | | | | | | Fix ticket 178: Don't use a NetDir until we have microdescriptors for all of our primary guards. Closes #178 See merge request tpo/core/arti!220
| * Only replace netdir once we have enough guard MDs.Nick Mathewson2022-01-061-9/+73
| | | | | | | | | | | | | | | | This prevents a security-failure condition that could happen if our directory caches don't give us these microdescriptors, but we nevertheless decide that the directory is usable. Closes #178
* | Fix busy-loop when consensus is near expiring.Nick Mathewson2022-01-071-1/+14
|/ | | | | | | | | | | | | | When our current consensus is getting close to being invalid (but it isn't invalid yet), we try to get a new one. So far, so good. But we had a bug: when we went to get a new consensus, we'd see that we had a perfectly fine not-yet-invalid consensus in our cache, reload it, find that it was ready, and continue! This patch fixes our behavior: If we have a usable consensus, then when we reset the bootstrapping process, we ignore any cached consensus. Fixes bug #274.
* extend lints to include 'clippy::all'Daniel Eades2021-12-281-0/+1
|
* fallbackdir: Update list generated on December 15, 2021Tor CI Release2021-12-161-869/+891
| | | | Signed-off-by: Tor CI Release <[email protected]>
* tor-dirmgr: retain cache_usage on reset.Nick Mathewson2021-12-161-4/+19
| | | | | | | Previously we didn't retain the value of our cache_usage field when calling reset() from GetMicrodescsState. This resolves an XXXX comment.
* Merge branch 'flag-publish-2' into 'main'eta2021-12-164-139/+342
|\ | | | | | | | | Refactor directory events to use a new FlagPublisher mechanism. See merge request tpo/core/arti!188
| * Refactor directory events to use a FlagPublisher mechanism.Nick Mathewson2021-12-144-139/+342
| | | | | | | | | | | | | | | | This approach tries to preserve the current interface, but uses a counter-based event backend to implement a coalescing stream of events that can be represented as small integers. The advantage here is that publishing events no longer needs to be a blocking operation, since there is no queue to fill up.
* | tor-dirmgr: Warn on a bug case.Nick Mathewson2021-12-161-2/+1
|/ | | | | | | | This warning occurs if we ask for microdescriptors from our local cache, and our cache gives us something we didn't ask for. It shouldn't be possible, so let's warn when it occurs. This patch resolves an XXXX.
* Merge branch 'reconfigure' into 'main'eta2021-12-134-29/+131
|\ | | | | | | | | Make most arti-client fields reconfigurable. See merge request tpo/core/arti!181
| * Add a few tests to tor-config.Nick Mathewson2021-12-071-3/+2
| |
| * Make override_net_params take effect sooner.Nick Mathewson2021-12-072-4/+19
| | | | | | | | | | This is still not as soon as I'd like: a real change here will require refactoring DirMgr::notify().
| * Make much of DirMgrConfig reconfigurable.Nick Mathewson2021-12-074-38/+94
| | | | | | | | | | | | | | | | | | | | We can't change the authorities while in-flight: that would be pretty miserable to implement. Similarly we can't change the cache while in-flight. Everything else should be fair game, though there are a couple of tricky bits. I've tried to document those.
| * Sketch API for reconfiguration.Nick Mathewson2021-12-072-0/+32
| | | | | | | | | | | | | | This patch doesn't actually make anything reconfigurable, but it does create an API that will tell you "you can't change the value of that!" If the API looks reasonable, I can start making it possible to change the values of individual items.
* | fix nightly clippy errorsTrinity Pointard2021-12-091-2/+1
|/
* Resolve roughly half of the XXXXs.Nick Mathewson2021-12-062-6/+6
| | | | | | | | We want to only use TODO in the codebase for non-blockers, and open tickets for anything that is a bigger blocker than a TODO. These XXXXs seem like definite non-blockers to me. Part of arti#231.
* Merge branch 'tor-dirmgr' into 'main'eta2021-12-011-3/+9
|\ | | | | | | | | Don't warn in bootstrap_from_config when error is Error::ManagerDropped See merge request tpo/core/arti!157
| * dont warn on bootstrap error when error == manager droppeddagon2021-11-301-3/+9
| |
* | remember utf8 checkdagon2021-11-301-13/+51
|/
* Merge branch 'config-updates-and-tests'Nick Mathewson2021-11-292-1/+2
|\
| * Add basic tests for high-level buildersNick Mathewson2021-11-252-1/+2
| | | | | | | | | | Make sure that we can change elements, and we can reconstruct builders that give us the same thing.
* | add semicolons if nothing returnedDaniel Eades2021-11-254-9/+10
| |
* | deglob some enums, use concise iteration syntaxDaniel Eades2021-11-252-2/+2
|/
* More typo fixes that I forgot to save :(Nick Mathewson2021-11-242-2/+2
|
* Make every Config type implement Eq.Nick Mathewson2021-11-212-4/+4
| | | | | Doing this is necessary for reconfiguration support, and will help a lot with testing, too.
* Give every ConfigBuilder a From<Config> implementation.Nick Mathewson2021-11-211-6/+25
| | | | This will make it more convenient to reconfigure things.
* Use named fields for the elements of ConfigBuildErrorNick Mathewson2021-11-181-4/+4
|
* Rename RetryConfig to DownloadSchedule, fold in parallelism.Nick Mathewson2021-11-185-79/+83
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-181-5/+9
| | | | | | | | To do this at all neatly, I had to split out `tor-config` from `arti-config` again, and putting the lower level stuff (paths, builder errors) into tor-config. I also changed our use of derive_builder to always use a common error type, to avoid error type proliferation.
* tor-dirmgr: put routerdesc storage behind a feature.Nick Mathewson2021-11-123-23/+62
| | | | | | | (We keep routerdescs in the schema, since we don't want _that_ to fragment.) Part of #125.
* Fix typosDimitris Apostolou2021-11-122-3/+3
|
* Remove usage of tracing-test 0.1Nick Mathewson2021-11-111-2/+0
| | | | | | | | It requires tracing-subscriber 0.2, which is a lower version than we want, and which causes trouble with our minimal-versions CI test. There is a pending issue to fix this; we can reinstate tracing-test once it is merged: https://github.com/dbrgn/tracing-test/pull/11
* Tests for tor-dirmgr::bootstrapNick Mathewson2021-11-112-1/+216
|
* Minor tests for DirMgr::query_into_requestsNick Mathewson2021-11-111-0/+39
|
* tor-dirmgr: tests for making and expanding consensus requests.Nick Mathewson2021-11-101-0/+125
|
* tor-dirmgr: Tests for high-level loading functions.Nick Mathewson2021-11-101-3/+152
|
* More tests on tor-dirmgr::stateNick Mathewson2021-11-083-27/+113
| | | | | These test our download schedules, resetting to the original state, and storing downloaded objects.
* Remove one more test println!().Nick Mathewson2021-11-041-1/+0
|
* tor-dirmgr: tests for docid module.Nick Mathewson2021-11-041-1/+156
|
* Remove some dbg!() calls in real code.Nick Mathewson2021-11-021-1/+0
|
* Try writing a bit more documentation for configuration types.Nick Mathewson2021-10-281-2/+13
|
* tor-dirmgr: tests for GetMicrodescsStateNick Mathewson2021-10-281-0/+100
|
* tor-dirmgr: tests for download schedules.Nick Mathewson2021-10-281-0/+23
|
* tor-dirmgr: Test for GetCertsStateNick Mathewson2021-10-281-5/+115
|
* tor-dirmgr: Tests for GetConsensusState.Nick Mathewson2021-10-281-0/+148
| | | | | | This test uses a consensus that I've copied from tor-netdoc/testdata. I would include it directly, but I think that will cause trouble when it comes time to run "cargo package".
* tor-dirmgr::state: Mock the view of current time.Nick Mathewson2021-10-281-3/+25
| | | | | This will let us test the state processing code without having to give it up-to-date directory objects.
* Upgrade to fslock version 0.2Nick Mathewson2021-10-271-1/+1
| | | | | This version makes all locks per-handle rather than per-process, by moving from lockf() to flock() on unix.
* Migrate tor-dirmgr from chrono to time 0.3Nick Mathewson2021-10-242-34/+38
| | | | | (This appears to be the emerging consensus of how to handle RUSTSEC-2020-0159.)
* Replace references to arti-client in the documentation.Nick Mathewson2021-10-211-2/+2
|