summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-011-13/+13
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* 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 'proto_enforce' into 'main'Nick Mathewson2025-04-224-26/+233
|\ | | | | | | | | | | | | Enforce recommended and required protocol versions in arti-client Closes #1849 and #1923 See merge request tpo/core/arti!2929
| * netdoc: Require serde feature from tor-protover.Nick Mathewson2025-04-161-1/+1
| |
| * netdoc: improve documentation for check_protocolsNick Mathewson2025-04-161-1/+7
| |
| * protover, *: Add documentation about what "supported" means.Nick Mathewson2025-04-161-1/+2
| |
| * Fix a pair of documentation links.Nick Mathewson2025-04-161-2/+2
| |
| * Add warnings about removing supported protocols.Nick Mathewson2025-04-161-0/+2
| |
| * Implement PartialEq for ProtoStatuses unconditionally.Nick Mathewson2025-04-161-4/+2
| |
| * protover,netdoc: Implement serde for Protocols etc.Nick Mathewson2025-04-162-3/+37
| |
| * netdoc: Put all ProtoStatuses into a single Arc<>d objectNick Mathewson2025-04-162-19/+55
| | | | | | | | | | We'll want this so that we can expose them before we expose the rest of the consensus (which we need to do for spec conformance).
| * netdoc: functionality for detecting missing subprotos.Nick Mathewson2025-04-161-2/+91
| | | | | | | | Also, add a new ErrorKind for this sort of error.
| * New functions to report supported subprotocolsNick Mathewson2025-04-161-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | tor-netdoc: Joined OnceLock import with other std::sync importshashcatHitman2025-04-171-2/+1
| | | | | | | | Whoops! Missed that.
* | tor-netdoc: Replace OnceCell with OnceLockhashcatHitman2025-04-171-3/+3
|/ | | | - [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`].
* tor-netdoc: use more idiomatic rustSteven Engler2025-04-031-2/+1
|
* tor-netdoc: fix `clippy::len_zero`Steven Engler2025-04-031-1/+1
| | | | | | | | | | | | | | | | | | ```text warning: length comparison to one --> crates/tor-netdoc/src/parse/tokenize.rs:470:12 | 470 | if args.len() >= 1 { | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero note: the lint level is defined here --> crates/tor-netdoc/src/lib.rs:9:9 | 9 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::len_zero)]` implied by `#[warn(clippy::all)]` ```
* Remove semver.md files post-release.Gabriela Moldovan2025-04-011-1/+0
|
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-13/+13
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 done ```
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-184-9/+9
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-182-2/+2
| | | | - `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.
* Always use full path to rand::thread_rng().Nick Mathewson2025-03-181-2/+1
| | | | | This is partly for consistency, and partly to facilitate a global search-and-replace.
* Merge branch 'interface-abstraction-of-the-daleks' into 'main'Nick Mathewson2025-03-181-1/+0
|\ | | | | | | | | Wrap x25519-dalek and ed25519-dalek types. See merge request tpo/core/arti!2868
| * Wrap ed25519-dalek types.Nick Mathewson2025-03-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | With this change, we'll no longer need to expose the types from dalek-cryptography as part of our API, and we'll have more freedom to switch ed25519 implementations, or to upgrade to a newer `rand` ahead of their schedule. Unlike with x25519-dalek, I had to tweak the API a bit: There's no way to get a &PublicKey out of a Keypair now, and implementing the old ed25519-dalek traits seemed unnecessary.
* | netdoc: Reject BOMs and NULs.Nick Mathewson2025-03-173-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | Per <https://spec.torproject.org/dir-spec/netdoc.html>, our netdocs never have a BOM, and never have internal NULs. This makes Arti reject such documents. For arguments on why it's okay to increase parser strictness, see the (forthcoming) proposal 356 at torspec!342, and see older discussion at torspec#296. Closes #1739.
* | netdoc: Make some parsing init functions fallible.Nick Mathewson2025-03-1710-38/+41
|/ | | | | | | 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: task: Remove Default impl for ThreadDescriptorIan Jackson2025-03-041-1/+1
| | | | | | | | | This is going to become a hazard. Let's be explicit. This means using educe to derive the Default for Data. We also need to update our educe dependency to 0.4.22, since that's when Default(expression= "...") started working correctly.
* Bump minor versions in tor-*, arti-*.Nick Mathewson2025-03-031-13/+13
|
* 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.
* Merge branch 'happy-families' into 'main'Nick Mathewson2025-02-256-6/+286
|\ | | | | | | | | | | | | Client implementation for happy families Closes #1848 See merge request tpo/core/arti!2792
| * netdoc: Add "family-cert" entries to routerdesc parserNick Mathewson2025-02-252-3/+141
| |
| * netdoc: Add "family-ids" line to microdesc parserNick Mathewson2025-02-123-2/+64
| |
| * netdoc: Type to represent a relay family idNick Mathewson2025-02-121-1/+81
| | | | | | | | | | This corresponds to the entries in "family-ids" in the happy families design.
* | tor-netdoc: Fix useless conversion warning.Gabriela Moldovan2025-02-241-1/+1
|/ | | | This fixes a warning that triggers on the latest stable release (1.85).
* Version bumps to 0.27.0Ian Jackson2025-02-061-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 $
* Bump versions of internal arti crates for Arti 1.3.2Nick Mathewson2025-01-071-13/+13
| | | | | | | | | | | | | The affected crates follow our regular versioning. They all get bumped to 0.26.0. Done with ``` for crate in $(./maint/list_crates |grep '^arti-\|tor-' ); do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'mod-module-files' into 'main'Nick Mathewson2025-01-071-0/+1
|\ | | | | | | | | clippy: deny `mod_module_files` See merge request tpo/core/arti!2689
| * clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | | | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* | fix: fix typosDimitris Apostolou2025-01-061-1/+1
|/
* Upgrade to itertools 0.14.0Nick Mathewson2025-01-061-2/+2
|
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Bump all the unstable tor- and arti- crates to 0.25.0.Gabriela Moldovan2024-12-021-13/+13
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.25.0 done ```
* tor-netdoc: Bump tinystr to 0.8.0.Gabriela Moldovan2024-11-281-1/+1
| | | | | According to the changelog, moving from 0.7.6 to 0.8.0 we get some new constructors and breaking changes to various "general" APIs.
* PoW: Consolidate feature flags into a single flag.Wesley Aptekar-Cassels2024-11-257-20/+18
| | | | | | | | | | | | | | | | | This replaces the hs-pow, hs-pow-full, hs-pow-v1, pow-v1, and pow-full features with a single hs-pow-full feature. It's possible that in the future we will want to split different schemes into different features, but we can do that when it comes up. For now, having this as a single flag makes it clearer what's going on, since the previous thing was not actually expressive enough to capture some things we care about (like "at least one pow scheme is enabled" that works in a future-compatible way). This change is not semver breaking since it's a experimental feature. Related: #1751
* tor-netdoc: Error on PowParams::V1 when hs-pow-v1 is disabled.Wesley Aptekar-Cassels2024-11-251-2/+11
|
* tor-netdoc: Don't include pow_params in HsDesc when feature is disabled.Wesley Aptekar-Cassels2024-11-252-7/+8
|
* tor-netdoc: Support writing pow-params line.Wesley Aptekar-Cassels2024-11-253-1/+110
| | | | | | | I'm not particularly happy with the code that does the actual writing out of the pow-params line, in particular the error handling there seems very verbose. However, I don't know of a better way to structure it given that APIs I'm working with.
* TimerangeBound: Stop using std::ops::Bound.Wesley Aptekar-Cassels2024-11-252-7/+7
| | | | Fixes: #1691