aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: Split off Keyword::to_str into its own traitIan Jackson2025-11-181-1/+1
| | | | | My planned encoding derive macro is not going to use `decl_keyword!` but will need to call `NetdocEncoder::item`.
* tor-netdoc: parse2: Introduce ParseInput intermediate structIan Jackson2025-11-181-2/+3
| | | | | | | We're going to add options arguments, effectively, to the parsing entrypoints. To avoid a proliferation of entrypoints (eg, parse_multiple_with_options), encapsulate the run-time input values in this structure.
* tor-netdoc: Remove the RelayFlags type alias in netstatusIan Jackson2025-11-181-3/+0
| | | | I would do `#[deprecated]` but empirically that has no effect...
* tor-netdoc: Move RelayFlags into its own moduleIan Jackson2025-11-181-161/+3
| | | | | We're going to do a lot more with this and it's less confusing to have it all together.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-netdoc: Rename consensus Header to PreambleIan Jackson2025-10-221-1/+1
| | | | | There is no such thing as the "header" according to the spec. We mean the preamble.
* Merge branch 'p2-shared-rand-status' into 'main'Ian Jackson2025-10-221-8/+23
|\ | | | | | | | | impl ItemValueParseable for SharedRandStatus See merge request tpo/core/arti!3380
| * tor-netdoc: impl ItemValueParseable for SharedRandStatusIan Jackson2025-10-211-0/+1
| |
| * tor-netdoc: impl Display, FromStr, NormalItemArgument for SharedRandValIan Jackson2025-10-211-2/+18
| |
| * tor-netdoc: Change type of timestamp in SharedRandStatus (fmt)Ian Jackson2025-10-211-2/+1
| |
| * tor-netdoc: Change type of timestamp in SharedRandStatusIan Jackson2025-10-211-5/+4
| |
* | tor-netdoc: Lifetime impls: reindentIan Jackson2025-10-211-37/+37
| |
* | tor-netdoc: derive NetdocParseableFields for LifetimeIan Jackson2025-10-211-0/+4
| |
* | tor-netdoc: Lifetime: change type of fieldsIan Jackson2025-10-211-6/+6
| | | | | | | | These fields aren't public so this doesn't have semver impacts.
* | tor-netdoc: Lifetime: derive constructor and accessorsIan Jackson2025-10-211-20/+17
| | | | | | | | | | | | | | | | | | | | | | In a moment, we're going to want to transform the field arguments. That would leave us open to bugs like this: valid_after: valid_after.into(), fresh_until: fresh_until.into(), valid_until: valid_after.into(), We'll sort out the indentation later in this branch.
* | tor-netdoc: Lifetime: Move some documentation to fieldsIan Jackson2025-10-211-10/+10
| | | | | | | | | | This (briefly) regresses the documentation, but it's going to appear again when we derive the methods.
* | tor-netdoc: Lifetime: Construct Lifetime struct earlierIan Jackson2025-10-211-6/+10
|/
* tor-netdoc: Add a lot of spec cross-references and tidy docsIan Jackson2025-10-151-7/+52
| | | | | | | | | | | | | Add links to torspec, and other cross-references. Change heading fof `IgnoredPublicationTimeSp` to `publication` to match spec and distinguish it from the `published` item in netstatus docs. Align several descriptions with the wording from torspec. Remove a restatement of a fact from the spec, on the `valid_until` field in `Lifetime`.
* tor-netdoc: Typo fixes in docsIan Jackson2025-10-151-1/+1
|
* tor-netdoc: tests: Print out vote routerstatusIan Jackson2025-10-151-1/+2
| | | | | | | I have eyeballed the output and it seems to look right. Eventually we'll have encoing code and then we'll be able to check that things round-trip.
* tor-netdoc: tests: Move vote parsing test to netstatus.rsIan Jackson2025-10-151-0/+21
| | | | | This is a test of real document structs now, albeit that it still uses one of the types from `poc`.
* tor-netdoc: Type for parsing `m` lines in votesIan Jackson2025-10-151-0/+3
|
* tor-netdoc: Add ConsensusMethod typeIan Jackson2025-10-151-3/+46
|
* tor-netdoc: RouterStatus: Add `publication` argument fieldIan Jackson2025-10-151-1/+22
|
* tor-netdoc: impl parse2 for rs::VersionIan Jackson2025-10-151-0/+10
|
* tor-netdoc: impl parse2 for RelayFlagsIan Jackson2025-10-151-0/+13
|
* tor-netdoc: split up RelayFlags parsing (fmt)Ian Jackson2025-10-151-5/+1
|
* tor-netdoc: split up RelayFlags parsingIan Jackson2025-10-151-14/+47
|
* tor-netdoc: impl parse2 traits for RelayWeightIan Jackson2025-10-151-0/+25
|
* tor-netdoc: split up RelayWeight parsing (fmt)Ian Jackson2025-10-151-4/+2
|
* tor-netdoc: split up RelayWeight parsingIan Jackson2025-10-151-2/+9
| | | | We're going to call from_net_params from the parse2 trait impl.
* tor-netdoc: RouterStatus: unify `orport_addrs` and `addrs` methodsIan Jackson2025-10-061-2/+2
| | | | | | | We had two functions with different return types but identical semantics. Replace them with one function returning `impl Iterator`. Make it return owned addresses. These are small.
* tor-netdoc: Abolish `dangerous-expose-struct-fields`; always expose, insteadIan Jackson2025-10-011-84/+28
| | | | Fixes #2192
* tor-netdoc: Apply much rustfmt churnIan Jackson2025-08-261-1/+1
|
* tor-netdoc: Provide some Vote thingsIan Jackson2025-08-261-3/+8
| | | | And export *RouterStatus with the macro, and *Header.
* tor-netdoc: Introduce experimental ns-vote featureIan Jackson2025-08-261-1/+3
| | | | | | Now we can start actually having code to do with votes. This feature doesn't actually contain any new API surface yet.
* tor-netdoc: Move all each_variety code to each_flavorIan Jackson2025-08-261-4/+4
| | | | | | | The amount we're going to be able to reuse for votes is less than we might hope. This commit is just code motion.
* tor-netdoc: Turn ConsensusHeader into VARIETY::HeaderIan Jackson2025-08-261-168/+4
| | | | It's going to need to vary when we do votes.
* tor-netdoc: Abolish ParseRouterStatus and make several things not pubIan Jackson2025-08-261-15/+0
| | | | | | | The methods in ParseRouterStatus can now be inherent. This starts a cascade of unused stuff, and stuff which doesn't need to be pub any more.
* tor-netdoc: Combine ConsensusRouterStatus and GenericRouterStatusIan Jackson2025-08-261-3/+3
| | | | Now we only need one type.
* tor-netdoc: Abolish RouterStatus trait in favour of generic methodsIan Jackson2025-08-261-15/+0
| | | | | Our approach to sharing code between md and plain consensuses is now the new "variety" system, not generics.
* tor-netdoc: Remove generics from Consensus and its contentsIan Jackson2025-08-261-6/+6
|
* tor-netdoc: netstatus: Move everything variety-specificIan Jackson2025-08-261-422/+12
| | | | | | | | | This is much code motion. This splits many types into two. For example, `Conensus` is now`plain::Consensus<RS>` and `md::Consensus<RS>`. We're going to get rid of the generics later in this branch.
* tor-netdoc: Make various types all pub(crate)Ian Jackson2025-08-261-17/+17
| | | | | | | | | Header and RouterStatus are going to move to a sibling module, `each_variety.rs`, and the build code has moved too. These modules will all need access to the various stuff. let's just use `pub(crate)` rather than messing about with `pub(super)` etc. It's generally just netdoc field.s
* tor-netdoc: Prepare variety modules for network status documentsIan Jackson2025-08-261-0/+4
| | | | This is empty modules and scaffolding.
* tor-netdoc: Fold netstatus::CommonHeader into ConsensusHeaderIan Jackson2025-08-261-67/+36
| | | | | We're going to use ns_variety_definition_macros to support votes, rather than this.
* tor-netdoc: Provide some compatibility aliasesIan Jackson2025-08-181-0/+13
|
* tor-netdoc: Rename ns-consensus to plain-consensusIan Jackson2025-08-181-7/+7
| | | | | | ns-consensus doesn't seem to have ever been released. This is part of abolishing the use of "ns" to mean "plain".
* tor-netdoc: network status: Rename Ns* to Plain* in macro outputIan Jackson2025-08-181-7/+7
| | | | This is part of abolishing the use of "ns" to mean "plain".
* tor-netdoc: network status: Rename NS_* test data consts to PLAIN_*Ian Jackson2025-08-181-4/+4
| | | | This is part of abolishing the use of "ns" to mean "plain".