aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | tor-proto: move memquota stream account arg to last positionSteven Engler2026-05-215-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This better matches nearby code.
| * | | | | | | tor-proto: clean up `CIRCUIT_BUFFER_SIZE`Steven Engler2026-05-214-12/+2
| | | | | | | |
| * | | | | | | tor-proto: move more stream queue init to reactorSteven Engler2026-05-217-149/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when initializing a stream, we constructed most of the stream-related queues outside of the reactor and passed the relevant halves of the queues (senders or receivers) into the reactor. A downside of the above approach is that the reactor may be better informed about what queues to construct, and how to construct them. For example the reactor knows what type of flow control that the hop is using, so it knows whether we need queues for passing rate limits and drain rates for XON/XOFF flow control. This commit moves the construction of these queues into the reactor and passes the relevant halves out of the reactor. In the future we can make better decisions about which queues are needed depending on the flow control method used instead of always constructing them (see arti#2068). Reviewing with `--color-moved` might be helpful as a few lines have been moved.
| * | | | | | | tor-proto: add `ReactorStreamComponents` to bundle return valsSteven Engler2026-05-207-29/+54
|/ / / / / / /
* | | | | | | Merge branch 'cc-buf-size' into 'main'opara2026-05-2113-123/+145
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Determine stream inbound message queue's capacity at runtime Closes #2536 See merge request tpo/core/arti!3981
| * | | | | | | tor-proto: small comment improvementsSteven Engler2026-05-202-1/+3
| | | | | | | |
| * | | | | | | tor-proto: remove unneeded type aliasSteven Engler2026-05-201-5/+2
| | | | | | | |
| * | | | | | | tor-proto: always use a bounded mpsc queue for streamsSteven Engler2026-05-203-39/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether a stream queue should be bounded or unbounded is a decision that needs to be made at runtime depending on the type of flow control used, not at build-time. Window-based flow control should be bounded and XON/XOFF flow control should be unbounded. If we wanted to support both bounded and unbounded queues, it would take a bunch of boilerplate code to wrap the senders and receivers in enums. Instead we make the queue always bounded, but use a large bound for XON/XOFF flow control.
| * | | | | | | tor-proto: add `FlowCtrlHooks::inbound_queue_max_len()`Steven Engler2026-05-203-1/+35
| | | | | | | |
| * | | | | | | tor-proto: move stream incoming queue init to reactorSteven Engler2026-05-207-69/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stream queue length (for messages incoming from the Tor network) depends on the type of flow control we're using for the hop. Currently we construct the stream queue outside of the circuit reactor, but we don't have the flow control information here. Instead of constructing the stream queue outside of the reactor and passing the sender into the reactor, we construct the stream queue inside of the reactor and pass the receiver out of the reactor.
| * | | | | | | tor-proto: small cleanup of `CircHopOutbound::build_flow_ctrl()`Steven Engler2026-05-201-11/+4
| | | | | | | |
| * | | | | | | tor-proto: rename `{,Half}StreamFlowCtrlInner` variantsSteven Engler2026-05-201-10/+10
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | The common suffix isn't needed.
* | | | | | | Merge branch 'vegas-stall' into 'main'David Goulet2026-05-204-14/+36
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Don't run vegas algorithm when a clock stall/jump was detected Closes #2504 See merge request tpo/core/arti!3967
| * | | | | | tor-proto: vegas: return early if clock stall was detectedSteven Engler2026-05-073-10/+23
| | | | | | |
| * | | | | | tor-proto: rtt: return clock stall/jump status from `update()`Steven Engler2026-05-071-4/+13
| | | | | | |
* | | | | | | Merge branch 'keymgr-raw-ids' into 'main'opara2026-05-1910-132/+88
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keymgr: more docs for the `RawEntryId` APIs, and some dead code removal See merge request tpo/core/arti!3997
| * | | | | | | keymgr: Add a TODO about possibly removing RawEntryId::EphemeralGabriela Moldovan2026-05-181-0/+11
| | | | | | | |
| * | | | | | | keymgr: Rephrase the remove_unchecked docs for clarityGabriela Moldovan2026-05-181-5/+5
| | | | | | | |
| * | | | | | | keymgr: Clarify that not all keystores support stringly-typed entry IDsGabriela Moldovan2026-05-181-0/+12
| | | | | | | |
| * | | | | | | keymgr: Remove a couple unused From<> implsGabriela Moldovan2026-05-183-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are unused, and I don't think they're needed by our API users either, since `KeystoreEntryResult` is just a type alias for `Result`.
| * | | | | | | keymgr: Update tests to stop using RawKeystoreEntry (fmt)Gabriela Moldovan2026-05-181-3/+1
| | | | | | | |
| * | | | | | | keymgr: Update tests to stop using RawKeystoreEntryGabriela Moldovan2026-05-182-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `RawKeystoreEntry` no longer exists, so these tests need to be updated.
| * | | | | | | keymgr: Remove RawKeystoreEntry (fmt)Gabriela Moldovan2026-05-184-6/+6
| | | | | | | |
| * | | | | | | keymgr: Remove RawKeystoreEntryGabriela Moldovan2026-05-188-89/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this adds unnecessary indirection, and it's a bit confusing to have two separate keystore entry types (we have `KeystoreEntry` too). This type exists just to server as a wrapper over the `RawEntryId` of an unrecognized keystore entry, and the `KeystoreId` of the keystore it was found in. This commit folds `RawKeystoreEntry` into `UnrecognizedEntry`, which was previously a thin wrapper over `RawKeystoreEntry`.
* | | | | | | | Merge branch 'enumset-update' into 'main'Clara Engler2026-05-191-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update to enumset 1.1.13 See merge request tpo/core/arti!4004
| * | | | | | | | Update to enumset 1.1.13Nick Mathewson2026-05-191-2/+2
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.1.11 and 1.1.12 were yanked, apparently for accidental semver breaks.
* | | | | | | | Merge branch 'routerdescs-certs' into 'main'Clara Engler2026-05-193-4/+508
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Elliptic Curve Certificates for Router Descriptors See merge request tpo/core/arti!3939
| * | | | | | | | tor-netdoc: Remove round-trip Ed25519 cert verificationClara Engler2026-05-191-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the Ed25519 round-trip verifciation in certificate creation because it reduces the code complexity and is pretty uncommon in cryptographic code.
| * | | | | | | | tor-netdoc: Add TODO for family name getterClara Engler2026-05-191-0/+3
| | | | | | | | |
| * | | | | | | | tor-netdoc: Test invalid certified key typeClara Engler2026-05-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit tests an invalid certified key type by adding a test that does not use CertifiedKey::Ed25519.
| * | | | | | | | tor-netdoc: Prepare tests for invalid certified key type (fmt)Clara Engler2026-05-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | | | | | tor-netdoc: Prepare tests for invalid certified key typeClara Engler2026-05-191-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adjusts the tests to make it possible to add a test for a non-matching certified key type. For this, we simply store the certified key as a CertifiedKey and not as an Ed25519Identity. Inevitably, this requires us to "force" create such an identity on the fly in order to test the mismatch, which is fine because it is an edge-case anyways.
| * | | | | | | | tor-netdoc: Fix embedded cert numberingClara Engler2026-05-191-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the numbering due to a recently added additional check. Review using --word-diff=color.
| * | | | | | | | tor-netdoc: Properly verify certified key typeClara Engler2026-05-191-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit properly verifies the certified key type by not returning a bug but rather invalid data in the case of the certified key not being an Ed25519 key. Tests and number adjustments will follow.
| * | | | | | | | tor-netdoc: Add Ed25519FamilyCertClara Engler2026-05-193-1/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new type, Ed25519FamilyCert, which works very similar to Ed25519IdentityCert, except that it supports family certificates. A notable difference is, that the identity key must be provided during verification because it does not make sense to verify these certificates without it.
| * | | | | | | | tor-netdoc: Add Ed25519IdentityCertClara Engler2026-05-193-3/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the Ed25519IdentityCert type using EmbeddableCert logic that was introduced recently. These certificates contain the identity key and the signing key of a relay and the type provides two methods: .verify() for verification and .new_signed() for construction. Besides, edcert::* is now made public as this is required now given that it contains public types.
| * | | | | | | | tor-netdoc: Add test framework for edcertsClara Engler2026-05-191-1/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the test utilities required for testing the yet-to-be-implemented Ed25519IdentityCert and Ed25519FamilyCert types, whose interface largely overlaps, making a test "framework" useful to avoid code duplication. Their interfaces consist of two functions: * `.verify(Ed25519Identity, KeyUnknownCert, Duration, SystemTime)` * Verifies a KeyUnknownCert whether it is valid, given a SystemTime plus post valid tolerance alongside a well-known identity key in the case of family certificates. * `.new_signed(&ed25519::Keypair, Ed25519Identity, SystemTime)` * Creates a new certificate from a signing keypair plus a certified key alongside a SystemTime at when this certificate will expire. The commit introduces a testing trait that will be implemented for both types once added. Then, there are two generic tests that test the generation and verification of a valid random one as well as a test that tests violation of various constraints common to these certificates. The generic trait is most notable for the .new_signed() and .verify() method which we are roughly documented. Please see the next commit for a concrete example if understanding is hard.
* | | | | | | | | Merge branch 'routerdescs2-parse2-prep' into 'main'Clara Engler2026-05-192-17/+26
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Preperations for Router Descriptor Parsing See merge request tpo/core/arti!3959
| * | | | | | | | tor-netdoc: Move FromIterator doc to type docClara Engler2026-05-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves the documentation for FromIterator<RelayFamilyId> for RelayFamilyIds to the type level documentation of RelayFamilyIds. It also rephrases the comment to fit in there more nicely grammatically and contextually, as a pure motion of the comment would not have been helpful to have there in any circumstance.
| * | | | | | | | tor-netdoc: Add TODO for sort/dedup in FromIteratorClara Engler2026-05-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a TODO with regard to .sort() and .dedup() in FromIterator in RelayFamilyIds and the fact that it is slightly weird. This is not a new problem with the type but stems from the fact that it tries to emulate a BTreeSet inside a Vec which is not nice.
| * | | | | | | | tor-netdoc: Derive PartialOrd, Ord on NumericBooleanClara Engler2026-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While already here, do this change, in case it becomes useful later on.
| * | | | | | | | tor-netdoc: Sort and dedup in RelayFamilyIds::from_iterClara Engler2026-05-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes working with this more comfortable as those calls are generally required anyways.
| * | | | | | | | tor-netdoc: Derive Copy on RsaIdentity wrappersClara Engler2026-05-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RsaIdentity implements Copy itself so it makes sense to derive it on those wrappers too.
| * | | | | | | | tor-netdoc: Derive Eq for NumericBooleanClara Engler2026-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helpful in tests instead of Deref.
| * | | | | | | | tor-netdoc: Derive Transparent on NumericBooleanClara Engler2026-05-191-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an outstanding TODO.
| * | | | | | | | tor-netdoc: Derive Transparent on Ed25519PublicClara Engler2026-05-191-7/+2
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need an inverse of the existing From implementation so that derivation makes sense because we will obtain it for free then.
* | | | | | | | Merge branch 'rpc-config-preliminary' into 'main'Nick Mathewson2026-05-1810-128/+203
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully non-controversial parts of RPC configuration prep work Closes #2532 See merge request tpo/core/arti!3979
| * | | | | | | config-path: Convert tests to use dd(TorConfig).Nick Mathewson2026-05-183-9/+7
| | | | | | | |
| * | | | | | | config: Convert some load.rs tests to use dd(TorConfig).Nick Mathewson2026-05-181-18/+11
| | | | | | | |
| * | | | | | | config: Use derive(TorConfig) for map builder tests.Nick Mathewson2026-05-181-14/+8
| | | | | | | |