summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | tor-netdoc: Break out DigestName as AsRef::<str>Ian Jackson2026-05-282-4/+10
|/ / / /
* | | | Merge branch 'bug1690-p2' into 'main'opara2026-05-271-13/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: remove `use asynchronous_codec as futures_codec` in `/channel/handler.rs` Closes #1690 See merge request tpo/core/arti!4026
| * | | | tor-proto: remove `use asynchronous_codec as futures_codec` in ↵Neel Chauhan2026-05-271-13/+14
|/ / / / | | | | | | | | | | | | | | | | | | | | `/channel/handler.rs` Closes #1690.
* | | | Merge branch 'rd-happy-families' into 'main'Clara Engler2026-05-273-46/+55
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Introduce family-cert for RouterDesc See merge request tpo/core/arti!4007
| * | | | tor-netdoc: Run rustfmtClara Engler2026-05-271-18/+11
| | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | tor-netdoc: Remove virtual/real distinguishmentClara Engler2026-05-271-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Removes a comment about the virtual/real distinguishment in RouterDesc as there are no virtual items left anymore.
| * | | | tor-netdoc: Remove family_ids from RouterDescClara Engler2026-05-272-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This item is no longer required because we can extract it from family_cert. Unfortunately it requires a breaking change to the getter.
| * | | | tor-netdoc: Add From<Ed25519Identity> for RelayFamilyIdClara Engler2026-05-272-0/+7
| | | | | | | | | | | | | | | | | | | | We will need it in the next commit.
| * | | | tor-netdoc: Add family-cert to RouterDescClara Engler2026-05-272-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the family_cert field to RouterDesc using EmbeddedCert logic. Unfortunately, it requires some code gymnastics similar to the (not yet merged) identity-ed25519 certificates, which we also outlined in a comment of a previous commit in the branch. Long story short: The legacy parser and parse2 do not like to co-exist in the same scope due to the self-consuming tor-cert verification chain of which the legacy parser makes heavy use.
| * | | | tor-netdoc: Return KeyUnknownCert for happy familiesClara Engler2026-05-271-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies the legacy happy families extractor to also return KeyUnknownCert while adding a comment explaining on why this will be required.
| * | | | tor-netdoc: Split inner happy families mapClara Engler2026-05-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit splits the inner .map() function of the happy families extractor in the legacy parser. In the next commit, we will return both of these variables separately, but for now this change has no functional change and only looks redundant.
| * | | | tor-netdoc: Move typespec in legacy parserClara Engler2026-05-271-2/+2
|/ / / / | | | | | | | | | | | | | | | | We will change the type in the next commit and this will make auditing the next commits easier.
* | | | Merge branch 'relay-weight' into 'main'Ian Jackson2026-05-2711-58/+287
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-netdoc: encoding support for `w` line in routerstatus See merge request tpo/core/arti!3991
| * | | | tor-netdoc: semver.md: document RelayWeightsItem changeIan Jackson2026-05-271-0/+1
| | | | |
| * | | | tor-netdoc: More explanation about RelayWeightsItem parsingIan Jackson2026-05-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3991#note_3413169
| * | | | tor-netdoc: Rename RelayWeights to RelayWeightsItemIan Jackson2026-05-276-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3991#note_3413168
| * | | | tor-netdoc: Apply deferred rustfmt churn to use linesIan Jackson2026-05-271-2/+2
| | | | |
| * | | | tor-netdoc: RelayWeights: implement encodingIan Jackson2026-05-271-0/+17
| | | | |
| * | | | tor-netdoc: RelayWeights: provide some constructorsIan Jackson2026-05-271-2/+42
| | | | | | | | | | | | | | | | | | | | In the form of trait impls.
| * | | | tor-netdoc: RelayWeights: put code in a more sane orderIan Jackson2026-05-271-23/+21
| | | | |
| * | | | tor-netdoc: Introduce RelayWeights and use it in RouterStatusIan Jackson2026-05-276-31/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Introduce RelayWeights and use it in RouterStatus (pre)Ian Jackson2026-05-271-1/+2
| | | | | | | | | | | | | | | | | | | | Minor change which will make the next diff clearer.
| * | | | tor-netdoc: use TryFrom impl in RelayWeight parserIan Jackson2026-05-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This makes the error handling a bit more regular. It will also make the code suit our further parsing changes better.
| * | | | tor-netdoc: impl TryFrom<&NetParams<u32>> for RelayWeightIan Jackson2026-05-272-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Convert the from_net_params constructor into a TryFrom. Retain the bespoke method for the benefit of the old parser.
| * | | | tor-netdoc: Unknown: provide into_retained even when retained disabledIan Jackson2026-05-272-1/+2
| | | | |
| * | | | tor-netdoc: impl encoding and parsing for NetParams<T>Ian Jackson2026-05-272-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Not just NetParams<i32>. We're going to want it for NetParams<u32> in a moment.
| * | | | tor-netdoc: NetdocParseableFields: Pass ItemStream to finishIan Jackson2026-05-275-8/+24
| | | | |
| * | | | tor-netdoc: implement encoding for rs::SoftwareVersionIan Jackson2026-05-272-0/+8
| | | | | | | | | | | | | | | | | | | | Call the existing string encoding code.
| * | | | tor-netdoc: implement encoding for IgnoredPublicationTimeSpIan Jackson2026-05-272-0/+8
| | |/ / | |/| | | | | | | | | | | | | | This seems trivial enough I don't feel the need to mark it "incomplete" even though there is no test case.
* | | | Merge branch 'rd-or-address-sa' into 'main'Clara Engler2026-05-272-10/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-netdoc: Store or-address in a SocketAddr See merge request tpo/core/arti!4010
| * | | | tor-netdoc: Spec link for RouterDesc::or_addressClara Engler2026-05-271-2/+1
| | | | |
| * | | | tor-netdoc: Store or-address in a SocketAddrClara Engler2026-05-272-8/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the data type of RouterDesc::or_address from Option<(net::IPv6Addr, u16)> to Vec<net::SocketAddr>. This is the correct behavior according to the spec, meaning I will not give a lengthy explanation on why this is better. Reviewers might now be questioning whether the spec is wrong and/or if this is a dangerous change, as Arti used to only extract the first IPv6 address and CTor doing a similar thing. Following an IRC discussion with nickm@, we came to the conclusion that both implementation techniques are right. It is okay for the document to hold multiple addresses, it is okay for the implementation to ignore all but the first (IPv6 address). What is not okay however, is for an implementation to reject documents with multiple addresses. Besides, router descriptors are not used in the existing code for selecting the address of a relay, meaning this change has very little practical meaning.
* | | | Merge branch 'eq-certifiedkey' into 'main'Ian Jackson2026-05-271-2/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | tor-cert: Derive Eq on CertifiedKey See merge request tpo/core/arti!4021
| * | | tor-cert: Derive Eq on CertifiedKeyClara Engler2026-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This commit derives PartialEq and Eq on CertifiedKey and UnrecognizedKey in tor-cert. We will need this later for ntor cross certificates in tor-netdoc.
* | | | Merge branch 'ns-parts' into 'main'Ian Jackson2026-05-2718-142/+422
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-netdoc: Sort out most remaining structural parts of network status See merge request tpo/core/arti!3985
| * | | | tor-netdoc: Restore one-line formatting of use lineIan Jackson2026-05-271-5/+1
| | | | | | | | | | | | | | | | | | | | I unwrapped this for conflict resolution.
| * | | | tor-netdoc: Properly replace parse2::lex::NoFurtherArgumentsIan Jackson2026-05-273-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3985#note_3413185 this was a duplicate. The new NoFurtherArguments * Implements encoding * Implements more traits * Is in the right module (types::misc - it's not just for parsing) * Has a slightly better name * Had an open-coded parsing impl (which we now replace) * Had minor differences to docs (so we add a line to NoFurtherArguments)
| * | | | tor-netdoc: Remove duplicate semver entryIan Jackson2026-05-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3985#note_3413184
| * | | | tor-netdoc: Add some TODOsIan Jackson2026-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3985#note_3413183
| * | | | tor-netdoc: Rename FixedString to ConstantStringIan Jackson2026-05-275-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3985#note_3413182 I left the word "fixed" in some of the docs and error messages, where it seemed to make sense.
| * | | | tor-netdoc: Apply deferred rustfmt import churnIan Jackson2026-05-272-3/+5
| | | | |
| * | | | tor-netdoc: introduce VoteStatusConsensus and VoteStatusVoteIan Jackson2026-05-273-36/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Replacing poc's. The new define_fixed_string macro is really helping here.
| * | | | tor-netdoc: NetworkStatusVersionItem, replacing poc's tupleIan Jackson2026-05-273-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Defining a struct gives us a place to hang the documentation, and avoids an accidentally-exhaustive tuple.
| * | | | tor-netdoc: VarietyKeyword, replacing poc's flavour typeIan Jackson2026-05-274-27/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more code than the poc version but much of the extra is documentation, and it seems much less magical this way. We still need a handwritten parser for plain consensuses, sadly.
| * | | | tor-netdoc: Promote/adjust poc's NetworkStatusSignaturesIan Jackson2026-05-272-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order of arguments of poc's ns_type macro is different to that of the real code. This is very confusing! However, the type is correct, once we've added the singleton signature for votes.
| * | | | tor-netdoc: Provide NoMoreArguments markerIan Jackson2026-05-273-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to need this for type-driven parsing of the necessarily-absent flavour argument in a vote's `network-status-version`.
| * | | | tor-netdoc: use DirectorySignaturesHashesAccu in SignatureGroupIan Jackson2026-05-274-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will let us (re)use the existing signature checking code with the parse2 type, since we'll be able to make a SignatureGroup out of a parse2'd UnverifiedNetworkStatus.
| * | | | tor-netdoc: Make fields of DirectorySignaturesHashesAccu publicIan Jackson2026-05-272-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This will allow it to be a replacement inside `SignatureHashes`. Keeping the fields private seems to have been an oversight.
| * | | | tor-netdoc: SignatureGroup: add some notes to the docsIan Jackson2026-05-271-0/+4
| | | | |
| * | | | tor-netdoc: Replace poc's NddDirectoryFooter with new FooterIan Jackson2026-05-274-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | This is the whole of the footer section, with docs, appropriate derives, and so on.