summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr
Commit message (Collapse)AuthorAgeFilesLines
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Update to itertools 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p itertools
* Require strum 0.26.3Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | We're about to update to iterools 0.13.0. We must therefore have a version of strum which is not affected by https://github.com/Peternator7/strum/issues/358 Precisely git-grep -l '^strum' | xargs perl -i~ -pe 's{"0\.26"}{"0.26.3"}' No changes to lockfile - we're already using 0.26.3, except perhaps in the minimal versions test.
* Merge branch 'tolerate_missing_blob' into 'main'Nick Mathewson2024-06-182-24/+164
|\ | | | | | | | | | | | | dirmgr::storage: Treat a missing blob file as an absent object. Closes #1466 See merge request tpo/core/arti!2200
| * sqlite: (style) Use consistent casing on "ExtDocs"Nick Mathewson2024-06-181-2/+2
| | | | | | | | SQL is case-insensitive, but it is still nice to be consistent.
| * storage: Remove orphaned files from dir_blobsNick Mathewson2024-06-122-0/+118
| | | | | | | | | | | | | | | | | | | | This patch removes files from dir_blobs if they are not referenced from the database, or if their filenames are not valid UTF-8. (If they were not valid UTF-8, we wouldn't have put them in our database.) To ensure that there can't be any race conditions, we only do this when the file is a bit old.
| * dirmgr: create temporary testing stores with correct paths.Nick Mathewson2024-06-121-3/+3
| | | | | | | | | | Previously, we were putting an (optional) db.sql file and our blobs into the same path, which is not what we do outside of our tests.
| * dirmgr: reformat cargo.tomlNick Mathewson2024-06-121-1/+2
| |
| * dirmgr::storage: Enable foreign keys on our sqlite connections.Nick Mathewson2024-06-121-0/+4
| | | | | | | | | | | | Without this, "ON DELETE CASCADE" will do nothing. Part of fixing #1466.
| * dirmgr::storage: Treat a missing blob file as an absent object.Nick Mathewson2024-06-121-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was counted as a hard error, which would cause an absolute failure to start if a blob file had been deleted improperly -- for example, by a renegade cache-cleaner that had decided to remove the largest files it could find. Upon encountering a missing blob, we remove it from the database as well: if we did not, then unavailable consensuses could still cause us to try to fetch consensus diffs, because their rows would still be present. Fixes #1466.
* | dirmgr: Limit the number of mds that we will fetch from sqlite at once.Nick Mathewson2024-06-121-6/+14
| | | | | | | | | | | | This should help limit our memory usage when restarting from cache. Possible (imperfect) solution for #1027.
* | dirmgr: split out the loading part of load_once into a new function.Nick Mathewson2024-06-121-6/+17
|/
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - tor-persist - tor-chanmgr - tor-ptmgr - tor-guardmgr - tor-circmgr - tor-dirclient - tor-dirmgr - tor-keymgr - tor-hsclient - tor-hsservice - tor-hsrproxy - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* dirauth: Add new faravahar authorityDavid Goulet2024-05-301-1/+2
| | | | | | | Related to C-tor MR: https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/819 Signed-off-by: David Goulet <[email protected]>
* DirMgr: Clarify dead_code status on storage methods.Nick Mathewson2024-05-141-2/+5
| | | | | | | | | Per comments on #1383, we're keeping these methods. This commit replaces the "TODO" comments with comments explaining why it's okay that this methods are unused. Part of #1383.
* Use the right feature name for an allow(dead_code).Nick Mathewson2024-05-071-1/+1
|
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Bump versions of 0.x tor-* and arti-* cratesIan Jackson2024-04-301-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for p in `cat ../u`; do cargo set-version --locked --offline -p $p; done where u contains tor-basic-utils tor-async-utils tor-error tor-config tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-memquota tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-hyper
* properly report bootstrap readiness without cachetrinity-1686a2024-04-291-0/+3
|
* Mark tor_dirmgr::storage::Store::consensus_by_meta cfg(test)Ian Jackson2024-04-252-0/+2
| | | | This seems to be used only in tests, since at least 2022.
* Add temporary allows for some dead code warningsIan Jackson2024-04-251-0/+2
|
* dirmgr: Use contains_key in check.Nick Mathewson2024-04-221-1/+1
|
* dirauth: New tor26 v3 identityDavid Goulet2024-04-091-1/+1
| | | | | | | C-tor commit for this change: e3e4fa35e8b9368ac549db4da3240aba1ee3054e Signed-off-by: David Goulet <[email protected]>
* remove unused dependenciestrinity-1686a2024-04-021-2/+0
| | | | Edited-by: Nick Mathewson <[email protected]>
* Update unstable `tor/arti-*` crates to 0.17.0.Nick Mathewson2024-04-021-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with: ``` CRATES=" tor-basic-utils tor-async-utils tor-error tor-config tor-events tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing " for crate in $CRATES; do cargo set-version -p "$crate" 0.17.0 done ```
* Bump patchlevel versions on non-{tor/arti} crates.Nick Mathewson2024-04-021-3/+3
| | | | | | | | | | | | | | | | These have all had backward-compatible changes. Generated with: ``` cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p test-temp-dir cargo set-version --bump patch -p fslock-guard cargo set-version --bump patch -p hashx cargo set-version --bump patch -p equix cargo set-version --bump patch -p caret cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error ```
* tor-rtcompat: CompoundRuntime: Add a CoarseTimeProvider, and implIan Jackson2024-03-251-1/+1
| | | | | | In all the uses in-crate, this is just a RealCoarseTimeProvider. Now all the compound runtimes impl CoarseTimeProvider.
* Run maint/add_warning.Nick Mathewson2024-03-1312-0/+12
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-062-2/+2
|
* Merge branch 'deny-unchecked-duration-substraction' into 'main'Ian Jackson2024-03-051-0/+1
|\ | | | | | | | | | | | | deny clippy::unchecked_duration_subtraction Closes #1304 See merge request tpo/core/arti!2008
| * deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
| |
* | tor-dirclient: Bump minor version.Gabriela Moldovan2024-03-041-1/+1
| | | | | | | | | | `tor-dirclient` uses `tor-proto` in its public API, and its `tor-proto` version was bumped from 0.12.1 -> 0.16.1.
* | Bump the minor version, for crates with breaking changes.Gabriela Moldovan2024-03-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APIs were broken in these pre-1.0.0 crates: ``` tor-keymgr tor-config tor-checkable tor-circmgr tor-dirmgr tor-hsclient tor-hsservice tor-hsrproxy ``` Done with: ``` cargo set-version --bump minor -p tor-keymgr cargo set-version --bump minor -p tor-config cargo set-version --bump minor -p tor-checkable cargo set-version --bump minor -p tor-circmgr cargo set-version --bump minor -p tor-dirmgr cargo set-version --bump minor -p tor-hsclient cargo set-version --bump minor -p tor-hsservice cargo set-version --bump minor -p tor-hsrproxy ```
* | Bump patchlevel of pre-1.0.0 crates with new APIs.Gabriela Moldovan2024-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APIs were added: ``` tor-units tor-cell tor-proto tor-netdir arti-client ``` Done with: ``` cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-cell cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p arti-client ```
* | Bump patchlevel of crates with functional changes.Gabriela Moldovan2024-03-041-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | Functional changes were made, but no APIs were added or broken: ``` tor-events (async_broadcast 0.6.0 -> 0.7.0) tor-netdoc (signature 1 -> 2) tor-guardmgr arti-testing (config 0.13.4 -> 0.14.0) tor-persist (breaking changes gated behind experimental feature) fslock-guard (fix lockfile_has_path compilation on Windows) ``` Done with: ``` cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p arti-testing cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p fslock-guard ```
* Upgrade to latest signature.Gabriela Moldovan2024-02-281-1/+1
|
* Upgrade to latest rusqliteNick Mathewson2024-02-261-1/+1
|
* Upgrade to latest event-listenerNick Mathewson2024-02-262-2/+2
|
* educe: Use std's default for enums where default variant is unitIan Jackson2024-02-121-3/+2
| | | | | | | | | | | | | Since Rust 1.66, std's default works properly for enums, provided that the default variant is a unit. Review all uses of `#[educe(default)]` on enums and replace them with std where possible, which is most of them. In 1.66 and later, std's `#[derive(Default)]` doesn't infer any generic bounds on the derived impl, where it's an enum - since the unit variant can always be constructed. So this change doesn't add any generic bounds and is not API-visible.
* Bump patch versions *with* dependency updateIan Jackson2024-02-051-1/+1
| | | | | | | This crate has had new features added. It's 0.x. So bump in-tree dependencies' references: fs-mistrust
* Bump minor versionsIan Jackson2024-02-051-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump the minor version of these crates, and update the in-tree dependencies. Recently published as fresh crates, let's just assume there are breaking changes: fslock-guard test-temp-dir Breaking API change affecting many many downstream crates: tor-rtcompat Downstream crates which we're (conservatively) assuming have tor-rtcompat types in their APIs: tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing
* clippy: Use Result::cloned in several placesIan Jackson2024-01-311-1/+1
|
* tor-dirmgr: Simplify a clone call (fmt)Ian Jackson2024-01-311-3/+1
|
* tor-dirmgr: Simplify a clone callIan Jackson2024-01-311-2/+1
| | | | Prompted by clippy.
* Require tracing-test 0.2.4Ian Jackson2024-01-311-1/+1
| | | | | | Apparently we need https://github.com/dbrgn/tracing-test/pull/17 too.
* Require tracing-test 0.2.2Ian Jackson2024-01-311-1/+1
| | | | | | | | We need this bugfix https://github.com/dbrgn/tracing-test/pull/15 for `#[traced_test]` when `Result` is redefined. Fixes the tests with minimal-versions.
* Upgrade to strum 0.26Nick Mathewson2024-01-301-1/+1
|
* Remove pending semver entriesarti-v1.1.12Nick Mathewson2024-01-091-1/+0
|
* Followup patchlevel bumpsNick Mathewson2024-01-091-2/+2
|
* Followup minor version bumps.Nick Mathewson2024-01-091-1/+1
| | | | | | | | These crates had no changes previously, but they depend on crates that had breaking changes themselves. tor-linkspec tor-hspow