aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'clippy' into 'main'opara2026-07-271-3/+1
|\ | | | | | | | | Fix some recently-appearing clippy lints See merge request tpo/core/arti!4240
| * tor-netdoc: Replace two open-coded slice::fillIan Jackson2026-07-271-3/+1
| | | | | | | | Placates recent clippy.
* | tor-netdoc: Make RouterStatus.port_policy use Intern, not ArcIan Jackson2026-07-272-2/+1
| | | | | | | | We intern these in Microdesc, and should be consistent.
* | tor-netdoc: Make the str in a SoftwareVersion be Intern (fmt)Ian Jackson2026-07-271-3/+1
| |
* | tor-netdoc: Make the str in a SoftwareVersion be InternIan Jackson2026-07-271-3/+3
|/ | | | Rather than converting it to an Arc. This is the new idiom for Intern.
* tor-checkable: Rename `TimeBound::is_valid_at` to `check_valid_at` (fmt)Ian Jackson2026-07-231-1/+5
|
* tor-checkable: Rename `TimeBound::is_valid_at` to `check_valid_at`Ian Jackson2026-07-231-1/+1
| | | | | I find this names confusing. To my mind "is" implies a function returning `bool`.
* Use new TimeRangeBound name throughout the treeIan Jackson2026-07-162-8/+8
|
* tor-netdoc: Stabilise votes and encoding of authcerts (formatting)Ian Jackson2026-07-152-6/+3
|
* tor-netdoc: Stabilise votes and encoding of authcertsIan Jackson2026-07-155-8/+4
|
* tor-netdoc: drop a done TODOIan Jackson2026-07-151-3/+0
| | | | torspec!499 is merged.
* tor-netdoc tests: Test consensus verification error casesIan Jackson2026-07-152-2/+103
|
* tor-netdoc: Replace string slices with str::get() in doc (fmt)Clara Engler2026-06-241-1/+4
| | | | No functional change, just reformatting.
* tor-netdoc: Replace string slices with str::get() in docClara Engler2026-06-242-5/+3
| | | | | | | | | | | | This commit replaces the use of string slices with str::get() in all document related code. While this is not a perfect replacement for it, the relevant parts in the code heavily depend upon the byte offsets returned by the low level (legacy) parser where changing it would lead to a very big refactoring. Nonetheless, this approach is better because returning a bug is better than crashing.
* tor-netdoc: Fix rs.rs cache commentsClara Engler2026-06-241-1/+1
| | | | Removes a blocking comment and replaces it with a TODO DIRAUTH.
* Use Intern<T> (fmt)Clara Engler2026-06-241-1/+3
| | | | No functional change.
* Use Intern<T>Clara Engler2026-06-241-1/+2
| | | | | This commit modifies the codebase to actually return Intern<T> in InternCache<T> and adds calls to .into() accordingly.
* tor-netdoc tests: test vote roundtrip with testdata2Ian Jackson2026-06-221-9/+0
| | | | | | | | | | | Use roundtrip_netstatus, which does nearly all of the work for us. But for it to round-trip, we must do a bunch of fudging. This replaces the old parse2 vote test case (which used the poc type). The test case has some adjustments to cope with missing fields. Move the TODOs for those fields to the test case, so that they're on lines that will be deleted when the fields are implemented.
* tor-netdoc tests: Test verification of votes, error casesIan Jackson2026-06-221-1/+1
|
* tor-netdoc: Implement verification for votesIan Jackson2026-06-221-0/+90
|
* tor-netdoc: consensus_threshold: return a RangeFromIan Jackson2026-06-171-1/+1
|
* tor-netdoc: tests: ns parse2 test: Round trip a plain consensusIan Jackson2026-06-171-1/+1
|
* tor-netdoc: provide verify methods on new consensus typesIan Jackson2026-06-171-0/+75
|
* tor-netdoc: Break out consensus_threshold fnIan Jackson2026-06-171-1/+1
| | | | This calculation appeared 3 times.
* tor-netdoc: NetworkStatus: derive EncodeIan Jackson2026-06-171-1/+1
|
* tor-netdoc: rs.rs: tidy importsIan Jackson2026-06-151-2/+3
|
* tor-netdoc: routerstatus entries: Add `stats` item (votes only)Ian Jackson2026-06-154-1/+8
|
* Merge branch 'verify-general' into 'main'Ian Jackson2026-06-111-5/+2
|\ | | | | | | | | tor-netdoc: overhaul consensus verification, in preparation for parse2 ns verification See merge request tpo/core/arti!4065
| * tor-netdoc: ns verification: verify_general, return Result, tidy callerIan Jackson2026-06-111-5/+2
| | | | | | | | | | | | Now the caller can use .map_err rather than if .ok(). No functional change.
| * tor-netdoc: ns verification: verify_general, return ResultIan Jackson2026-06-111-1/+1
| | | | | | | | No functional change.
* | tor-netdoc: Fix a trailing whitespaceIan Jackson2026-06-111-1/+1
| |
* | tor-netdoc: Fix copypaste errorIan Jackson2026-06-111-1/+1
| |
* | tor-netdoc: recommended versions: fix parsing bug in old parserIan Jackson2026-06-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | An existing real consensus says something like this: client-versions 0.4.8.19,0.4.8.20,0.4.8.21,0.4.8.22,0.4.8.23,0.4.8.24,0.4.8.25,0.4.9.4-rc,0.4.9.5,0.4.9.6,0.4.9.7,0.4.9.8 so it's not using the additional arguments, and the spec says those should be ignored. See also torspec!500.
* | tor-netdoc: recommended versions: new {client,server}-versions typeIan Jackson2026-06-113-12/+16
| | | | | | | | | | | | | | | | | | | | | | This is a single comma-separated argument, with absence of the item being the same as absence of the arguemnt. The previous code had `Vec<String>` which in parse2 would mean zero or more occurrences of the item, with one argument each. The old parser would split the whole RHS of the arguments. It still does right now - we'll fix that in a moment.
* | tor-netdoc: old consensus parser: add a bindingIan Jackson2026-06-111-2/+3
| | | | | | | | This will make the next change here slightly less confusing.
* | tor-netdoc: old consensus parser: break out parse_rec_versions (fmt)Ian Jackson2026-06-111-8/+7
| |
* | tor-netdoc: old consensus parser: break out parse_rec_versionsIan Jackson2026-06-111-10/+8
| | | | | | | | Again, this is going to get more complicated, so let's make a closure.
* | tor-netdoc: ConsensusBuilder: break out mk_versionsIan Jackson2026-06-111-2/+4
| | | | | | | | This is going to get more complicated, so let's make a closure for it.
* | tor-netdoc: recommended versions: add spec linksIan Jackson2026-06-111-0/+4
|/
* tor-netdoc: routerstatus entries: Add `id` item (votes only)Ian Jackson2026-06-113-0/+11
|
* tor-netdoc: routerstatus entries: Add note about location of `m` itemIan Jackson2026-06-111-0/+3
|
* tor-netdoc: routerstatus entries: Add `p` itemIan Jackson2026-06-114-0/+11
|
* tor-netdoc: routerstatus: r item: add dir-port argumentIan Jackson2026-06-113-0/+7
| | | | This was simply missing.
* tor-netdoc: routerstatus: r item: add blank lines to structIan Jackson2026-06-111-0/+5
|
* Merge branch 'validity-time-range' into 'main'Clara Engler2026-06-112-5/+13
|\ | | | | | | | | tor-netdoc: ns preamble: break out validity_time_range See merge request tpo/core/arti!4054
| * tor-netdoc: netstatus preamble: use saturating sub for starting_timeIan Jackson2026-06-101-1/+1
| |
| * tor-netdoc: ns preamble: break out validity_time_range (tidy)Ian Jackson2026-06-031-5/+3
| | | | | | | | Remove the otiose `preamble` and `timebound_range` bindings again.
| * tor-netdoc: ns preamble: break out validity_time_rangeIan Jackson2026-06-032-6/+14
| | | | | | | | | | | | | | We are going to want to use this when we implement verification for network statuses from parse2. Review with --color-moved.
| * tor-netdoc: ns preamble: break out validity_time_range (prep)Ian Jackson2026-06-031-3/+5
| | | | | | | | | | Introduce and use bindings `preamble` and `timebound_range` that will make the next change easier to review.
* | Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-103-0/+3
|\ \ | | | | | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086