summaryrefslogtreecommitdiff
path: root/crates/tor-netdir
Commit message (Collapse)AuthorAgeFilesLines
...
* Downgrade TODO HS on HsDirParams::compute().expect()Nick Mathewson2023-06-292-4/+21
| | | | | | (Adding comments explaining that these errors are really unlikely to occur, unless there is a bug in our code or in Rust's time handling.)
* netdir: Defer a TODO HS but add a commentNick Mathewson2023-06-291-1/+12
| | | | | | This issue with walking over the ring is an issue we really must solve on the services timeframe, as is the one about looking only at the rings for which a blinded ID is germane.
* netdir: take n_replicas and spread_fetch from consensus parametersNick Mathewson2023-06-291-2/+12
| | | | | This makes them configurable, since we allow the user to override any consensus parameter.
* netdir: Downgrade/remove/defer some TODO hs entries.Nick Mathewson2023-06-292-7/+5
|
* netdir: remove some now-needless warning suppressions.Nick Mathewson2023-06-292-3/+0
|
* netdir: remove unnecessary wraps from srv_interval, extract_srvsNick Mathewson2023-06-291-13/+12
|
* netdir: Move voting_period() to netdoc::LifetimeNick Mathewson2023-06-291-14/+7
| | | | | I was going to add a comment about "doing this if we need the voting period anywhere else" but it turns out that we also use it in dirmgr.
* Upgrade to itertools 0.11.0Nick Mathewson2023-06-261-1/+1
| | | | The breaking changes here do not seem to affect us.
* Merge branch 'stderr' into 'main'Alexander Færøy2023-06-211-0/+2
|\ | | | | | | | | lints: Promote clippy::print_stderr and clippy::print_stdout See merge request tpo/core/arti!1271
| * lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
| |
* | Upgrade to strum 0.25.Nick Mathewson2023-06-211-1/+1
|/
* hscrypto: fix TODOs in time-period code.Nick Mathewson2023-06-131-7/+9
| | | | | | * Return a more informative error type (instead of Option) * Check that time periods are an integer number of seconds * Decide not to change the semantics of an argument.
* netdir: Wrap HsDir an Arc<>Nick Mathewson2023-06-091-5/+7
| | | | | | | | This change reduces the cost of cloning a `NetDir`. It's fine since–although we replace the HsDir once–we never modify it once it exists. Closes #883.
* Expand docs for NetDirProviderIan Jackson2023-06-081-0/+7
| | | | | | | | Apropos a question that arose on IRC, to which I felt the answer wasn't 100% unambiguous. Also, reference the usual implementation (it can't be a link because it's an upward reference).
* netdir, netdoc: Add accessors for protocol version status.Nick Mathewson2023-06-062-0/+21
| | | | | | | | | | | The consensus includes a listing for clients and for relays, saying which protocol versions are _required_ for participation on the network, and which versions are _recommended_. We have been parsing this, but not yet exposing it. This commit adds accessors to expose it, since we'll need that in order to create CircTargets for introduction points and rendezvous points.
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* guardmgr, netdir: fix some needless-mut warningsNick Mathewson2023-05-181-2/+2
| | | | Found by clippy nightly
* Merge branch 'resolve_relay' into 'main'Nick Mathewson2023-05-161-0/+142
|\ | | | | | | | | | | | | netdir: New function to check consistency of a HasRelayIds Closes #855 See merge request tpo/core/arti!1186
| * netdir: New function to check consistency of a HasRelayIdsNick Mathewson2023-05-161-0/+142
| | | | | | | | | | | | | | | | | | | | | | This function will be used to look up a relay by a set of LinkSpecs given from an incoming HsDesc or INTRODUCE2 message. It differs from other "lookup relay by IDs" functions in that it needs to be able to return "here's a relay", "couldn't found a relay", or "learned that this relay is impossible." Closes #855: This is the only new API needed for ChanTarget validation, I think.
* | Revise all XXXXs from fixup-featuresNick Mathewson2023-05-151-3/+2
| |
* | Run fixup-features _with_ annotations.Nick Mathewson2023-05-151-0/+2
| | | | | | | | | | This litters our Cargo.toml files with "XXX" entries that we should fix.
* | Reformat Cargo.toml files.Nick Mathewson2023-05-151-1/+12
| |
* | Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-3/+5
|/ | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* tor-netdir: Shuffle the list of HS dirs used for downloading descriptors.Gabriela Moldovan2023-05-041-10/+22
| | | | | | | | We'll probably need the hsdir list to be shuffled deterministically for testing purposes (this might be desirable, for example, when we write a test for HS descriptor download retries). Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-netdir: Update tests to parse the descriptor, make test consensus ↵Gabriela Moldovan2023-05-032-16/+28
| | | | | | lifetime configurable. Signed-off-by: Gabriela Moldovan <[email protected]>
* Upgrade tracing to 0.1.36.Nick Mathewson2023-05-031-1/+1
| | | | | | This is the first version to impl Value for String. With luck, this will get minimal_versions CI passing.
* Increment crate versions.Nick Mathewson2023-05-031-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --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-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --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 tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* Upgrade our hex-literal dependencyNick Mathewson2023-04-131-1/+1
|
* Upgrade our num_enum dependency.Nick Mathewson2023-04-131-1/+1
|
* Use bool::then_some() as appropriateNick Mathewson2023-04-111-1/+1
| | | | | | Now that we require a version of Rust that allows `b.then_some(v)`, clippy complains about our use of `b.then(|| v)`.
* Increment MSRV to 1.65 in every crate.Nick Mathewson2023-04-111-1/+1
|
* Merge branch 'hs' into 'main'Ian Jackson2023-04-112-8/+30
|\ | | | | | | | | Download HS descriptors See merge request tpo/core/arti!1118
| * hs dirs: Note a thing we don't implement yetIan Jackson2023-04-111-0/+11
| | | | | | | | We'll add this later, about here.
| * hs dirs: Implement spread_fetch (fmt)Ian Jackson2023-04-111-1/+4
| |
| * hs dirs: Implement spread_fetchIan Jackson2023-04-112-4/+10
| |
| * hs dirs: Fix wrong ignored variable nameIan Jackson2023-04-111-1/+1
| | | | | | | | This is the HsDirIndex, not the Hs[Blind]Id.
| * hs dirs: Replicas are 1-indexedIan Jackson2023-04-111-2/+2
| |
| * tor-netdir: Make an import more preciseIan Jackson2023-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | With this cargo +stable clippy --locked --offline -p tor-netdir --features=hs-client --all-targets I got this: 64 | use {hsdir_params::HsDirParams, hsdir_ring::HsDirRing, itertools::chain, std::iter}; | ^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
* | tor-netdir: Fix capitalisation of a doc linkIan Jackson2023-04-111-1/+1
| | | | | | | | Fixes a rustdoc warning.
* | tor-netdir: Fix link to hs_time_period functionIan Jackson2023-04-111-1/+1
|/ | | | Fixes a rustdoc warning.
* tor-netdir: testnet: Make all non-guard non-exits be hsdirsIan Jackson2023-04-051-1/+1
|
* Merge branch 'debug-hex' into 'main'Nick Mathewson2023-04-032-3/+7
|\ | | | | | | | | Debug two types as compact hex strings See merge request tpo/core/arti!1104
| * Debug as hex strings for HsBlindId and HsDirIndexIan Jackson2023-03-312-3/+7
| |
* | Merge branch 'netdir' into 'main'Ian Jackson2023-03-312-29/+90
|\ \ | |/ |/| | | | | tor-netdir: API changes to support hsconn hsdir fetch See merge request tpo/core/arti!1094
| * tor-netdir: iter_filter_secondary: Make it less of a messIan Jackson2023-03-301-13/+10
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1094#note_2891857
| * tor-netdir: Expand on comment for HsRingRings::itergabi-2502023-03-301-1/+1
| |
| * tor-netdir: Minor docs fixesgabi-2502023-03-301-2/+3
| |
| * tor-netdir: Provide accessor for params field of HsDirParamsIan Jackson2023-03-301-0/+5
| |
| * tor-netdir: Implement hs_dirs accessorIan Jackson2023-03-301-2/+16
| |
| * tor-netdir: hs_dirs accessor: change semantics, type, and nameIan Jackson2023-03-301-7/+9
| | | | | | | | | | Don't have it take the TP, so that the caller must call it multiple times. Instead, have it return all the relevant relays.