summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr
Commit message (Collapse)AuthorAgeFilesLines
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-24/+24
| | | | | | | | Per policy, we bump the minor version of every tor-*, arti-* crate on each release. We have updated our MSRV, so we're treating this as a breaking change for our non-(arti/tor)-prefixed crates too.
* misc: cleanup now that `_report!` macros support fieldsSteven Engler2025-08-181-2/+1
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-0714-77/+99
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Update code for Edition 2024Nick Mathewson2025-08-072-2/+2
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* Bump to hex-literal 1.0Nick Mathewson2025-08-051-1/+1
| | | | | (We were unable to do this before, since it required a rust version we didn't have.)
* Set MSRV to 1.85.Nick Mathewson2025-08-051-1/+1
|
* dirmgr: Rename circuit to tunnelDavid Goulet2025-08-051-3/+3
| | | | Signed-off-by: David Goulet <[email protected]>
* Bump version of tor-basic-utilsIan Jackson2025-08-051-1/+1
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Bump rusqlite to 0.37Ian Jackson2025-08-041-1/+1
|
* config-path, dirmgr, general-addr: Remove unnecessary parentheses (fmt).Gabriela Moldovan2025-07-151-2/+1
|
* config-path, dirmgr, general-addr: Remove unnecessary parentheses.Gabriela Moldovan2025-07-151-1/+1
| | | | This resolves some nightly clippy warnings.
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-21/+21
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - hashx - equix - caret - safelog - retry-error * crates where APIs were broken (bump minor): - fs-mistrust (the implicit once_cell feature was removed) The bumps from this commit were created using this script: ``` PATCH=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" fs-mistrust " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* tor-dirmgr, tor-guardmgr: Use std::slice::from_ref as suggested by clippy.Gabriela Moldovan2025-07-071-4/+4
|
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* tor-dirmgr: Removed dependency on `once_cell`hashcatHitman2025-06-143-7/+9
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* Bump rusqlite dependency to 0.36.0Nick Mathewson2025-06-101-1/+1
|
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-21/+21
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* release: Bump crates non-arti/non-tor crates with functional changes.Alexander Hansen Færøy2025-06-051-1/+1
| | | | | | | | This is done using: cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p equix cargo set-version --bump patch -p fslock-guard
* *: suppress cognitive_complexity warnings from nightlyNick Mathewson2025-05-292-0/+7
| | | | | | | | | | | | | Apparently clippy nightly is better (or worse?) about detecting complex functions than before, so I'm suppressing these warnings where they occur. I have mixed feelings about these warnings: On the plus side, they really do help to detect functions that are twistier than they need to be. On the minus side, they get confused by tracing macros, and the "allows" do pile up. But on the plus side, those "allows" do provide a way to find functions that need to be refactored, and they are never uglier than the functions they decorate.
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-1/+2
| | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-011-21/+21
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* chore: Run fixup-features.Wesley Aptekar-Cassels2025-04-301-1/+1
| | | | | | | | | | | | cargo run -p fixup-features -- --exclude examples/ --exclude maint/ Cargo.toml The following features in arti-ureq were manually added to full or marked non-additive: * rustls * native-tls * tokio * async-std
* Update rand requirement to 0.9.1Nick Mathewson2025-04-291-1/+1
| | | | | (This is going to be a _requirement_, since rand 0.9.1 has a behavioral change from 0.9.0)
* Run cargo update.Wesley Aptekar-Cassels2025-04-291-1/+1
| | | | | I updated everything except rand, because the new version of rand interacts with #1903, thus requiring more care.
* Rename recommended_protocols to protocol_statuses.Nick Mathewson2025-04-162-9/+9
| | | | | This name reflects its purpose better than the original one, since it includes required protocols as well as recommended ones.
* protover, *: Add documentation about what "supported" means.Nick Mathewson2025-04-161-1/+2
|
* dirmgr: Always apply changes before advancing consensus.Nick Mathewson2025-04-161-6/+6
| | | | | | | | | | | In the directory code, we have functionality to advance the consensus download state whenever possible, even if there is more we could download in the current state. That's fine, but when we're in this position, we need to be sure that we're taking any action based on the current state (such as installing notably parameters or, notably, protocol recommendations) before we move on.
* Add warnings about removing supported protocols.Nick Mathewson2025-04-161-0/+2
|
* netdir: Add a recommended_protocols() to NetDirProviderNick Mathewson2025-04-161-0/+4
|
* dirmgr, netdir: Store protocol requirments as soon as they are validated.Nick Mathewson2025-04-164-5/+56
|
* dirmgr: Backend support for cacheing protocol status.Nick Mathewson2025-04-164-3/+139
| | | | | | | We want to store this separately from the consensus, because we want to access it very early in our load-from-cache process, without checking the consensus that contains it for timeliness.
* New functions to report supported subprotocolsNick Mathewson2025-04-162-0/+19
| | | | | | | | | | | | | | | Part of #1849. Note that these functions are distributed across crates, so that if (in the future) we stop doing API breaks with every release, we will get the right outputs. Note also that these functions build the list of protocols out of specific symbolic features, rather than numbers: this makes it easier to avoid errors about "which feature was Relay=4 again", and easier to avoid accidentally referring to a protocol that doesn't exist, like "Consensus" (should be "Cons") or "HsDir" (case is wrong).
* fix `clippy::doc_overindented_list_items`Steven Engler2025-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | Example: ```text warning: doc list item overindented --> crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9 | 322 | /// indicates that no more messages will be received for this request. | ^^^ help: try using ` ` (2 spaces) | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items note: the lint level is defined here --> crates/arti-rpc-client-core/src/lib.rs:8:9 | 8 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]` ```
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-20/+20
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' oneshot-fused-workaround: No change. slotmap-careful: No change. fslock-guard: No change. caret: No change. retry-error: No change. ``` * crates that only have non-functional changes (bump the patch version): - test-temp-dir - equix - fs-mistrust - safelog * crates where APIs were broken (bump minor): - hashx (`RngCore` impl for `SipRand`) The bumps from this commit were created using this script: ``` PATCH=" test-temp-dir equix fs-mistrust safelog " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" hashx " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Upgrade strum dependency to 0.27.1.Gabriela Moldovan2025-03-271-1/+1
| | | | | | | | | In 0.27.0, strum's MSRV was bumped to 1.66.1, but that's okay because ours is 1.77. We aren't affected by any of its [breaking changes]. [breaking changes]: https://github.com/Peternator7/strum/blob/master/CHANGELOG.md#0270
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-182-6/+6
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-184-4/+4
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | (Per discussion at #1774, we think the changes are acceptable.) This commit won't compile on its own; subsequent commits will fix it.
* netdoc: Make some parsing init functions fallible.Nick Mathewson2025-03-171-2/+7
| | | | | | | I'm about to make our parsers reject some strings at construction time, so it makes sense to have these functions become fallible. This is a breaking change.
* tor-rtmock: allow-Decorate every use of MockSleepProviderIan Jackson2025-03-061-0/+2
| | | | | | | MockSleepProvider and MockSleepRuntime have been declared deprecated by the docs for some time. We're about to mark them `#[deprecated]`. This commit has been split out for clarity of review.
* tor-dirmgr: remove `dbg!`Steven Engler2025-03-051-1/+0
|
* sqlite: Handle vanished blobs during consensus loadingNick Mathewson2025-03-052-16/+39
| | | | | | | | | Here we move the responsibility for removing ExtDoc entries for vanished blobs into the _caller_ of read_blob(): we want to tidy all such entries in one go. Unlike a (reverted) previous approach, this time we don't need a retry loop.
* sqlite: add a method to tidy extdocs for vanished blobsNick Mathewson2025-03-051-1/+93
|
* sqlite.rs: Let read_blob signal whether it cleaned up.Nick Mathewson2025-03-051-8/+28
| | | | We'll want to use this information to tell us whether to retry.
* sqlite: Extract body of latest_consensus into a new methodNick Mathewson2025-03-051-23/+33
| | | | I'm about to add a retry mechanism.
* sqlite: Stop ignoring any errors.Nick Mathewson2025-03-051-3/+22
| | | | | We've already stopped ignoring any DB errors, so we may as well make sure that any FS errors we encounter are also reported.