| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | | |
This lets us skip fields which have the default values.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
This will let us do more exciting munging more clearly.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
The vote test files are for the next consensus interval, so we need to
verify them at a slightly future time.
|
| | | | |
|
| |/ / |
|
| | | |
|
| | |
| |
| |
| | |
Replaces a push by using the chain!() macro from itertools.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
() implements encodable which we will derive soon.
|
| | |
| |
| |
| |
| | |
This commit implements NetdocEncodableFields for AddrPolicy in a
non-trivial fashion. A unit test will be added in a moment.
|
| |/
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
Bump MSRV to 1.91
See merge request tpo/core/arti!4105
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
```
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: derives: allow handling deprecated fields
See merge request tpo/core/arti!4118
|
| | | |
| | |
| | |
| | | |
We must generally set such a field to the default.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Implement encoding and verification for consensuses, and add a round trip test
See merge request tpo/core/arti!4100
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
Microdescriptor consensuses are affected by this same anomaly.
|
| | | | |
| | | |
| | | |
| | | | |
This will let us test microdescriptors and votes with the same code.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
We're going to need this for fudges in round trip tests of consensuses
etc.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|