summaryrefslogtreecommitdiff
path: root/crates/tor-netdir
Commit message (Collapse)AuthorAgeFilesLines
* Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-11/+11
| | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.40.0 done
* Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
* Bump MSRV from 1.86 to 1.89Gabriela Moldovan2026-02-161-1/+1
| | | | | | | As agreed at our last team meeting. See https://gitlab.torproject.org/tpo/core/arti/#minimum-supported-rust-version
* Bump time to 0.3.47Gabriela Moldovan2026-02-161-1/+1
| | | | | | This enables us to un-ignore RUSTSEC-2026-0009. See #2341 for analysis of impact.
* release: Bump `arti-*` and `tor-*` crates to 0.39.0Wesley Aptekar-Cassels2026-02-021-11/+11
| | | | | | | | | | Done via: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.39.0 done ```
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* cargo: Update `arti-*` and `tor-*` to `0.38.0`Clara Engler2026-01-121-11/+11
| | | | | | | | | Done using the following: ```bash for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.38.0 done ```
* Merge branch 'ticket1223' into 'main'Nick Mathewson2025-12-043-4/+84
|\ | | | | | | | | | | | | Refactor common code that builds circtargets for HS. Closes #1223 See merge request tpo/core/arti!3530
| * Refactor common code that builds circtargets for HS.Nick Mathewson2025-12-043-4/+84
| | | | | | | | | | | | | | | | | | This code was duplicated across hsclient and hsservice. Logically, it belongs in netdir, since that's where we have the latest required-protocol information, and the ability to look up relays by IDs. Closes #1223
* | Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-042-4/+0
|/ | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* Bump all the unstable tor- and arti- crates to 0.37.0.Gabriela Moldovan2025-12-021-11/+11
| | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.37.0 done
* RelayFlags: Use RelayFlag enum variant names everywhereIan Jackson2025-11-183-17/+17
| | | | | | | Abolish the constants with the transitional names. This also abolishes the controversial name `H_S_DIR`, which Rust case transformation rules generated from `HSDir`.
* RelayFlags: Use the singular RelayFlag for naming individual flagsIan Jackson2025-11-183-20/+20
| | | | | | | | | | | | | | We're going to separate RelayFlag from RelayFlags. We could continue to provide a bunch of constant values for RelayFlags, for each individual type, but that would involve an ad-hoc derive, and would still be a bit of an unusual API. Instead, we're going to make ``RelayFlag` a normal enum. In this commit, we change everyone to refer to it by its singular name. Hopefully separating out this bulk change makes both this, and the core commit, easier to review.
* tor-netdoc: Remove the RelayFlags type alias in netstatusIan Jackson2025-11-183-4/+5
| | | | I would do `#[deprecated]` but empirically that has no effect...
* tor-netdoc: Rename RelayFlags elements for regularity vs specIan Jackson2025-11-182-4/+4
| | | | | Add underscores so that the spec keywords and the flag constants correspond (according to `paste`'s case-changing rules).
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-066-7/+7
| | | | Run maint/add_warning
* maint: bump minor versions of all published cratesSteven Engler2025-10-291-11/+11
| | | | | | | ```bash readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name') for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done ```
* Bump MSRV from 1.85.1 to 1.86Clara Engler2025-10-211-1/+1
|
* tor-netdoc: RouterStatus: unify `orport_addrs` and `addrs` methodsIan Jackson2025-10-061-2/+2
| | | | | | | We had two functions with different return types but identical semantics. Replace them with one function returning `impl Iterator`. Make it return owned addresses. These are small.
* tor-linkspec: Change HasAddrs::addrs to return an IteratorIan Jackson2025-10-061-4/+3
| | | | | | | | This will let us model the actual structure of routerstatus entries in netdocs more closely. They don't have the addresses in a single list. When this code was written this would have been much more awkward, but now we have RPITIT.
* release: Bump versions.Wesley Aptekar-Cassels2025-10-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we've updated our MSRV, we must bump the minor version for every package. This was done as follows: cargo set-version -p arti 1.6.0 cargo set-version -p oneshot-fused-workaround 0.4.0 cargo set-version -p slotmap-careful 0.4.0 cargo set-version -p test-temp-dir 0.5.0 cargo set-version -p fslock-guard 0.4.0 cargo set-version -p hashx 0.5.0 cargo set-version -p equix 0.4.0 cargo set-version -p caret 0.7.0 cargo set-version -p fs-mistrust 0.12.0 cargo set-version -p safelog 0.6.0 cargo set-version -p retry-error 0.8.0 xargs -I P <<END cargo set-version -p P 0.35.0 tor-basic-utils 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-keymgr tor-chanmgr tor-ptmgr tor-dircommon tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-dirserver tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* Merge branch 'xon-xoff-checker' into 'main'David Goulet2025-09-151-0/+33
|\ | | | | | | | | tor-proto,tor-netdir: add flow control consensus parameters See merge request tpo/core/arti!3249
| * tor-netdir: add flow control parameters to `NetParameters`Steven Engler2025-09-101-0/+33
| |
* | tor-netdir: change default `cc_alg` from 0 to 2Steven Engler2025-09-101-5/+1
|/ | | | | | | | This is fine because we still default to non-cc circuits unless the "flowctl-cc" feature is enabled. See `exit_circparams_from_netparams` and `onion_circparams_from_netparams` from `tor_circmgr::build`, where both will only call `build_cc_vegas()` if `cfg(feature = "flowctl-cc")`, and otherwise call `build_cc_fixedwindow()`.
* Bump MSRV from 1.85 to 1.85.1Nick Mathewson2025-09-091-1/+1
| | | | Closes #2107
* tor-netdir: Removed dependency on `static_assertions`hashcatHitman2025-09-012-3/+1
| | | | | | | | Replaced use of [`static_assertions::const_assert`] with the newly available "assert in const" pattern. This completely removes the dependency on `static_assertions` for `tor-netdir`. Signed-off-by: hashcatHitman <[email protected]>
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-11/+11
| | | | | | | | 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.
* tor-netdoc: Apply much rustfmt churnIan Jackson2025-08-263-10/+5
|
* tor-netdoc: Combine ConsensusRouterStatus and GenericRouterStatusIan Jackson2025-08-263-14/+14
| | | | Now we only need one type.
* tor-netdoc: Abolish RouterStatus trait in favour of generic methodsIan Jackson2025-08-261-2/+2
| | | | | Our approach to sharing code between md and plain consensuses is now the new "variety" system, not generics.
* tor-netdoc: Remove generics from Consensus and its contentsIan Jackson2025-08-263-12/+12
|
* tor-netdoc: netstatus: Move everything variety-specificIan Jackson2025-08-263-14/+14
| | | | | | | | | This is much code motion. This splits many types into two. For example, `Conensus` is now`plain::Consensus<RS>` and `md::Consensus<RS>`. We're going to get rid of the generics later in this branch.
* clippy: fix `clippy::duplicated_attributes` warningsSteven Engler2025-08-111-1/+0
| | | | | | | | | | ```text warning: duplicated attribute --> crates/tor-hsservice/src/timeout_track.rs:630:14 | 630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
* Fix warnings and errors from edition 2024.Nick Mathewson2025-08-071-28/+20
| | | | | | | | | | The two main causes of errors were: - Since some of the lifetime rules have changed, we no longer need to do as many "bind a variable and immediately return it" patterns, and so clippy now warns about them. - We needed to adjust the explicit captures (`use<...>`) in a couple of our RPIT instances.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-075-30/+31
| | | | | | | | | | | | | | 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.
* Merge branch 'prop362-fixups' into 'main'wesleyac2025-08-051-0/+24
|\ | | | | | | | | Fix a few TODOs for PoW See merge request tpo/core/arti!3106
| * tor-hsservice: Time out RendRequests in PoW queue.Wesley Aptekar-Cassels2025-08-051-1/+0
| |
| * tor-hsservice: Add consensus params for Prop 362.Wesley Aptekar-Cassels2025-08-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | This adds the three new parameters specified in Prop 362 [0]. Two of these replace hardcoded defaults in the code. The third, HiddenServiceProofOfWorkV1ServiceIntroTimeoutSeconds, is not implemented yet, but will be in a future commit. [0]: https://spec.torproject.org/proposals/362-update-pow-control-loop.html
* | 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
|/
* Merge branch 'fix_rustdoc_nightly' into 'main'Nick Mathewson2025-08-052-1/+5
|\ | | | | | | | | Fix errors from rustdoc nightly. See merge request tpo/core/arti!3124
| * Fix errors from rustdoc nightly.Nick Mathewson2025-08-052-1/+5
| |
* | 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-10/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge branch 'prop360-combined' into 'main'Nick Mathewson2025-07-101-0/+10
|\ | | | | | | | | | | | | Implement proposal 360 (limit HsDesc inflation opportunities) Closes #2046 See merge request tpo/core/arti!3070
| * Suggestions from @gabi-250 on prop360 implementation.Nick Mathewson2025-07-101-1/+1
| |
| * netdir: new parameters from prop360.Nick Mathewson2025-07-101-0/+10
| | | | | | | | (maxima are as amended in torspec!411)
* | Typo fixes (automatic and hand-verified)Nick Mathewson2025-07-092-2/+2
|/ | | | Made with https://crates.io/crates/typos-cli
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-11/+11
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```