aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Derive PartialEq and Eq for LifetimeClara Engler2026-08-101-1/+1
| | | | Needed for tor-dirserver testing.
* tor-netdoc: testing: Expose regsubIan Jackson2026-07-301-1/+1
| | | | Involves code motion. Review with --color-moved.
* tor-netdoc: Replace two open-coded slice::fillIan Jackson2026-07-271-3/+1
| | | | Placates recent clippy.
* tor-netdoc: derive Hash for netstatus::ConsensusMethodsIan Jackson2026-07-231-1/+1
|
* tor-checkable: Rename `TimeBound::check_valid_*` to `if_valid_*`Ian Jackson2026-07-231-1/+1
| | | | | | | I find these names confusing. To my mind "check" implies a function returning `Result<(), _>`. Some other APIs use `unwrap` here but I think `if` is good.
* tor-netdoc: Fix grammar in a commentIan Jackson2026-07-221-1/+1
|
* tor-netdoc tests; work around version number ordering issueIan Jackson2026-07-211-0/+16
| | | | | | | | | Ideally we would have Arti sort things sensibly but currently we have no types in Arti that are (1) faithful (2) sort correctly. Most of the existing types eventually have a `TorVersion` inside, which is lossy, so we can't use them for (eg) dirauth network status processing.
* Use new TimeRangeBound name throughout the treeIan Jackson2026-07-161-4/+4
|
* Use new TimeBound name throughout the treeIan Jackson2026-07-161-4/+4
|
* tor-netdoc: Expose ConsensusMethod's fieldIan Jackson2026-07-151-1/+2
|
* tor-netdoc: Stabilise votes and encoding of authcertsIan Jackson2026-07-151-18/+7
|
* tor-netdoc tests: Test consensus verification error casesIan Jackson2026-07-151-3/+1
|
* tor-netdoc tests: Break out prep_netstatus_verify (fmt)Ian Jackson2026-07-151-6/+1
|
* tor-netdoc tests: Break out prep_netstatus_verifyIan Jackson2026-07-151-18/+32
|
* tor-netdoc tests: Test roundtrip of subset of live dataIan Jackson2026-07-151-2/+50
| | | | With facility to test roundtrip of whole consensus.
* tor-netdoc: Add some missing "retain-unknown" cfg gates to testsIan Jackson2026-07-151-4/+4
| | | | Nothing in CI tests incomplete without retain-unknown, apparently.
* tor-netdoc: Now that poc is gone, make some things no longer pub(crate)Ian Jackson2026-07-151-9/+4
|
* multiple crates: Fix clippy warningshjrgrn2026-07-101-1/+1
|
* tor-netdoc: Add a TODO for use of include_strIan Jackson2026-06-221-0/+2
|
* tor-netdoc tests: test vote roundtrip with testdata2Ian Jackson2026-06-221-18/+83
| | | | | | | | | | | 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: Adjust `m` placement in routerdescIan Jackson2026-06-221-0/+12
|
* tor-netdoc tests: Adjust shared-rand-* base64 paddingIan Jackson2026-06-221-0/+13
| | | | | | Right now we're working on votes, but the same issue arises in consensuses; we just haven't noticed yet because the testdata2 consensus doesn't have an SRV.
* tor-netdoc tests: Make adjust_exp into a trait method (fmt)Ian Jackson2026-06-221-25/+25
|
* tor-netdoc tests: Make adjust_exp into a trait methodIan Jackson2026-06-221-9/+33
| | | | | | | | In the future (not quite yet in this branch), there will be tests that want to use roundtrip_netstatus for other test files. We'll want to be able to reuse the per-document-specific munging. So make that into a trait. And document roundtrip_netstatus.
* tor-netdoc tests: roundtrip_netstatus: Improve an error messageIan Jackson2026-06-221-1/+1
|
* tor-netdoc tests: roundtrip_netstatus: Add a useful debug boundIan Jackson2026-06-221-1/+1
|
* tor-netdoc tests: netstatus round trips: allow adjusting nowIan Jackson2026-06-221-1/+5
| | | | | The vote test files are for the next consensus interval, so we need to verify them at a slightly future time.
* tor-netdoc tests: Test verification of votes, error casesIan Jackson2026-06-221-0/+83
|
* tor-netdoc: Implement verification for votesIan Jackson2026-06-221-3/+49
|
* tor-netdoc: votes: use EmbeddedCert for the authhcertIan Jackson2026-06-171-1/+1
|
* tor-netdoc: consensus_threshold: return a RangeFromIan Jackson2026-06-171-7/+13
|
* tor-netdoc: tests: ns parse2 test: Round trip an md consensusIan Jackson2026-06-171-9/+17
|
* tor-netdoc: tests: ns parse2 test: Make roundtrip test generic (fmt)Ian Jackson2026-06-171-19/+16
|
* tor-netdoc: tests: ns parse2 test: Promote a fudgeIan Jackson2026-06-171-7/+8
| | | | Microdescriptor consensuses are affected by this same anomaly.
* tor-netdoc: tests: ns parse2 test: Make roundtrip test genericIan Jackson2026-06-171-15/+42
| | | | This will let us test microdescriptors and votes with the same code.
* tor-netdoc: tests: ns parse2 test: Round trip a plain consensusIan Jackson2026-06-171-1/+42
|
* tor-netdoc: tests: ns parse2 test: Mess with authcerts in a block (fmt)Ian Jackson2026-06-171-10/+10
|
* tor-netdoc: tests: ns parse2 test: Mess with authcerts in a blockIan Jackson2026-06-171-2/+4
| | | | | This avoids rebinding file and text and input to the authcerts. We're going to want to use at least some of those values later.
* tor-netdoc: tests: ns parse2 test: enable UnknownIan Jackson2026-06-171-1/+2
|
* tor-netdoc: tests: ns parse2 test: Use real document type (fmt)Ian Jackson2026-06-171-3/+2
|
* tor-netdoc: tests: ns parse2 test: Use real document typeIan Jackson2026-06-171-4/+4
|
* tor-netdoc: tests: Move ns poc tests to netstatus.rsIan Jackson2026-06-171-1/+49
| | | | | | | | | | | | | | | | We're going to turn these into full-on round-trip tests for both flavours of consensus. We must temporarily bodge the more comprehensive test, for plain con sensuses, to to still use the actual document type from poc. That allows us to avoid changing the arguments to verify() etc. (poc's verify is subtly different to the real NetworkStatus's.) When these tests were in poc, they were gated by the incomplete cfg on the whole of poc. Now they have one each. Almost entirely code motion; review with git show --color-moved --color-moved-ws=allow-indentation-change
* tor-netdoc: un-cfg-gate some use'sIan Jackson2026-06-171-5/+2
| | | | | We have the #1645 allow at the top of lib.rs, so this is unnecessary bureaucracy. Let's simplify this before adding more to it.
* tor-netdoc: provide verify methods on new consensus types (fmt)Ian Jackson2026-06-171-3/+2
|
* tor-netdoc: provide verify methods on new consensus typesIan Jackson2026-06-171-2/+41
|
* tor-netdoc: Break out consensus_threshold fnIan Jackson2026-06-171-2/+30
| | | | This calculation appeared 3 times.
* tor-netdoc: Rename variants in VerifyGeneralTrustedAuthorities (fmt)Ian Jackson2026-06-111-3/+1
|
* tor-netdoc: Rename variants in VerifyGeneralTrustedAuthoritiesIan Jackson2026-06-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | In a wip branch I added a variant, and clippy complained. In this case, I agree with clippy. warning: all variants have the same postfix: `Authorities` --> crates/tor-netdoc/src/doc/netstatus.rs:2335:1 | 2335 | / pub(crate) enum VerifyGeneralTrustedAuthorities<'r> { 2336 | | /// Trust these authorities. 2337 | | TrustTheseAuthorities { 2338 | | /// The HKP_auth_id_rsa ... | 2357 | | }, 2358 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#enum_variant_names note: the lint level is defined here --> crates/tor-netdoc/src/lib.rs:9:9 | 9 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::enum_variant_names)]` implied by `#[warn(clippy::all)]`
* Merge branch 'verify-general' into 'main'Ian Jackson2026-06-111-46/+230
|\ | | | | | | | | tor-netdoc: overhaul consensus verification, in preparation for parse2 ns verification See merge request tpo/core/arti!4065
| * tor-netdoc: verify_general: explain an exhaustive patternIan Jackson2026-06-111-0/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4065#note_3423331