summaryrefslogtreecommitdiff
path: root/crates/tor-netdir
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
| * tor-netdir: Provide hs_all_time_periods instead of ..._secondary_...Ian Jackson2023-03-301-5/+8
| | | | | | | | | | | | | | | | I don't think the server-side support will want to explicitly call current and then secondary. Rather, it will want to iterate over all the relevant ones. And fix the name, and add another comment about whether we need this.
| * tor-netdir: Rename hs_time_periodIan Jackson2023-03-301-3/+5
| | | | | | | | | | | | | | | | Change its name to hs_* like we do with things at this layer. But, it turns out, that at least for hs client connections to fetch the descriptor, I don't seem to need to call it yet ? Maybe it's not needed.
| * tor-netdir: Sort out HsDirOpIan Jackson2023-03-301-2/+3
| | | | | | | | | | * Change its name to Hs* like we do with things at this layer * Make the Upload variant cfg-conditional
| * tor-netdir: Reorganise iteration over hsdir ringsIan Jackson2023-03-301-4/+24
| | | | | | | | | | Provide iter_for_op, by changing iter into iter_filter_secondary and having a new entrypoint iter.
| * tor-netdir: Provide relay_by_rs_idxIan Jackson2023-03-301-0/+16
| |
* | Patchlevel bumps for crates whose dependencies just changed.Nick Mathewson2023-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates had no changes until just a moment ago. But since we updated the versions on some of their dependents, they have now changed themselves. Thus they get patchlevel bumps. ``` tor-rtmock tor-protover tor-socksproto tor-consdiff tor-chanmgr tor-dirclient tor-hsservice ```
* | Bump crate versions that have breaking changesNick Mathewson2023-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | These crates have had breaking changes. They are pre-1.0, so they get a minor bump. ``` tor-basic-utils tor-config ```
* | Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* | Bump patchlevel on crates with semver-irrelevant changes.Nick Mathewson2023-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Their dependents are _not_ updated to a more recent version. These bumped the version of a dependency that they don't expose ``` tor-rtcompat fs-mistrust ``` This one had internal refactoring: ``` tor-netdir ``` These had trivial changes only: ``` tor-checkable tor-ptmgr tor-guardmgr arti-hyper arti-bench arti-testing ```
* | tor-netdir: Implmeent HsDirRing::find_posIan Jackson2023-03-301-2/+3
| |
* | tor-netdir: Make the hsdir ring be a TiVecIan Jackson2023-03-301-5/+14
|/ | | | This eliminates an untyped `usize` index.
* tor-netdir: Use `pos` not `idx` in test network constructorsIan Jackson2023-03-271-14/+14
| | | | | | | | | There are too many things called "index" here. `idx` could be read to mean the table index `RouterStatusIdx`, the hsdir hash `HsDirIndex`, or an entry in some other one of these tables. Here's, it's just the sequence number of the index in the test netdir. Use `pos` for that. (`seq` would have been another possibility.)
* tor-netdir: Use `hsdir_index` for hidden service directory hashval (fmt)Ian Jackson2023-03-271-1/+4
|
* tor-netdir: Use `hsdir_index` for hidden service directory hashvalIan Jackson2023-03-271-11/+11
| | | | | | | | | | | | | | The hidden services directory hashring is a ring of hsdir relays, sorted by a hash that the spec calls the "index". That's `HsDirIndex`. This was a bad idea because the word "index" is seriously overused, but in Arti we must use the same terminology. At least, qualify it everywhere. Now one of these hsdir sort position hashes is always, in our code, an `hsdir_index`. I think this is necessary even inside modules called `hsdir_*`, because those can deal with other kind of "index" too.
* tor-netdir: eliminate ref to abolished MdEntryIan Jackson2023-03-271-2/+2
| | | | | This was removed in c3e74973b4201f71275d8cf4c0c954cfb8d0eba5 netdir: Use an even smaller rep for list of microdescs
* tor-netdir: Use `rsidx` consistent for `RouterStatusIdx`Ian Jackson2023-03-272-42/+42
| | | | | | | | | This is an `IndexVec` key type. Some places used `idx`, some `rsi`, some `rs_idx`. Use `rsidx` for it everywhere, including in locals, function names, and fields. `rsidx` is a compromise. `rsi` might be a bit opaque, but we want a one-"word" name since it appears inside other names.
* Upgrade to bitflags 2.0Nick Mathewson2023-03-132-2/+3
| | | | | This version of bitflags now requires us to explicitly list the traits that we want to derive for our bit-flags structs.
* Remove semver.md files now that 1.1.2 is out.Nick Mathewson2023-02-281-1/+0
|
* Patchlevel bumps for remaining changed crates.Nick Mathewson2023-02-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had small code changes, but no API additions: tor-config tor-socksproto tor-cert tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr arti tor-hsservice tor-congestion These crates have had API extensions: fs-mistrust tor-llcrypto tor-bytes tor-checkable tor-linkspec tor-netdoc tor-persist arti-client
* Bump tor-units version for breaking change.Nick Mathewson2023-02-281-1/+1
| | | | | | | | (The breaking change was removing `as_days()` from IntegerMinutes.) We are _not_ calling this a downstream-api breaking change, per discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012?commit_id=bb2ab7c2a3e0994bb438188511688b5b039cae29#note_2876819
* Bump patch-versions for breaking changes in tor-hs{crypto,client}Nick Mathewson2023-02-281-1/+1
| | | | | | These are API breaks, but the crates themselves are currently 100% experimental, so there's no need to bump the minor versions according to our semver rules.
* Bump minor versions for significant breaking changes.Nick Mathewson2023-02-281-1/+1
| | | | This includes tor-cell, tor-proto, and tor-netdir.
* Rename onion-* cargo features to hs-* in tor-* cratesIan Jackson2023-02-284-35/+35
| | | | Fixes #756
* Fix minimal-versions (.then_some is too new)Ian Jackson2023-02-091-1/+1
|
* tor-netdir: Make is_hsdir_for_ring crate-localIan Jackson2023-02-091-1/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012#note_2876824
* tor-netdir: Document fill_from_previous_netdir semverIan Jackson2023-02-091-0/+1
|
* Clarify which netdir index is meantNick Mathewson2023-02-091-1/+2
|
* Fix typosNick Mathewson2023-02-091-2/+2
|