summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr
Commit message (Collapse)AuthorAgeFilesLines
* Bump all crate versions to 0.0.3.Nick Mathewson2022-01-111-12/+12
|
* 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
* | Merge branch 'bug274' into 'main'eta2022-01-101-1/+14
|\ \ | | | | | | | | | | | | | | | | | | Fix busy-loop when consensus is near expiring. Closes #274 See merge request tpo/core/arti!223
| * | 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.
* / Minimize the required version for each dependency.Nick Mathewson2022-01-071-16/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found these versions empirically, by using the following process: First, I used `cargo tree --depth 1 --kind all` to get a list of every immediate dependency we had. Then, I used `cargo upgrade --workspace package@version` to change each dependency to the earliest version with which (in theory) the current version is semver-compatible. IOW, if the current version was 3.2.3, I picked "3". If the current version was 0.12.8, I picked "0.12". Then, I used `cargo +nightly upgrade -Z minimal-versions` to downgrade Cargo.lock to the minimal listed version for each dependency. (I had to override a few packages; see .gitlab-ci.yml for details). Finally, I repeatedly increased the version of each of our dependencies until our code compiled and the tests passed. Here's what I found that we need: anyhow >= 1.0.5: Earlier versions break our hyper example. async-broadcast >= 0.3.2: Earlier versions fail our tests. async-compression 0.3.5: Earlier versions handled futures and tokio differently. async-trait >= 0.1.2: Earlier versions are too buggy to compile our code. clap 2.33.0: For Arg::default_value_os(). coarsetime >= 0.1.20: exposed as_ticks() function. curve25519-dalek >= 3.2: For is_identity(). generic-array 0.14.3: Earlier versions don't implement From<&[T; 32]> httparse >= 1.2: Earlier versions didn't implement Error. itertools at 0.10.1: For at_most_once. rusqlite >= 0.26.3: for backward compatibility with older rustc. serde 1.0.103: Older versions break our code. serde_json >= 1.0.50: Since we need its Value type to implement Eq. shellexpand >= 2.1: To avoid a broken dirs crate version. tokio >= 1.4: For Handle::block_on(). tracing >= 0.1.18: Previously, tracing_core and tracing had separate LevelFilter types. typenum >= 1.12: Compatibility with rust-crypto crates x25519-dalek >= 1.2.0: For was_contributory(). Closes #275.
* 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-165-158/+366
|\ | | | | | | | | 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-145-158/+366
| | | | | | | | | | | | | | | | 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
| |
* | update rusqlite and revert minimal version changeTrinity Pointard2021-12-091-1/+1
| |
* | Upgrade to digest v0.10.0Nick Mathewson2021-12-071-1/+1
|/ | | | | We generally try to track the latest rust-crypto traits when we can: fortunately, this upgrade didn't break much, considering.
* 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
| |
* | Merge remote-tracking branch 'origin/mr/159'Nick Mathewson2021-11-301-13/+51
|\ \
| * | remember utf8 checkdagon2021-11-301-13/+51
| |/
* | Merge branch 'readme_fixes'Nick Mathewson2021-11-301-0/+3
|\ \ | |/ |/|
| * run ./maint/readmes.shdagon2021-11-291-0/+3
| |
* | Bump every crate by one patch version.Nick Mathewson2021-11-291-12/+12
| |
* | 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-182-5/+10
| | | | | | | | 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-dirclient: Put routerdesc download behind a feature.Nick Mathewson2021-11-121-1/+1
| | | | Part of #125
* tor-dirmgr: put routerdesc storage behind a feature.Nick Mathewson2021-11-124-23/+64
| | | | | | | (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-112-3/+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-113-1/+218
|
* 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
|