summaryrefslogtreecommitdiff
path: root/crates/tor-dirserver/Cargo.toml
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions for tor-* and arti-* cratesSteven Engler2026-08-031-9/+9
| | | | | | | ```bash readarray -t bump < <(maint/list-crates | grep -P '^tor-|^arti-') for crate in "${bump[@]}"; do cargo set-version --bump minor -p "${crate}"; done ```
* Bump edition of tor-dirserver and tor-dirauthIan Jackson2026-07-221-1/+1
| | | | | Apparently these crate creations were outstanding when the workspace's edition was increased.
* Merge branch 'version-bumps'Nick Mathewson2026-06-301-10/+10
|\
| * Version bumps for 2.5.0Nick Mathewson2026-06-301-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Closes #2617. We've lucked out this time, and it turns out that every one of our published crates gets a minor bump. So this was generated with: ``` for cr in $(./maint/list-crates); do cargo set-version -p $cr --bump minor done ```
* | Run "fixup-features".Nick Mathewson2026-06-301-0/+1
|/
* tor-dirserver: Change "categories" in Cargo.tomlIan Jackson2026-06-221-1/+1
| | | | We already seem to use "network-programming", which kind of fits.
* Bump MSRV to 1.91Clara Engler2026-06-151-1/+1
| | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* tor-dirserver: Promote tor-checkable depIan Jackson2026-06-101-1/+1
| | | | We're going to need to talk about Timebound in the non-test code.
* dirserver,netdoc: Upgrade to the latest saturating-timeGabriela Moldovan2026-06-031-1/+1
|
* Bump all the unstable tor- and arti- crates to 0.43.0Gabriela Moldovan2026-06-011-8/+8
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+1
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p arti-client 0.42.0 cargo set-version -p arti-config 0.42.0 cargo set-version -p arti-relay 0.42.0 cargo set-version -p arti-rpc-client-core 0.42.0 cargo set-version -p arti-rpcserver 0.42.0 cargo set-version -p arti-testing 0.42.0 cargo set-version -p arti-ureq 0.42.0 cargo set-version -p tor-async-utils 0.42.0 cargo set-version -p tor-basic-utils 0.42.0 cargo set-version -p tor-bytes 0.42.0 cargo set-version -p tor-cell 0.42.0 cargo set-version -p tor-cert 0.42.0 cargo set-version -p tor-cert-x509 0.42.0 cargo set-version -p tor-chanmgr 0.42.0 cargo set-version -p tor-checkable 0.42.0 cargo set-version -p tor-circmgr 0.42.0 cargo set-version -p tor-config 0.42.0 cargo set-version -p tor-config-path 0.42.0 cargo set-version -p tor-consdiff 0.42.0 cargo set-version -p tor-dirclient 0.42.0 cargo set-version -p tor-dircommon 0.42.0 cargo set-version -p tor-dirmgr 0.42.0 cargo set-version -p tor-dirserver 0.42.0 cargo set-version -p tor-error 0.42.0 cargo set-version -p tor-events 0.42.0 cargo set-version -p tor-general-addr 0.42.0 cargo set-version -p tor-geoip 0.42.0 cargo set-version -p tor-guardmgr 0.42.0 cargo set-version -p tor-hsclient 0.42.0 cargo set-version -p tor-hscrypto 0.42.0 cargo set-version -p tor-hsrproxy 0.42.0 cargo set-version -p tor-hsservice 0.42.0 cargo set-version -p tor-key-forge 0.42.0 cargo set-version -p tor-keymgr 0.42.0 cargo set-version -p tor-linkspec 0.42.0 cargo set-version -p tor-llcrypto 0.42.0 cargo set-version -p tor-log-ratelim 0.42.0 cargo set-version -p tor-memquota 0.42.0 cargo set-version -p tor-memquota-cost 0.42.0 cargo set-version -p tor-netdir 0.42.0 cargo set-version -p tor-netdoc 0.42.0 cargo set-version -p tor-persist 0.42.0 cargo set-version -p tor-proto 0.42.0 cargo set-version -p tor-protover 0.42.0 cargo set-version -p tor-ptmgr 0.42.0 cargo set-version -p tor-relay-crypto 0.42.0 cargo set-version -p tor-relay-selection 0.42.0 cargo set-version -p tor-rpcbase 0.42.0 cargo set-version -p tor-rpc-connect 0.42.0 cargo set-version -p tor-rtcompat 0.42.0 cargo set-version -p tor-rtmock 0.42.0 cargo set-version -p tor-socksproto 0.42.0 cargo set-version -p tor-units 0.42.0
* tor-dirserver: Add tor-checkable as dev-dependencyClara Engler2026-04-281-0/+1
| | | | | This is required to do some signature validation on legacy types in an upcoming commit.
* Update to rusqlite 0.39.xIan Jackson2026-03-311-2/+2
| | | | | Relax the r2d2 and rusqlite deps, and manually pick the relevant hunks from `cargo update` in Cargo.lock.
* Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* Bump versions: minor, with dependenciesIan Jackson2026-03-301-1/+1
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with cargo set-version --offline --bump minor -p retry-error
* tor-dirserver: Use tor-llcrypto for digestsClara Engler2026-03-091-3/+0
| | | | | | | | This commit replaces the uses of sha1, sha2, and sha3 with their respective pedants from tor-llcrypto for better consistency. Internally, they still use the same logic and underlying crates but let's use this encapsulation nonetheless.
* tor-dirserver: Use getters for meta structsClara Engler2026-03-091-0/+1
| | | | | | This approach is better in order to guarantee that invariants are not violated, such that the expiry timestamp not being earlier than the valid after one for example.
* tor-dirserver: Implement Sha1Clara Engler2026-03-091-0/+1
| | | | | This commit implements Sha1 for the database in order to use it for the fingerprints in authority key certificates.
* tor-dirserver: Implement Sha3_256Clara Engler2026-03-091-0/+1
| | | | | This commit implements Sha3_256 as a database type and uses it for stroing `ConsensusMeta::unsigned_sha3_256`.
* tor-dirserver: Generic database hash implementationClara Engler2026-03-091-0/+1
| | | | | | | | | | | | | | | This commit moves the `DocumentId` implementation into a macro called `impl_hash_wrapper` that implements a hash type in a database compatible fashion. In our case, we implement this for `sha2::Sha256` and then type alias `DocumentId` to this new hash. Yes, we originally moved away from a type alias here, but I think this is fine because for the foreseeable future, we will continue to use a hash here, just maybe not Sha2, but the flexibility remains. The motivation for this is to support other hash algorithms similarly too.
* deps: relax `libsqlite3-sys` version requirementHydroxideUnlaced2026-03-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue concerns `libsqlite3-sys` linking to a native library. Cargo cannot handle multiple versions/crates linking to the same native library. This affects both the `tor-dirmgr` and `tor-dirserver` crates, which depend on `rusqlite`. Relaxing the version requirement gives downstream projects flexibility so cargo can select an appropriate `libsqlite3-sys` version without a high chance of conflicts caused by pinning a specific version. The proposed supported version range was determined by testing until encountering a version lacking a feature currently in use (breaking unchange?). Regarding testing, the current CI with minimum-version test only validates the maximum and minimum versions, so breaking changes introduced between them can pass unnoticed. Tools like [Cargo-Bounds](https://github.com/vivax3794/cargo_bounds) can help, but this is out of scope for this MR. Also, supported versions of `rusqlite` for `tor-dirmgr` and `tor-dirserver` differ, so running tests for the whole project (same workspace) causes cargo to pick only overlapping versions, which hides parts of each crate’s supported range. Referencing #754, after this MR, increasing the maximum version or decreasing the minimum version of `rusqlite` shouldn't be a breaking change, but increasing the minimum version could be. Resolves: #1740
* Bump strum to 0.28Gabriela Moldovan2026-03-041-1/+1
|
* Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-8/+8
| | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.40.0 done
* Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2026-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list-crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` Because this release bumps the MSRV, I am bumping the minor version of all of them. MINOR=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* 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
* Set package.metadata.docs.rs.all-features to true for all cratesNiel Duysters2026-02-091-0/+3
| | | | Makes docs.rs also document types behind optional feature flags.
* release: Bump `arti-*` and `tor-*` crates to 0.39.0Wesley Aptekar-Cassels2026-02-021-8/+8
| | | | | | | | | | Done via: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.39.0 done ```
* release: run fixup-features.Wesley Aptekar-Cassels2026-01-291-0/+1
|
* tor-dirserver: Implement authcert retrieval logicClara Engler2026-01-151-1/+1
| | | | | | | | | | | This commit implements the logic necessary to retrieve the (missing) directory authority certificates from an upstream directory authority. In order to do so, this commit implements three new functions: 1. `download_authority_certificates()` 2. `parse_authority_certificates()` 3. `verify_authority_certificates()` 4. `insert_authority_certificates()`
* tor-dirserver: Support for inserting into storeClara Engler2026-01-151-5/+5
| | | | | | | | This commit implements support for adding arbitrary documents into the store table. It is non-trivial because the relevant data has to be compressed into various formats, so it can be retrieved without delays.
* tor-dirserver: Test authcert queryingClara Engler2026-01-151-0/+1
|
* tor-dirserver: Add get_recent_authority_certificatesClara Engler2026-01-151-1/+1
| | | | | | | This commit adds the `get_recent_authority_certificates()` function to the operation of a directory mirror, which is responsible for looking up the certificates in the database, returning the parsed found ones as well as the missing ones.
* tor-dirserver: Speedup tests using tokio's test-utilClara Engler2026-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | This commit speeds up the tests in `tor-dirserver` by using functionality from Tokio's `test-util`. Most notably, it runs the time intensive test in paused mode, which means that the clock gets advanced either explicitly or implicitly using auto-advance in case the runtime has nothing to do. In our case, the last one, auto-advancing, is used, leading to our sleep calls returning immediately. This is good enough for testing in this module. It is not the responsibility of tor-dirserver to ensure whether `RetryDelay` returns proper values, as this is the responsibility of `tor-basic-utils`. Still, it is a bit unfortunate that Tokio offers no way to manually disbale the auto-advancing. In the future, it might be useful to migrate more parts of this to crate to `tor-rtcompat`, but for now, this change is a good enough performance fix.
* cargo: Upgrade dependencies potentially breakingClara Engler2026-01-141-2/+2
|
* Merge branch 'version-bump' into 'main'Clara Engler2026-01-131-8/+8
|\ | | | | | | | | Bump dependencies for 1.9.0 See merge request tpo/core/arti!3570
| * cargo: Bump all non arti/tor cratesClara Engler2026-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only includes retry-error which had a few functional additions in December, thereby rasing the minor version as new features were added to the public API. Done using the following: * Find all non arti, non tor crates. * `ls -1 crates/ | grep -v "^tor-\|^arti"` * Exclude the ones without changes. * `maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change"` * Look into each with changes. * In this case only retry-error. * Bump the minor because it had non-trivial changes.
| * cargo: Update `arti-*` and `tor-*` to `0.38.0`Clara Engler2026-01-121-7/+7
| | | | | | | | | | | | | | | | | | Done using the following: ```bash for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.38.0 done ```
* | cargo: Run fixup-features for releaseClara Engler2026-01-121-0/+3
|/ | | | | | | Executed command: ``` cargo run -p fixup-features -- --exclude examples/ --exclude maint/ Cargo.toml ```
* tor-dirserver: Implement DownloadManagerClara Engler2025-12-101-0/+4
| | | | | | | | | This commit implements the DownloadManager in its own module, an object responsible for downloading network documents from an upstream directory authority. Further motivation for this can be found in the rustdoc comment of the respectively introduced type.
* Bump all the unstable tor- and arti- crates to 0.37.0.Gabriela Moldovan2025-12-021-5/+5
| | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.37.0 done
* dirserver: Run cargo-sort in preparation for releaseGabriela Moldovan2025-12-011-3/+8
|
* Run fixup-features in preparation for releaseGabriela Moldovan2025-12-011-1/+1
|
* tor-dirserver: Use `saturating-time`Clara Engler2025-11-261-0/+1
| | | | | | | This commit replaces the custom implementation of `SaturatingSystemTime` with the `saturating-time` crate, additionally adding a new type to the `database` module called `Timestamp`, in order to have a convenient wrapper around `ToSql` and `FromSql`.
* tor-dirserver: Add SaturatingSystemTimeClara Engler2025-10-301-0/+1
| | | | | | This commit changes various things in the dirmirror operation, namely the use of a SystemTime wrapper type that provides saturation on both ends.
* tor-dirserver: Make database full syncClara Engler2025-10-301-3/+2
| | | | | | | | | | This commit makes the entire database operations synchronous, thereby replacing deadpool with r2d2. The full motivation is outlined in a rustdoc comment at the top of the `database` module, but it can be summarized to the fact that SQLite is by design inherently synchronous due to directly interfacing with the file system.
* tor-dirserver: Implement download timeoutClara Engler2025-10-301-0/+3
| | | | | | | | | | This commit starts work in the `mirror::operation` module by implementing the functions for calculating the `Duration` to wait from a given `SystemTime` until the point in time when the dirmirror should download new documents from the authorities again. Also, this commit introduces new error types and internal helper functions in order to fulfill this purpose better.
* tor-dirserver: Outline the `mirror` APIClara Engler2025-10-301-0/+1
| | | | | | This commit introduces the `mirror` module which is fairly boilerplate at the moment. However, everything of it is very well documented using rustdoc, thereby more or less creating a design document.
* maint: bump minor versions of all published cratesSteven Engler2025-10-291-2/+2
| | | | | | | ```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 ```
* tor-dirserver: bump MSRV from 1.83 to 1.86hashcatHitman2025-10-211-1/+1
| | | | | | | | | | | | I noticed that when doing `cargo generate-lockfile` in the workspace root, it was locking dependencies to 1.83 compatible versions. It turns out tor-dirserver started on MSRV 1.83 after we already bumped to 1.85, and has been missed in MSRV updates ever since. I've found no indication it is intentionally getting this special treatment and am assuming it is a mistake. Signed-off-by: hashcatHitman <[email protected]>