aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: Rename ConsensusFlavor::Ns to ConsensusFlavor::PlainIan Jackson2025-08-182-3/+3
| | | | This is part of abolishing the use of "ns" to mean "plain".
* tor-netdoc: Run rustfmt againIan Jackson2025-08-182-2/+2
| | | | Not sure how this is needed now, after rebase, but whatever.
* tor-netdoc: varieties: Rename per_variety to each_varietyIan Jackson2025-08-182-1/+1
|
* tor-netdoc: varieties: Rename macro definition moduleIan Jackson2025-08-181-2/+2
|
* tor-netdoc: Rename "species" to "variety"Ian Jackson2025-08-184-7/+7
|
* tor-netdoc: rs: Implement orport_addrs in terms of addrsIan Jackson2025-08-181-1/+1
| | | | | It's not clear why this method exists, but I'm not tidying this up now.
* tor-netdoc: Add commentary about namespacingIan Jackson2025-08-182-0/+10
|
* tor-netdoc: Add comment to ns_export_per_speciesIan Jackson2025-08-181-0/+1
| | | | And add a blocking todo about renaming it.
* Revert "tor-netdoc: Link to the generated macro, for one of them (poc)"Ian Jackson2025-08-182-5/+1
| | | | This reverts commit 084ad9a716da8e44616a54fdfbba0140f5a7704e.
* tor-netdoc: species: Improve per_species heading, clarificationIan Jackson2025-08-181-1/+1
|
* tor-netdoc: species: Improve per_species headingIan Jackson2025-08-181-1/+4
|
* tor-netdoc: Rename `ns` species ("variety") to `plain`Ian Jackson2025-08-182-2/+2
|
* tor-netdoc: Link to the generated macro, for one of them (poc)Ian Jackson2025-08-182-1/+5
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3139#note_3238496
* tor-netdoc: Fix a "flavour" reference that should have been "species"Ian Jackson2025-08-181-1/+1
|
* tor-netdoc: rs: Abolish implement_accessors macro (fmt)Ian Jackson2025-08-181-67/+67
|
* tor-netdoc: rs: Abolish implement_accessors macroIan Jackson2025-08-182-79/+69
| | | | | | We don't need this now; we can just write the impl in per_species.rs. Formatting will be fixed in a moment.
* tor-netdoc: rs: Move identical text to per_species.rs.Ian Jackson2025-08-184-144/+76
| | | | | | | These two files were largely identical. Move the common text to per_species.rs, and fix a couple of imports so that it still compiles.
* tor-netdoc: rs: Remove some fiddly docs differencesIan Jackson2025-08-182-5/+2
| | | | | | | Not having the flavour in the type name is a shame, but we probably don't want to resort to generating the docs with macros. Part of making these two files largely identical.
* tor-netdoc: rs: Introduce FLAVOR constantIan Jackson2025-08-182-4/+10
| | | | Part of making these two files largely identical.
* tor-netdoc: rs: Swap calling orderIan Jackson2025-08-182-4/+4
| | | | | Move the implementation to the trait method which then becomes completely identical in both files.
* tor-netdoc: rs: Introduce and use DOC_DIGEST_LENIan Jackson2025-08-182-4/+4
| | | | Part of making ns.rs and md.rs largely identical.
* tor-netdoc: rs: Use species macrology for DocDigestIan Jackson2025-08-182-18/+18
| | | | Part of making these two files largely identical.
* tor-netdoc: rs: Use species macrology for ConsensusRouterStatusIan Jackson2025-08-183-24/+24
| | | | | | | In the species-specific files ns.rs and md.rs, use the unqualified name; re-export it with the new macro. We are working towards making these two files largely identical.
* tor-netdoc: Introduce new "species" macrologyIan Jackson2025-08-183-0/+15
| | | | | This will let us deduplicate a fair amount of code, and also will let us support votes as well as ns and md consensuses.
* tor-netdoc: Change all in-tree references to ns-consensus from ns_consensusIan Jackson2025-08-183-6/+6
|
* tor-netdoc: Remove two false commentsIan Jackson2025-08-182-2/+0
| | | | Cut-and-paste error, I think.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-072-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.
* hs: Prevent a client from using a `MiddleOnly` relay for onion servicesNeel Chauhan2025-05-201-4/+0
| | | | | | > The actual impact of this patch is to prevent usage of MiddleOnly > relays as Introduction Points. The Rendezvous Point logic isn't > hooked up yet - nick
* Fix a pair of documentation links.Nick Mathewson2025-04-161-2/+2
|
* netdoc: Put all ProtoStatuses into a single Arc<>d objectNick Mathewson2025-04-161-3/+9
| | | | | 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).
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Add a clear_flags function to RouterStatusBuilderNick Mathewson2024-03-121-0/+6
| | | | (For testing.)
* RouterStatus: Add test functions for Fast and Stable flags.Nick Mathewson2024-01-161-0/+8
| | | | | (We don't need Fast right now, but we will certainly need it down the line.)
* 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
|
* 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]>
* 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
* hsdir: Be able to enumerate the hidden service directoriesIan Jackson2023-02-091-0/+4
| | | | | | * Provide an accessor for the HSDIR flag * Provide a function for testing a relay for hsdir inclusion * Provide an iterator on NetDir that returns the hsdirs
* netdoc: Add a timestamp to SRVs per prop#342.Nick Mathewson2023-01-281-6/+25
| | | | | 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-9/+9
| | | | | | | | 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.
* 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.
* Work around a new nightly clippy warningNick Mathewson2022-09-303-17/+22
| | | | | | | | | | | | | | The warning `clippy::bool_to_int_with_if` is meant to shout at you when you say `if x { 1 } else { 0 }` and instead suggest that you say `inttype::from(x)`. I agreed with this for the case in tor-cert, where we are literally converting a boolean into a flag. I don't agree with this in tor-netdoc, where we are using a boolean to decide how many fields to skip in a given document format. So for this case, I decided to clean up the code a little by renaming "skip" to "n_skip", and changing the boolean to use an enum instead.
* add feature annotation to fields made visible through visible::StructFieldstrinity-1686a2022-08-242-0/+9
|
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-243-0/+4
|
* netdoc: add a new type for NicknamesNick Mathewson2022-05-092-5/+5
| | | | | | | | | | Relay nicknames are always between 1 and 19 characters long, and they're always ASCII: That means that storing them in a [u8;19] will always be possible, and always use less resources than storing them in a String. Fortunately, the tinystr crate already helps us with this kind of thing.
* squash! Bump every crate's edition to 2021.Nick Mathewson2022-04-252-3/+0
| | | | | Remove all `use` statements for `TryFrom` and `TryInto`. These are now redundant in Rust 2021.
* Re-order attributes so that we can build with Rust 1.53.Nick Mathewson2022-03-313-3/+3
|
* tor-netdoc: Conditionally expose document fields.Nick Mathewson2022-03-313-0/+17
| | | | | | | | This commit uses the `visibility` and `visible` crates to conditionally make certain structs and their fields public (respectively). This is incredibly dangerous to use for anything besides testing, and I've tried to write the documentation for the feature accordingly.