aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-netdoc: Add fancy rustdoc to real RouterDesc itemsClara Engler2026-05-121-22/+64
| |
* | tor-netdoc: Reorder real RouterDesc itemsClara Engler2026-05-121-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reorders the real RouterDesc items according to the spec. Unfortunately, the names of those are not real yet, meaning that verifying this is somewhat hard. Personally, I recommend to verify that this commit does not add/remove lines using --color-moved. The correct order is probably easier to verify with the next commit applied that adds nice rustdoc comments explaining to which fields in the spec the respective items belong. This is a bit of a chicken egg situation but if I would have added the nice rustdoc comments first, this diff would have been awful to review, because the hunks of reordering the nice rustdoc comments included are awful to review, so please bear with me for the next commit.
* | tor-netdoc: Reorder RouterDesc into virtual and real itemsClara Engler2026-05-121-10/+26
| | | | | | | | | | | | | | | | This commit reorders the RouterDesc struct into virtual and real items, with real items being items that actually exist (although potentially under a different name) in router descriptors. Virtual items on the other hand do not exist this way in router descriptors and have to be removed at one point or another.
* | tor-netdoc: Add spacing to RouterDescClara Engler2026-05-121-0/+19
| | | | | | | | Makes this much nicer to read.
* | netdoc: Adjust dead_code attrs on IndexInfoGabriela Moldovan2026-05-071-2/+2
| | | | | | | | The `revision` field is no longer dead code.
* | netdoc: Add an accessor for revision counter of the HsDescGabriela Moldovan2026-05-071-0/+5
| |
* | Merge branch 'directory-signature-hash-algo' into 'main'Clara Engler2026-04-301-7/+15
|\| | | | | | | | | Unknown keyword handling fixes; use a more principled type for directory signature hash algo See merge request tpo/core/arti!3923
| * tor-netdoc: Use poc's DirectorySignatureHashAlgoIan Jackson2026-04-291-7/+15
| | | | | | | | | | | | | | | | | | This type is now directly suitable for use in directory signatures. While we're changing its type, rename the digest algorithm name field from `digestname` to `digest_algo`. (The spec says `algorithm` but I don't think we're going to reuse `direcctory-signature` for non-RSA signatures so this is just the hash algorithm.)
* | tor-netdoc: Un-gate every cfg feature = "hsdesc-inner-docs"Ian Jackson2026-04-304-15/+7
| | | | | | | | Part of #2492 phase 2.
* | tor-cert: Ed25519CertBuilder: do builder fn renameIan Jackson2026-04-292-3/+3
|/ | | | | | Change all call sites. This completes the rename.
* tor-netdoc: Gate vote-related incomplete code with "incomplete" (fmt)Ian Jackson2026-04-281-4/+1
|
* tor-netdoc: Gate vote-related incomplete code with "incomplete" (tidy)Ian Jackson2026-04-281-4/+5
|
* tor-netdoc: Gate vote-related incomplete code with "incomplete"Ian Jackson2026-04-285-11/+11
| | | | | | | | | | | Change "ns-vote" gates to "incomplete": * `vote` modules, and in the variety macro. (And make a TODO more likely to be found.) Change "parse2" gates to "incomplete": * VoteAuthoritySection
* tor-netdoc: Un-gate RouterStatusMdDigestsVote and SoftwareVersionIan Jackson2026-04-282-2/+0
| | | | | These are complete. Un-gate the RouterStatusMdDigestsVote implementation, and the export of both.
* tor-netdoc: Un-gate "plain-consensus" cargo featureIan Jackson2026-04-286-26/+8
| | | | As per #2492.
* tor-netdoc: Un-gate parse2 and encode loose impls under doc/netstatus (tidy)Ian Jackson2026-04-284-21/+10
|
* tor-netdoc: Un-gate parse2 and encode loose impls under doc/netstatusIan Jackson2026-04-285-29/+21
| | | | | | | | | | | | | | | This stabilises the parse2 and encode impls of consensus tyepe: * {plain, md}::{Preamble, RouterStatus, RouterStatusIntroItem} It also un-gates the parse2 and encode impls of some vote types. * VoteAuthorityEntry - this type has been completed. * RouterStatusMdDigestsVote - whole type still gated with ns-vote Re the remaining vote types (vote::*): although each_variety.rs doesn't have a cfg itself, there is a feature gate in the variety macrology.
* tor-netdoc: Un-gate parse2 and encode loose impls in doc/netstatus.rs (rewrap)Ian Jackson2026-04-281-14/+4
|
* tor-netdoc: Un-gate parse2 and encode loose impls in doc/netstatus.rsIan Jackson2026-04-281-12/+12
| | | | | | | | | | | This stabilises the parse2 and encode impls of * Lifetime * ConsensusMethods * SharedRandStatus * ConsensusAuthorityEntry All of these are complete.
* tor-netdoc: Un-gate features impls in doc/netstatus/dir_source.rs (rewrap)Ian Jackson2026-04-281-4/+1
|
* tor-netdoc: Un-gate features impls in doc/netstatus/dir_source.rsIan Jackson2026-04-281-8/+4
| | | | There are no outstanding TODOs here.
* tor-netdoc: Un-gate parse2 and encode mods in doc/netstatus.rs (fmt)Ian Jackson2026-04-281-12/+12
|
* tor-netdoc: Un-gate parse2 and encode mods in doc/netstatus.rs (tidy)Ian Jackson2026-04-281-19/+7
| | | | | | Tidy the imports, and remove some now-unneeded { }. We'll run rustfmt in a moment to sort and reindent.
* tor-netdoc: Un-gate parse2 and encode mods in doc/netstatus.rsIan Jackson2026-04-281-16/+5
| | | | | | | | | | | | | | | | | | | | | | This stabilises the parse2 and encode impls of * NetParams<i32> * ProtoStatuses It also stabilises the parse2 impls of the following types which do not currently have any encode impls: * RelayWeight * rs::SoftwareVersion * IgnoredPublicationTimeSp As for TODOs and incomplete code: the things we're stabilising here are very simple, or fully formed. Implementing encoding for IgnoredPublicationTimeSp looks impossible, but we can cross that bridge when we come to it. We un-cfg-gate the parse2 and encode imports too.
* tor-netdoc: Upgrade a TODO re NetworkStatusUnverifiedVoteIan Jackson2026-04-281-1/+1
|
* tor-netdoc: Un-gate features in doc/microdesc.rs (fmt)Ian Jackson2026-04-281-3/+1
|
* tor-netdoc: Un-gate features in doc/microdesc.rsIan Jackson2026-04-281-16/+10
| | | | | | These are all parse2, and there are no blocking TODOs. We're leaving `build_docs` alone.
* tor-netdoc: Un-gate parse2 in doc/routerdesc.rsIan Jackson2026-04-281-1/+0
| | | | This is just one cfg, for RelayPlatform.
* tor-netdoc: Remove two now-otiose use'sIan Jackson2026-04-271-2/+2
|
* tor-netdoc: ConsensusAuthorityEntry: discuss vote-digestIan Jackson2026-04-271-0/+4
|
* tor-netdoc: consensus authority section: ConsensusAuthoritySectionIan Jackson2026-04-272-5/+111
| | | | | | | | | | | | | | | | | | | Replace poc code with new ConsensusAuthoritySection. This is an entirely new parsing approach. Key differences: * We parse the arguments to dir-source, which poc didn't. * We don't clone the input and fully parse the first item; instead, we dismantle the dir-source line ad-hoc to determine the item type. * Rather than a Vec of Enums, we parse into two Vecs of the different entry types. The few lines that aren't rewritten show up as moved in git show --color-moved --color-moved-ws=allow-indentation-change but I suggest reviewing the new implementation de novo.
* tor-netdoc: consensus authority section: SupersededAuthorityKeyIan Jackson2026-04-272-2/+119
| | | | | This is the type corresponding to a "superseded authority key entry", which is a single dir-source line with a weird nickname.
* tor-netdoc: DirSource: move to new dir_source moduleIan Jackson2026-04-272-42/+60
| | | | | | | | | | | | | This is going to handle the bizarre `-legacy` nickname encoding for superseded authority keys. That's going to be a fair amount of code, some derived from DirSource. Make a module for it all. We're going to take a different approach that in poc. So there's going to be all-new code and then the poc version will be deleted. They don't resemble each other very much. In this commit: just code motion, and the creation of the new module with associated doc comment. Review with --color-moved.
* tor-netdoc: VoteAuthoritySection: derive ConstructorIan Jackson2026-04-271-3/+17
|
* tor-netdoc: VoteAuthoritySection: add a blank lineIan Jackson2026-04-271-0/+1
|
* tor-netdoc: VoteAuthoritySection: implement encodingIan Jackson2026-04-271-0/+15
| | | | | We must add to our ad-hoc derive, since the normal derive can't do the encoding either.
* tor-netdoc: VoteAuthoritySection: iterate rather than open-coding fieldsIan Jackson2026-04-271-3/+7
| | | | | Use deftly's field loop, rather than handcoding the two fields. (We don't expect to add any fields, but if we did this would be more correct.)
* tor-netdoc: VoteAuthoritySection: improve doc commentsIan Jackson2026-04-271-3/+13
|
* tor-netdoc: VoteAuthoritySection: promote poc to prodIan Jackson2026-04-271-1/+54
| | | | | | | | | | | Almost entirely code motion. Review with --color-moved. This is new correct for votes, and uses the non-poc names for things. We'll improve up a few minor things in a moment. The cfg situation is getting very tangled. There are already various TODOs about this. I think it is time to bite the bullet; I will do that separately from this MR.
* tor-netdoc: VoteAuthorityEntry: new struct (just a skeleton for now)Ian Jackson2026-04-271-0/+36
|
* tor-netdoc: ConsensusAuthorityEntry: derive ConstructorIan Jackson2026-04-272-1/+11
|
* tor-netdoc: ConsensusAuthorityEntry: derive encoding and parsingIan Jackson2026-04-271-1/+5
|
* tor-netdoc: ConsensusAuthorityEntry: fix type of vote_digest fieldIan Jackson2026-04-272-3/+3
|
* tor-netdoc: ConsensusAuthorityEntry: fix type of contact fieldIan Jackson2026-04-272-3/+17
|
* tor-netdoc: ConsensusAuthorityEntry: add some blank linesIan Jackson2026-04-271-0/+2
|
* tor-netdoc: ConsensusAuthorityEntry: rename from ConsensusVoterInfo (2) (fmt)Ian Jackson2026-04-271-1/+1
|
* tor-netdoc: ConsensusAuthorityEntry: rename from ConsensusVoterInfo (2)Ian Jackson2026-04-274-14/+14
| | | | Deprecate the compatibility alias.
* tor-netdoc: ConsensusAuthorityEntry: rename from ConsensusVoterInfoIan Jackson2026-04-271-3/+22
| | | | Use the terminology from the spec.
* tor-netdoc: DirSource: derive ConstructorIan Jackson2026-04-272-1/+12
|
* tor-netdoc: DirSource: derive encoding and parsingIan Jackson2026-04-271-1/+4
|