summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr
Commit message (Collapse)AuthorAgeFilesLines
* Bump minor version of tor-rtcompat and most of its dependentsNick Mathewson2022-10-031-7/+7
| | | | | | | (Since the APIs for the `Schedule::sleep*` functions changed, this is a breaking change in tor-rtcompat. Therefore, the Runtime trait in tor-rtcompat is now a different trait. Therefore, anything that uses the Runtime trait in its APIs has also broken.)
* Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-2/+2
|
* Update README.md files.Nick Mathewson2022-09-301-0/+26
|
* Mark all bridge and pt features as experimental for now.Nick Mathewson2022-09-292-1/+27
| | | | | | Also, document the features. Closes #588.
* GuardMgr/DirMgr: Add APIs for bridge descriptor listsNick Mathewson2022-09-262-0/+2
|
* fix clippy::needless_borrowtrinity-1686a2022-09-101-1/+1
|
* fix clippy::unwrap_used and old TODO for msrv 1.56trinity-1686a2022-09-101-9/+6
|
* `TaskSchedule`: give error on `sleep*()` if last handle is droppedNick Mathewson2022-09-073-4/+14
| | | | | | | | | | | | | | | | | | This fixes an busy-loop. When the last `TaskHandle` on a `TaskSchedule` is dropped, the schedule is permanently canceled: whatever operation it was scheduling should no longer be performed. But our code was broken: the `sleep()` and `sleep_until_wallclock()` functions don't verify whether the handles are dropped or not. This breakage caused an CPU-eating busy-loop in `sleep_until_wallclock`. With this patch, we now return a `Result<(), SleepError>` from these functions. Fixes #572.
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-1/+0
|
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* Use anonymize_home() when displaying various messages.Nick Mathewson2022-08-311-1/+2
| | | | Closes #555
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-241-0/+1
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* Decrease the lifetimes for storing descriptors.Nick Mathewson2022-08-091-6/+29
| | | | | | | These values were chosen experimentally, based on those from Tor, to save disk space without wasting much bandwidth. Closes #527.
* Finish implementation of params() for DirMgr.Nick Mathewson2022-08-021-0/+36
| | | | | | | Now it maintains an up-to-date set of default parameters to be handed out if there is no directory. Closes #528.
* Add params() method to NetDirProvider, and partial implementationNick Mathewson2022-08-021-0/+1
| | | | | | | | This method will let users get the latest `NetParameters`, with user-configured overrides, even if there is no current directory at all. Part of #528
* Now that versions have bumped, remove semver.md files.Nick Mathewson2022-08-011-3/+0
|
* Bump patch versions on crates that have new APIs.Nick Mathewson2022-08-011-2/+2
| | | | | | | | | | | | | | Do _not_ bump the dependency versions on crates that have had no changes since arti 0.0.5, since those crates do not depend on the new APIs. ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p tor-llcrypto --bump patch git restore crates/tor-checkable git restore crates/tor-consdiff git restore crates/tor-rtmock ```
* Bump minor version on crates with deps with breaking changes.Nick Mathewson2022-08-011-2/+2
| | | | | | | | | | | | | | | This performs the transitive closure of the last operation: everything that depends on a crate with a breaking change gets the version which it depends on bumped. ``` cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor cargo set-version -p tor-config --bump minor ```
* Bump minor versions on all crates that have had breaking changes.Nick Mathewson2022-08-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | Done with these commands: ``` cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti --bump minor ```
* tor-dirmgr: Remove opt_netdir entirely.Nick Mathewson2022-07-263-12/+9
| | | | Its existence tended to hide bugs, and was just asking for trouble.
* Remove unused DirMgr::netdir method, make opt_netdir private.Nick Mathewson2022-07-262-11/+2
|
* Add new APIs to NetDirProvider to better support timeliness.Nick Mathewson2022-07-261-3/+24
| | | | | | | | | | | | | | | | | Over the years we've found that most callers who want a netdir want what C Tor calls a "reasonably live" network directory: One that is not expired by too much, or too far in the future. But a few want a _strictly_ live directory: one that says it is valid now, with no tolerances. And a few want _any_ directory, no matter how expired it is. This commit adds net methods to NetDirProvider to provide these directories. I think that most use cases will want to explicitly think about what kind of directory they want, so I've made `netdir` the simplest method. I might remove `timely_netdir` by the end of this branch; see TODO comments. Part of #518.
* Rename DirSkewTolerance to DirToleranceNick Mathewson2022-07-224-9/+16
| | | | | | This name is more accurate because we aren't only dealing with clock skew here: we're also trying to tolerate the case where the authorities fail to reach consensus for a while.
* Bump to rusqlite 0.28.Nick Mathewson2022-07-191-1/+1
|
* Merge branch 'dirmgr_error_cleanup' into 'main'Nick Mathewson2022-07-184-61/+85
|\ | | | | | | | | | | | | Clean up some errors in tor-dirmgr Closes #521 See merge request tpo/core/arti!628
| * dirmgr: Add a helper to create LockFile errors.Nick Mathewson2022-07-182-8/+9
| |
| * dirmgr: Make UnrecognizedSchema more helpfulNick Mathewson2022-07-142-6/+14
| |
| * dirmgr: Add an instance of BadUtf8InCacheNick Mathewson2022-07-141-2/+1
| |
| * dirmgr: Clarify disk IO errors.Nick Mathewson2022-07-144-33/+49
| |
| * dirmgr: style edits to error messages.Nick Mathewson2022-07-141-22/+22
| |
* | Bump tor-dirmgr to version 0.5.1.tor-dirmgr-v0.5.1Nick Mathewson2022-07-141-1/+1
| | | | | | | | | | This does not require a change in any other crate, since the change here does not affect tor-dirmgr's APIs.
* | Fix illegal formatting in cache filenamesfeelingnothing2022-07-141-1/+1
|/
* Remove semver.md files now that 0.5.0 is outNick Mathewson2022-06-241-5/+0
|
* Bump crate and dependency versions.Nick Mathewson2022-06-241-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were done with the following commands: ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-error --bump patch cargo set-version -p tor-config --bump patch cargo set-version -p tor-units --bump patch cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-llcrypto --bump patch cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump patch cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump patch cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump patch cargo set-version -p tor-dirclient --bump patch cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump patch cargo set-version -p arti --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor ```
* Merge branch 'clippy' into 'main'Ian Jackson2022-06-241-0/+3
|\ | | | | | | | | Fix clippy nightly again See merge request tpo/core/arti!603
| * Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | | | | | Update all lint blocks
* | Merge branch 'dirmgr' into 'main'Nick Mathewson2022-06-241-53/+49
|\ \ | | | | | | | | | | | | | | | | | | dirmgr: followups to !587, mostly using iterators Closes #468 See merge request tpo/core/arti!599
| * | dirmgr: Use ... .find().is_none() rather than clippy's suggestionIan Jackson2022-06-231-2/+4
| | |
| * | dirmgr: DirBootstrapStatus: Refactor mut_status_for using entries_mutIan Jackson2022-06-221-27/+25
| | | | | | | | | | | | IMO this is rather less confusing.
| * | dirmgr: Use new statuses() helper methodIan Jackson2022-06-221-21/+6
| | | | | | | | | | | | The two call sites become clearer, IMO.
| * | dirmgr: DirBootstrapStatus: Provide statuses and entries_mutIan Jackson2022-06-221-3/+18
| | | | | | | | | | | | | | | | | | | | | We're going to use these in a moment. One returns entries and the other statuses simply because that's what's actually going to be wanted.
| * | dirmgr: Remove a TODO commentIan Jackson2022-06-221-4/+0
| |/ | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/587#note_2815945
* / Fix a couple of typos in rustdoc comments.Nick Mathewson2022-06-241-1/+1
|/
* Merge branch 'display_source_cleanup' into 'main'eta2022-06-211-6/+6
|\ | | | | | | | | Do not include error source() in display() format. See merge request tpo/core/arti!598
| * Do not include error source() in display() format.Nick Mathewson2022-06-211-6/+6
| | | | | | | | | | | | | | | | | | According to doc/Errors.md, and in keeping with current best practices, we should not include display an error's `source()` as part of that error's display method. Instead, we should let the caller decide to call source() and display that error in turn. Part of #323.
* | Merge branch 'stalled_directory' into 'main'Ian Jackson2022-06-215-208/+576
|\ \ | |/ |/| | | | | | | | | Detect and report stalled directory downloads Closes #468 See merge request tpo/core/arti!587
| * Refactor DirStatus data structures.Nick Mathewson2022-06-211-74/+186
| | | | | | | | | | | | | | AttemptId is now linked to DirStatus in StatusEntry. DirBootstrapStatus now has an inner enum to make invalid status unrepresentable.
| * Make display formats work with older derive_more.Nick Mathewson2022-06-142-2/+2
| |
| * tor-dirmgr: Make DirStatus non-public.Nick Mathewson2022-06-143-5/+4
| | | | | | | | | | I believe this type was made public in error: No other crate uses it, and no API exposes it.