aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdir/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ticket1223' into 'main'Nick Mathewson2025-12-041-0/+23
|\ | | | | | | | | | | | | Refactor common code that builds circtargets for HS. Closes #1223 See merge request tpo/core/arti!3530
| * Refactor common code that builds circtargets for HS.Nick Mathewson2025-12-041-0/+23
| | | | | | | | | | | | | | | | | | This code was duplicated across hsclient and hsservice. Logically, it belongs in netdir, since that's where we have the latest required-protocol information, and the ability to look up relays by IDs. Closes #1223
* | Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-1/+0
|/ | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Rename onion-* cargo features to hs-* in tor-* cratesIan Jackson2023-02-281-3/+3
| | | | Fixes #756
* netdir: Implement ring-param constructors and time period accessorsNick Mathewson2023-01-281-0/+4
| | | | | | | | | | | | | | This logic is a bit tricky, so I've tried to document it and add fairly good tests. The silver lining is that the external API for all of this logic will make it invisible and hidden. There are some cases where I added functions that I think might eventually get lowered into MdConsensus: But I don't want to lower too much right now, since the convention for our netdoc accessors is that they are fairly unsophisticated, and they show you the document as it is. Closes #686
* Adjust onion service ring APIs in light of prop#342Nick Mathewson2023-01-111-0/+23
| | | | | | | | | | * It is the NetDir's responsibility to tell the caller what the time period is. * There can be up to two secondary time periods. * Each time period has a single SRV. * Secondary time periods only apply for onion services, when they publish. * When publishing, the correct input is a time period.
* Add new APIs to NetDirProvider to better support timeliness.Nick Mathewson2022-07-261-2/+24
| | | | | | | | | | | | | | | | | Over the years we've found that most callers who want a netdir want what C Tor calls a "reasonably live" network directory: One that is not expired by too much, or too far in the future. But a few want a _strictly_ live directory: one that says it is valid now, with no tolerances. And a few want _any_ directory, no matter how expired it is. This commit adds net methods to NetDirProvider to provide these directories. I think that most use cases will want to explicitly think about what kind of directory they want, so I've made `netdir` the simplest method. I might remove `timely_netdir` by the end of this branch; see TODO comments. Part of #518.
* tor-netdir: Split testnet errors into a new typeNick Mathewson2022-02-151-7/+0
| | | | | There's no reason to have the test-network-construction code share an error enum with the main netdir code.
* tor-netdir: remove unused error variantsNick Mathewson2022-02-151-19/+0
| | | | | This turns out to have been most of them, which simplifies matters a lot.
* netdoc: Make doc-build errors a separate typeNick Mathewson2022-02-141-0/+4
| | | | | Every other case of tor_netdoc::Error means a parse failure. This one, though, means a failure to construct a document.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+34
This will cause some pain for now, but now is really the best time to do this kind of thing.