aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus/rs/build.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Rename RelayWeights to RelayWeightsItemIan Jackson2026-05-271-1/+1
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3991#note_3413168
* tor-netdoc: Introduce RelayWeights and use it in RouterStatusIan Jackson2026-05-271-1/+1
| | | | | | | | For encoding, we need to represent the raw parameters. This change is carefully arranged so that when the retain unknown feature is disabled (ie, in clients), the per-router data structure remains the same.
* tor-netdoc: Un-gate "plain-consensus" cargo featureIan Jackson2026-04-281-1/+0
| | | | As per #2492.
* netdoc: Remove protocol interning.Nick Mathewson2025-12-031-1/+0
| | | | (It's now done in tor_protover.)
* tor-netdoc: Be able to retain unknown flagsIan Jackson2025-11-181-1/+1
|
* tor-netdoc: Introduce DocRelayFlags for relay flags in a network documentIan Jackson2025-11-181-1/+2
| | | | This will have space for unknown flags.
* tor-netdoc: Use NotPresent rather than Option<Ignored> to suppress fieldsIan Jackson2025-10-231-1/+1
|
* tor-netdoc: RouterStatus: Add `publication` argument fieldIan Jackson2025-10-151-1/+1
|
* tor-netdoc: Mirror netdoc structure in RouterStatus document digestsIan Jackson2025-10-151-1/+1
| | | | | | | | In md consensuses the referenced document digest is in the `m` field. This seems to be to make it similar to votes. But really the function of the md desc hash in md rs entries is much more parallel to the plain desc hash in plain rs entries. The way the spec has done it means the `r` item has a needlessly different syntax.
* tor-netdoc: Make rs `identity` field a Base64FingerprintIan Jackson2025-10-061-0/+1
| | | | | | | This will allow type-driven parsing. Don't change the type in the (now-mostly-obsolete) builder and accessors; that would seem like pointless churn.
* tor-netdoc: Apply much rustfmt churnIan Jackson2025-08-261-1/+1
|
* tor-netdoc: De-duplicate RouterStatusBuilder::buildIan Jackson2025-08-261-4/+0
| | | | | This is now more obviously not needed. We should eventually remove this, or remove finish.
* tor-netdoc: Combine ConsensusRouterStatus and GenericRouterStatusIan Jackson2025-08-261-2/+2
| | | | Now we only need one type.
* tor-netdoc: Remove generics from Consensus and its contentsIan Jackson2025-08-261-3/+0
|
* tor-netdoc: netstatus: Move GenericRouterStatusIan Jackson2025-08-261-1/+1
| | | | | | More code motion. We're going to get rid of this type completely eventually.
* tor-netdoc: netstatus: Move everything variety-specificIan Jackson2025-08-261-181/+4
| | | | | | | | | 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: Prepare variety modules for network status documentsIan Jackson2025-08-261-0/+4
| | | | This is empty modules and scaffolding.
* tor-netdoc: Rename ns-consensus to plain-consensusIan Jackson2025-08-181-3/+3
| | | | | | 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-3/+3
| | | | This is part of abolishing the use of "ns" to mean "plain".
* tor-netdoc: Change all in-tree references to ns-consensus from ns_consensusIan Jackson2025-08-181-3/+3
|
* Add a clear_flags function to RouterStatusBuilderNick Mathewson2024-03-121-0/+6
| | | | (For testing.)
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-241-0/+1
|
* netdoc: add a new type for NicknamesNick Mathewson2022-05-091-1/+1
| | | | | | | | | | 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.
* Canonicalize and intern protover lines on descriptorsNick Mathewson2022-03-111-1/+2
| | | | | | | | This should save around 1MB per consensus, since every relay has a 'protocols' lines, but there are only a few distinct possibilities for such a line. Closes #385.
* netdoc: Make versions smaller in GenericRouterStatusNick Mathewson2022-03-111-1/+2
| | | | | | When the version is a Tor version, we can just parse it; otherwise, we can intern it. This shrinks GenericRouterStatus and avoids a lot of extra help allocations.
* tor-netdoc: Remove unused or_port field from RS.Nick Mathewson2022-03-111-2/+0
| | | | Part of #387
* netdoc: Make doc-build errors a separate typeNick Mathewson2022-02-141-1/+1
| | | | | Every other case of tor_netdoc::Error means a parse failure. This one, though, means a failure to construct a document.
* Remove dir_port from RouterStatusBuilderNeel Chauhan2021-12-011-11/+0
|
* Merge branch 'ticket125' into 'main'eta2021-11-161-2/+7
|\ | | | | | | | | | | | | Put most non-universally-needed functionality behind features Closes #125 See merge request tpo/core/arti!129
| * tor-netdoc: put NS consensus documents behind a feature.Nick Mathewson2021-11-121-2/+7
| | | | | | | | | | | | Clients never need these. Part of #125.
* | Remove the unused `published` field from GenericRouterStatus.Nick Mathewson2021-11-121-13/+0
|/ | | | | | | | | | | | This field isn't used in modern Tor, and has never been used in Arti. If tor!489 is merged, then it will no longer contain a useful value in future consensuses. We shouldn't store it, or else somebody else will get the smart idea of using it for something. This commit breaks API compatibility for tor-netdoc with the `build_docs` feature enabled. I haven't entered that into the semver_status.md file, since we already have a pending tor-netdoc API breaker in !129.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+205
This will cause some pain for now, but now is really the best time to do this kind of thing.