aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdir
Commit message (Collapse)AuthorAgeFilesLines
...
* 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 ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* NetParameters::saturating_update: log when a value is out of rangeJim Newsome2025-06-231-1/+71
| | | | | | | On one hand, this can be quite noisy when something *is* out of range. On the other hand, a clamped value shouldn't normally happen, and is likely to result in surprising and otherwise difficult-to-debug behavior.
* Log unrecognized net paramsJim Newsome2025-06-231-1/+4
|
* Merge branch 'hs-interval-min' into 'main'Nick Mathewson2025-06-101-1/+1
|\ | | | | | | | | tor-netdir: decrease minimum hsdir_interval from 30 to 5 See merge request tpo/core/arti!3042
| * tor-netdir: decrease minimum hsdir_interval from 30 to 5Jim Newsome2025-06-101-1/+1
| | | | | | | | | | | | | | | | This matches the spec change: <https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/406> Progress on: <https://gitlab.torproject.org/tpo/core/chutney/-/issues/40038>
* | proto: Move NegotiatedHopSettings to a higher levelNick Mathewson2025-06-101-0/+10
| | | | | | | | | | | | We will construct this object based on the circuit parameters _and_ on the target's supported protocol versions, so we need to do so when we have both pieces of info.
* | Un-pin version of typed-index-collectionsNick Mathewson2025-06-091-3/+1
|/ | | | | | | Now that our MSRV has been updated to 1.83, we should be able to get away with this. Closes #1647. Reverts !2471.
* NetDir::pick_n_relays: avoid some unwarranted warningsJim Newsome2025-06-051-3/+4
| | | | | | | | | | | | | | | | Previously we logged a warning whenever `choose_multiple_weighted` returns `Ok(iter)`, whenever `iter` contains fewer relays than requested. However, this is expected behavior of `choose_multiple_weighted` if the filtered list of relays doesn't have the requested number of relays, in which case it should return all of the relays in the filtered list. In particular, this condition occurs regularly in test networks when looking for candidate relays to add to the potential guard set while excluding those already in the potential guard set. We still warn if the returned list is fewer than requested, *and* fewer than available in the filtered list.
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-11/+11
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* ./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
* netdir, relay-selection: require Fast and Stable for rendpoints.Nick Mathewson2025-05-201-1/+3
| | | | | | Since we don't know what kind of traffic we'll use a rendezvous point for, we don't want to use it if it isn't "Fast" (reasonably high bw) and "Stable" (unlikely to crash soon).
* hs: Prevent a client from using a `MiddleOnly` relay for onion servicesNeel Chauhan2025-05-202-6/+10
| | | | | | > The actual impact of this patch is to prevent usage of MiddleOnly > relays as Introduction Points. The Rendezvous Point logic isn't > hooked up yet - nick
* netdir: fix warning about an opportunity to use saturating_subNick Mathewson2025-05-151-5/+1
|
* 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-012-13/+11
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* tor-netdir: Warn on one more case of insufficient itemsNick Mathewson2025-04-291-1/+12
| | | | | | Now that choose_multiple_weighted can once more return fewer items than requested, we should warn when it does so, to be consistent with our other cases of warning about #1907.
* tor-netdir: test for rand 0.9.1 behavior instead of 0.9.0Nick Mathewson2025-04-291-3/+9
| | | | | | | | Rand 0.9.1 reverted the changes that caused #1903, in https://github.com/rust-random/rand/pull/1623. This broke our test that made sure that rand wasn't going to change their behavior _again_ :)
* 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.
* Merge branch 'todos-msrv' into 'main'Jim Newsome2025-04-241-3/+0
|\ | | | | | | | | various crates: MSRV TODO standardization and cleanup of an old TODO See merge request tpo/core/arti!2945
| * tor-netdir: remove lint allow as per TODOhashcatHitman2025-04-161-3/+0
| | | | | | | | | | - https://github.com/rust-lang/rust-clippy/issues/11764 was fixed upstream, so this is no longer needed.
* | Rename recommended_protocols to protocol_statuses.Nick Mathewson2025-04-163-5/+5
| | | | | | | | | | This name reflects its purpose better than the original one, since it includes required protocols as well as recommended ones.
* | netdir: Add a recommended_protocols() to NetDirProviderNick Mathewson2025-04-163-0/+21
| |
* | dirmgr, netdir: Store protocol requirments as soon as they are validated.Nick Mathewson2025-04-161-0/+4
| |
* | Fix another miscapitalized "MicroDesc"Nick Mathewson2025-04-161-1/+1
|/
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-11/+11
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 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
* netdir: Add a (hopefully) temporary workaroundNick Mathewson2025-03-251-3/+27
| | | | | Instead of doing the more sensible thing when every relay has weight 0, give a warning message.
* netdir: Add a note about using f64Nick Mathewson2025-03-251-0/+8
|
* netdir: Another test for choose_multiple_weighted.Nick Mathewson2025-03-251-0/+17
| | | | | | Here we test the (arguably inconsistent behavior) where can we return fewer items than requested if no item had zero weight. (If this ever becomes an error, we need to modify the calling code.)
* netdir: Warn on unexpected WeightedErrorsNick Mathewson2025-03-251-5/+13
| | | | | | WeightedError::InsufficientNonzero is expected under some circumstances, but the other instances would mean that we have a bug.
* netdir: add a test to verify weighted samplingNick Mathewson2025-03-251-3/+37
| | | | | We want to make sure that behavior for 0-weighted elements is consistent for choose_multiple_weighted and choose_weighted.
* tor-netdir: Handle InsufficientNonZero error.Nick Mathewson2025-03-201-0/+8
| | | | Possible fix for #1902.
* Merge branch 'named_protovers' into 'main'David Goulet2025-03-201-2/+2
|\ | | | | | | | | | | | | protover: Add support for subprotocol version mnemonics. Closes #1891 See merge request tpo/core/arti!2854
| * Use named subprotocol versions throughout arti.Nick Mathewson2025-03-121-2/+2
| |
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-2/+2
| | | | | | | | - The Rng::gen() functions have been renamed to Rng::random().
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | | | - Several methods have been moved out of SliceRandom.
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | | | - The rand::distributions module has been renamed to rand::distr
* | 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.
* Remove semver files for 1.4.1Nick Mathewson2025-03-031-1/+0
|
* Bump minor versions in tor-*, arti-*.Nick Mathewson2025-03-031-11/+11
|
* Upgrade to derive_more 2Nick Mathewson2025-02-261-1/+1
| | | | | This took a little refactoring, since derive_more::Foo no longer re-exports std::ops::Foo.
* netdir: Consider RelayFamilyIds based on family rulesNick Mathewson2025-02-253-12/+29
| | | | | | | This implements the client side of proposal 321. It's a breaking change in netdir, since in_same_family now takes an extra argument.
* relay-selection: Add FamilyRules to exclude_relays_in_same_family.Nick Mathewson2025-02-251-0/+63
| | | | | | | | | | | | When we're trying to exclude relays by family, we need to know which lists to look at. This information ultimately comes from the network parameters. We could avoid this change if we just told clients "look at all family information all the time", but that's not what the proposal says. This is a breaking change.
* netdir: Add client params related to happy families (prop321)Nick Mathewson2025-02-251-0/+10
|
* Version bumps to 0.27.0Ian Jackson2025-02-061-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Release.md. maint/list_crates | grep -P '^tor-|^arti-' | xargs -n1 nailing-cargo -Eu set-version --bump minor -p This completes the version bumps. The report of changed crates, before I started the release work, is: $ maint/changed_crates -v "arti-v$LAST_VERSION" oneshot-fused-workaround: No change. slotmap-careful: No change. test-temp-dir: No change. fslock-guard: No change. hashx: No change. equix: No change. tor-basic-utils: No change. caret: No change. fs-mistrust safelog: No change. retry-error: No change. tor-error tor-general-addr: No change. tor-geoip: No change. tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim: No change. tor-rpcbase tor-memquota: No change. tor-units tor-llcrypto: No change. tor-protover: No change. tor-bytes tor-checkable: No change. tor-cert tor-key-forge tor-hscrypto: No change. tor-socksproto: No change. tor-linkspec: No change. tor-cell: No change. tor-proto tor-netdoc: No change. tor-consdiff: No change. tor-netdir tor-relay-selection: No change. tor-persist tor-chanmgr tor-ptmgr: No change. tor-guardmgr: No change. tor-circmgr tor-dirclient: No change. tor-dirmgr: No change. tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy: No change. tor-relay-crypto arti-client arti-relay arti-rpcserver arti arti-rpc-client-core $
* fix: fix typosDimitris Apostolou2025-01-301-1/+1
|
* netdir: Add congestion control consensus parametersDavid Goulet2025-01-161-22/+101
| | | | | | Related #534 Signed-off-by: David Goulet <[email protected]>
* tor-netdir: Add KIST consensus params.Gabriela Moldovan2025-01-151-0/+26
| | | | | | These are tentative, so I haven't added them to param-spec yet. Part of #1729