summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-netdoc: encode derive: New default(skip) featureIan Jackson2026-06-224-0/+72
| | | | | | | | | | | | This lets us skip fields which have the default values.
* | | tor-netdoc: encode derive: New default(skip) feature (pre-fmt)Ian Jackson2026-06-221-3/+7
| | |
* | | tor-netdoc: derive encoding for microdescriptorsIan Jackson2026-06-223-4/+5
| | | | | | | | | | | | | | | | | | | | | All these types already have parsing derives. The encoding isn't quite right yet. It's legal, but doesn't match C Tor as well as we'd like.
* | | tor-netdoc: Add a TODO for use of include_strIan Jackson2026-06-221-0/+2
| | |
* | | tor-netdoc: embedded auth certs: Use real vote type, not poc (fmt)Ian Jackson2026-06-221-3/+1
| | |
* | | tor-netdoc: embedded auth certs: Use real vote type, not pocIan Jackson2026-06-221-3/+1
| | |
* | | tor-netdoc tests: test vote roundtrip with testdata2Ian Jackson2026-06-222-27/+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: Make regsub take a ReplacerIan Jackson2026-06-221-1/+1
| | | | | | | | | | | | This will let us do more exciting munging more clearly.
* | | 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-223-1/+85
| | |
* | | tor-netdoc: Implement verification for votesIan Jackson2026-06-222-3/+139
|/ /
* | tor-netdoc: Use format_args! instead of format!Clara Engler2026-06-181-1/+1
| |
* | tor-netdoc: Use chain!() instead of pushClara Engler2026-06-181-6/+7
| | | | | | | | Replaces a push by using the chain!() macro from itertools.
* | tor-netdoc: Add test for default deny encoding of AddrPolicyClara Engler2026-06-181-0/+28
| |
* | tor-netdoc: Round-trip encoding test for AddrPolicyClara Engler2026-06-181-1/+8
| |
* | tor-netdoc: Derive NetdocEncodable in unit testClara Engler2026-06-181-1/+1
| |
* | tor-netdoc: Replace Ignored with () in AddrPolicy testClara Engler2026-06-181-5/+2
| | | | | | | | () implements encodable which we will derive soon.
* | tor-netdoc: Add NetdocEncodableFields for AddrPolicyClara Engler2026-06-182-0/+36
| | | | | | | | | | This commit implements NetdocEncodableFields for AddrPolicy in a non-trivial fashion. A unit test will be added in a moment.
* | tor-netdoc: Make some policy methods constClara Engler2026-06-182-3/+3
|/ | | | | | This commit makes some policy related constructor functions constant, so we can use them in const expressions, which will be required for the next commit.
* Merge branch 'msrv-1.91' into 'main'gabi-2502026-06-181-1/+1
|\ | | | | | | | | Bump MSRV to 1.91 See merge request tpo/core/arti!4105
| * Bump MSRV to 1.91Clara Engler2026-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* | Merge branch 'derive-depr' into 'main'Clara Engler2026-06-182-0/+5
|\ \ | | | | | | | | | | | | tor-netdoc: derives: allow handling deprecated fields See merge request tpo/core/arti!4118
| * | tor-netdoc: constructor derive: allow setting deprecated fieldsIan Jackson2026-06-161-0/+1
| | | | | | | | | | | | We must generally set such a field to the default.
| * | tor-netdoc: parse2 derive: allow setting deprecated fieldsIan Jackson2026-06-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to derive from a struct with deprecated fields, without triggering the warning. This doesn't yet treat encoding as yet, because the only deprecated field I encountered was `skip` which means the derived encoder never mentions it.
* | | tor-netdoc: votes: use EmbeddedCert for the authhcertIan Jackson2026-06-172-2/+6
| | |
* | | tor-netdoc: EmbeddedCert: support whole netdocs (for AuthCert) (fmt)Ian Jackson2026-06-171-2/+7
| | |
* | | tor-netdoc: EmbeddedCert: support whole netdocs (for AuthCert)Ian Jackson2026-06-172-2/+34
| | |
* | | Merge branch 'consensus-roundtrip' into 'main'Ian Jackson2026-06-179-100/+312
|\ \ \ | | | | | | | | | | | | | | | | Implement encoding and verification for consensuses, and add a round trip test See merge request tpo/core/arti!4100
| * | | tor-netdoc: consensus_threshold: return a RangeFromIan Jackson2026-06-172-8/+14
| | | |
| * | | tor-netdoc: Document new facilitiesIan Jackson2026-06-171-0/+2
| | | |
| * | | 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-172-2/+43
| | | |
| * | | tor-netdoc: tests: Add regsub utility functionIan Jackson2026-06-172-0/+9
| | | | | | | | | | | | | | | | | | | | We're going to need this for fudges in round trip tests of consensuses etc.
| * | | 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-173-70/+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: tests: Move poc authcert test to authcert.rsIan Jackson2026-06-172-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no separate poc authcert type any more. This is a perfectly fine test case. Almost entirely code motion; review with git show --color-moved --color-moved-ws=allow-indentation-change
| * | | tor-netdoc: poc tests: drop some unneeded &'sIan Jackson2026-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clippy complains (clippy::needless_borrows_for_generic_args). In poc, we have an allow with a TODO asking for this to be done generally in the Arti codebase. Let's postpone shaving that yak.