summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* bridge descriptors tests: Fix flaky testIan Jackson2022-11-031-1/+11
|
* bridge descriptors tests: Test set_bridges more thoroughly (fix)Ian Jackson2022-11-031-1/+1
| | | | | | The RetryDelays are being triggered for the 2nd time here, so their timeouts can be longer. We must bump the sleep to make sure we don't have a flaky test.
* bridge descriptors: logging: Log addition and removal (fmt)Ian Jackson2022-11-031-12/+20
| | | | Worsify formatting as demanded by rustfmt.
* bridge descriptors: logging: Log addition and removalIan Jackson2022-11-031-8/+31
| | | | | This involves breaking the calls to `new_bridges.remove` into a helper that does the logging.
* bridge descriptors: logging: Log download start and outcomeIan Jackson2022-11-031-0/+6
|
* bridge descriptors tests: Test set_bridges more thoroughlyIan Jackson2022-11-031-0/+34
| | | | | | | | Prior to the previous commit, set_bridges would malfunction if there were bridges which where (i) in current (ii) in queued or running (iii) in the new bridge set. This test failed then and passes now.
* bridge descriptors: Rewrite set_bridgesIan Jackson2022-11-031-18/+12
| | | | | | | | This was fundamentally confused and irregular. Now it is more regular: it does the same things to all the elements of Tracked, and a simple filtering on current. This fixes a bug, for which I'm about to add a test case.
* bridge descriptors tests: Add another couple of test casesIan Jackson2022-11-031-1/+31
|
* bridge descriptors tests: stream_drain_ready returns event countIan Jackson2022-11-031-1/+4
| | | | We'll use this in a moment.
* bridge descriptors tests: Break out bad_bridge helper functionIan Jackson2022-11-031-7/+7
|
* bridge descriptors: Change default max_refetchIan Jackson2022-11-032-2/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/820#note_2850269
* bridge descriptors: Add clarification about bridge statesIan Jackson2022-11-031-0/+3
|
* bridge descriptors: Improve and fix docs for consider_launchingIan Jackson2022-11-031-1/+6
|
* bridge descriptors: Add comments where StateGuard is droppedIan Jackson2022-11-031-0/+8
|
* bridge descriptors: Document `changed` and `earliest_timeout` OptionsIan Jackson2022-11-031-0/+5
|
* bridge descriptors: Document updates argument to timeout_taskIan Jackson2022-11-031-0/+6
|
* Require derive_more 0.99.3Ian Jackson2022-11-031-1/+1
| | | | | | | | 0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114 which makes the Deref derive for bridgedesc::StateGuard not work and therefore breaks minimal-versions CI. It seems simpler to require the newer version everywhere.
* bridge descriptors: TestsIan Jackson2022-11-033-0/+270
|
* bridge descriptors: Provide a consistency check functionIan Jackson2022-11-031-0/+196
| | | | | This is really part of the tests, but I put it here so that it can be compiled-in if someone wants it during debugging.
* bridge descriptors: Provide an implementation of BridgeDescProviderIan Jackson2022-11-033-0/+1098
| | | | Tests will come in a moment.
* Copy tor-netdoc/testdata/routerdesc1.txt into tor-dirmgrIan Jackson2022-11-031-0/+50
| | | | | This seems better than having tor_netdoc export a `#[cfg(test)]` public constant.
* remove unused dependanciestrinity-1686a2022-10-291-1/+0
|
* tor-dirmgr: impl Default for FlagPublisherIan Jackson2022-10-271-0/+6
|
* tor-dirmgr: impl FlagEvent for BridgeDescEventIan Jackson2022-10-271-0/+6
|
* Fix clippy false positiveIan Jackson2022-10-251-0/+5
|
* FlagEvent trait: Implement using macrosIan Jackson2022-10-253-14/+64
| | | | | | | | | | | The explicit list of variant names, that needs to be kept in sync, and is a test failure semver break hazard, is now gone. All the necessary code is now generated automatically, and cannot be wrong. I want this because I find myself wanting to add a second implementation of FlagEvent, for another type.
* tor-circmgr: Make get_or_launch_dir_specific feature-specificIan Jackson2022-10-211-1/+1
|
* tor-dirmgr README: Remove some redundant/duplicated headingsIan Jackson2022-10-211-4/+0
|
* tor-dirclient: Make RequestFailed its own error typeIan Jackson2022-10-201-5/+5
| | | | | | | We're going to have functions on Response that fail by returning only one of these. Sadly this diff is quite noisy.
* tor-dirclient Response: Rename output methodsIan Jackson2022-10-201-1/+1
| | | | | These don't check errors and are therefore quite hazardous. I'm going to introduce a more cooked version in a moment.
* Fix various typos (using typos tool and hand-inspection)Nick Mathewson2022-10-181-1/+1
|
* cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-51/+1
| | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* 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
|