aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: Rename ConsensusFlavor::Ns to ConsensusFlavor::PlainIan Jackson2025-08-181-6/+6
| | | | This is part of abolishing the use of "ns" to mean "plain".
* tor-netdoc: netstatus: Replace NSCON with PLAIN in parsing rulesIan Jackson2025-08-181-5/+5
| | | | | | This is part of abolishing the use of "ns" to mean "plain". And edit a few docs lines.
* Revert "tor-netdoc: Link to the generated macro, for one of them (poc)"Ian Jackson2025-08-181-2/+1
| | | | This reverts commit 084ad9a716da8e44616a54fdfbba0140f5a7704e.
* tor-netdoc: Link to the generated macro, for one of them (poc)Ian Jackson2025-08-181-1/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3139#note_3238496
* tor-netdoc: Change all in-tree references to ns-consensus from ns_consensusIan Jackson2025-08-181-7/+7
|
* netdoc test data: Switch two tests to new consensus dataIan Jackson2025-08-141-3/+3
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-4/+4
| | | | | | | | | | | | | | 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.
* Update code for Edition 2024Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* tor-netdoc: Removed dependency on `once_cell`hashcatHitman2025-06-141-19/+20
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* netdoc: improve documentation for check_protocolsNick Mathewson2025-04-161-1/+7
|
* Implement PartialEq for ProtoStatuses unconditionally.Nick Mathewson2025-04-161-4/+2
|
* protover,netdoc: Implement serde for Protocols etc.Nick Mathewson2025-04-161-2/+36
|
* netdoc: Put all ProtoStatuses into a single Arc<>d objectNick Mathewson2025-04-161-16/+46
| | | | | 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.
* netdoc: Make some parsing init functions fallible.Nick Mathewson2025-03-171-4/+4
| | | | | | | 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-netdoc: impl `Extend` on `NetParams`Steven Engler2024-09-031-0/+6
|
* Resolve unreachable_patterns warnings from nightly.Nick Mathewson2024-08-131-12/+5
| | | | | | | | | | | | | | Nightly rust doesn't like it when you have a `match` arm that can never be reached because of an uninhabited type. As such, we can't say stuff like: ``` let x: Option<Void> = ...; match x { Some(_) => unreachable!(), None => ... } ```
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* netdir: Move voting_period() to netdoc::LifetimeNick Mathewson2023-06-291-0/+12
| | | | | I was going to add a comment about "doing this if we need the voting period anywhere else" but it turns out that we also use it in dirmgr.
* SharedRandVal: Note that it doesn't have to be Ct.Nick Mathewson2023-06-161-2/+1
|
* netdoc: Remove a TODO that we already solved.Nick Mathewson2023-06-161-1/+0
|
* netdir, netdoc: Add accessors for protocol version status.Nick Mathewson2023-06-061-0/+32
| | | | | | | | | | | The consensus includes a listing for clients and for relays, saying which protocol versions are _required_ for participation on the network, and which versions are _recommended_. We have been parsing this, but not yet exposing it. This commit adds accessors to expose it, since we'll need that in order to create CircTargets for introduction points and rendezvous points.
* netdoc: Rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.Gabriela Moldovan2023-05-101-1/+1
| | | | | | | | | | | `ParseErrorSource` was originally meant to represent a parsing error, this enum has since gained some variants that aren't really parsing related (`Signature`, `CertSignature`, `UntimelyDescriptor`). Since this error type is now used for general-purpose netdoc errors, let's rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`. Signed-off-by: Gabriela Moldovan <[email protected]>
* netdoc: Document that particular bit values for flags are not part of our API.Nick Mathewson2023-04-171-1/+3
|
* netstatus: re-number routerstatus flags to go in order.Nick Mathewson2023-04-171-7/+7
| | | | | | | | Otherwise there is too much risk of accidentally adding in another 1<<12 when we meant to add a 1<<13. (It would be neat to have an alternative to bitflags here that would auto-number our bitflags for us.)
* netdir: more documentation on MIDDLE_ONLY flag.Nick Mathewson2023-04-171-0/+4
| | | | Clarify that it isn't anything that most users will need to check.
* netdoc: Add MiddleOnly flag to RelayFlagsjuga2023-04-171-0/+4
| | | | Closes #833
* Upgrade to bitflags 2.0Nick Mathewson2023-03-131-0/+1
| | | | | This version of bitflags now requires us to explicitly list the traits that we want to derive for our bit-flags structs.
* tor-netdoc: Remove many needless calls to .iter() and .into_iter()Ian Jackson2023-02-151-6/+6
|
* tor-netdoc: Discuss that relays are ordered by rsa id in ConsensusIan Jackson2023-02-091-0/+3
|
* netdoc: Switch SectionRules building to use a Buidler pattern.Nick Mathewson2023-02-031-12/+12
| | | | No new behavior yet.
* Use derive_more on SharedRandValNick Mathewson2023-01-281-13/+4
| | | | | This may be temporary if we wind up converting to CtByteArray, but for now it's good to be terse.
* Several suggestions on gitlab.Ian Jackson2023-01-281-3/+3
|
* netdoc: Add Eq and a note to SharedRandVal.Nick Mathewson2023-01-281-1/+3
|
* netdoc: Add SRV accessors.Nick Mathewson2023-01-281-2/+34
| | | | | | | These are deliberately unsophisticated accessors, in that they return Option<> rather than filling in missing values with the documented fallbacks. It seems better to leave a way to distinguish the absent case in the API.
* netdoc: Add a timestamp to SRVs per prop#342.Nick Mathewson2023-01-281-1/+29
| | | | | This breaks some experimental APIs, but since they are experimental no semver note is needed.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Netdoc: Refactor SharedRandVal.Nick Mathewson2023-01-111-18/+19
| | | | | | | | SharedRandVal now holds only the 32-byte random value itself; the "number of commits" field is in SharedRandStatus. This commit also makes the SharedRandVal be exactly 32 bytes, since we've set it to that value in the spec.
* netdoc: note some changes we will have to make to srvNick Mathewson2023-01-061-0/+6
|
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* Fix typosDimitris Apostolou2022-11-061-1/+1
|
* add feature annotation to fields made visible through visible::StructFieldstrinity-1686a2022-08-241-0/+36
|
* tor-netdoc: NetParams: impl FromIteratorIan Jackson2022-08-161-0/+8
| | | | | Otherwise a caller who has a set of parameters must open-code the loop.
* fix nighly clippytrinity-1686a2022-07-231-6/+1
|
* Fix typoDimitris Apostolou2022-05-141-1/+1
|
* tor-netdoc: Add a Lifetime::valid_at method.Nick Mathewson2022-05-111-0/+4
|
* NetParams: Document its role as a validated config parameterIan Jackson2022-05-091-0/+3
|
* Re-order attributes so that we can build with Rust 1.53.Nick Mathewson2022-03-311-11/+11
|