aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: ConsensusAuthorityEntry: discuss vote-digestIan Jackson2026-04-271-0/+4
|
* tor-netdoc: consensus authority section: ConsensusAuthoritySectionIan Jackson2026-04-271-3/+5
| | | | | | | | | | | | | | | | | | | 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-271-1/+1
| | | | | 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-271-42/+3
| | | | | | | | | | | | | 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-271-1/+10
|
* tor-netdoc: ConsensusAuthorityEntry: derive encoding and parsingIan Jackson2026-04-271-1/+5
|
* tor-netdoc: ConsensusAuthorityEntry: fix type of vote_digest fieldIan Jackson2026-04-271-2/+2
|
* tor-netdoc: ConsensusAuthorityEntry: fix type of contact fieldIan Jackson2026-04-271-2/+15
|
* tor-netdoc: ConsensusAuthorityEntry: add some blank linesIan Jackson2026-04-271-0/+2
|
* tor-netdoc: ConsensusAuthorityEntry: rename from ConsensusVoterInfo (2)Ian Jackson2026-04-271-5/+5
| | | | 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-271-1/+11
|
* tor-netdoc: DirSource: derive encoding and parsingIan Jackson2026-04-271-1/+4
|
* tor-netdoc: DirSource: add missing hostname fieldIan Jackson2026-04-271-0/+10
|
* tor-netdoc: DirSource: fix type of identity fieldIan Jackson2026-04-271-2/+2
|
* tor-netdoc: DirSource: fix type of nickname fieldIan Jackson2026-04-271-2/+7
|
* tor-netdoc: DirSource: add spec urlIan Jackson2026-04-271-0/+1
|
* tor-netdoc: DirSource: add some blank linesIan Jackson2026-04-271-0/+4
| | | | This makes the struct more legible.
* tor-netdoc: Gate authcert/encoded.rs and poc behind incomplete and ↵Ian Jackson2026-04-231-1/+1
| | | | | | | | | plain-consensus "incomplete" is correct since encoded authcert depends on votes. "plain-consensus" is going backwards, but stripping "plain-consensus" gates from everything will be very intrusive.
* tor-netdoc: Minimally avoid emitting bad netparams keywordsIan Jackson2026-04-211-1/+36
| | | | | See torspec#401 and https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397715
* tor-netdoc: Move the proto_statuses_parse2_encode module laterIan Jackson2026-04-211-88/+87
| | | | | | | Now it follows, rather than precedes, the parse2_impls and encode_impls modules that it imports things from. Pure code motion apart from deleting the todo.
* tor-netdoc: ns Premable: add missing field known_flagsIan Jackson2026-04-211-0/+1
|
* tor-netdoc: impl NetdocEncodableFields for ProtoStatusesIan Jackson2026-04-211-1/+15
| | | | We don't need the helper struct for this.
* tor-netdoc: Split out proto_statuses_parse2_encode moduleIan Jackson2026-04-211-9/+24
| | | | | | | | | | | | | | We're going to want this macrology to generate a encoder implmeentation too. It's most convenient to make this its own module, separating it from parse2_impls. Enable the module if encoding is enabled, decorating its parsing-related contents with the appropriate cfg. Use pub(super) to export the encoding-related imports, so that we don't end up with endlessly duplicated import lists. Now there is place where we can put the encoder.
* tor-netdoc: impl ItemValueEncodable for NetParams<i32>Ian Jackson2026-04-211-0/+22
| | | | | | Start a new encode_impls module. The pub(super) will be used in a moment.
* tor-netdoc: ns Lifetime: derive NetdocEncodableFieldsIan Jackson2026-04-211-0/+1
|
* tor-netdoc: ns Lifetime: Use ConstructorIan Jackson2026-04-211-5/+19
|
* tor-netdoc: ns Lifetime: use new deftly cfg approachIan Jackson2026-04-211-3/+5
| | | | This is what we did for authcert.rs and it worked well there.
* tor-netdoc: ConsensusMethods: derive ItemValueEncodableIan Jackson2026-04-211-2/+3
|
* Fix typosTobias Stoeckmann2026-03-241-1/+1
| | | | Typos found with codespell
* parse2: Add TODO for netstatus traitClara Engler2026-03-091-0/+5
| | | | | This commit adds a TODO to implement a trait combining the common fields in a network status documents.
* tor-netdoc: Rename *Signed to *UnverifiedIan Jackson2026-03-031-3/+3
| | | | | | | | | | This was a weird name, and while working in this area it all seemed to make the docs strange. Rename it. This is quite invasive! In theory we could have the macros generate compatibility aliases, but that seems quite complex.
* Merge branch 'dirmirror-authcert' into 'main'Clara Engler2026-01-151-1/+5
|\ | | | | | | | | Implement authority certificate management See merge request tpo/core/arti!3561
| * tor-netdoc: Make ConsensusFlavor exhaustiveClara Engler2026-01-151-1/+5
| | | | | | | | | | | | | | | | | | | | This commit marks the ConsensusFlavor struct exhaustive because handling it in a non-exhaustive fashion would cause lots of redundant error handling in tor-dirserver. Besides, a change in the list of consensus flavors should indeed be breaking for applications making use of this struct, as it is quite a heavy change, from a netdoc point of view.
* | tor-netdoc: Rename Version and expose it as netstatus::SoftwareVersionIan Jackson2026-01-151-2/+2
|/ | | | | | | This struct is still a bit odd, and there's a todo saying we may change it again, but at least now it's now available. While we're here, rename the variant Tor to CTor.
* tor-netdoc: authcert: Make key_ids return owned AuthCertKeyIdsIan Jackson2026-01-061-3/+3
| | | | | AuthCert is about to lose its copy of H(KP_auth_sign_rsa) so it needs to return an owned value.
* tor-netdoc: Clarify the wrong field bug exampleIan Jackson2025-12-181-1/+4
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3550#note_3312670
* tor-netdoc: Fix typo in commentIan Jackson2025-12-181-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3550#note_3312669
* tor-netdoc: impl ItemValueParseable for NetParams<i32>Ian Jackson2025-12-181-1/+11
|
* tor-netdoc: impl NetdocParseableFields for ProtoStatusesIan Jackson2025-12-181-1/+63
|
* tor-netdoc: Apply encoding derive to SharedRandStatusIan Jackson2025-12-101-2/+3
| | | | | | | | I feel that before merging all this, I ought at least to demonstrate that it can be applied to at least one real type! We can unconditionally `#[derive(Deftly)]`. That is simpler, and harmless if no actual deftly derives are applied.
* tor-netdoc: Remove unnecessary castsClara Engler2025-12-041-1/+1
|
* tor-netdoc: Store n_authorities in usizeClara Engler2025-12-021-1/+1
| | | | | | | Previously, this value was stored in a u16. However, because this number is usually always derived from some sort of list type, such as `Vec`, it makes more sense to use usize for this, as it avoid unnecessary casting and error checking.