summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-memquota: Declare memquota feature stable, and defaultIan Jackson2024-10-223-3/+28
| | | | | | | | | | | | | | | | And document the Cargo features. This compiles in the memquota support for people who depend directly on tor-memquota. But all our in-tree dependencies turn off default features, so this doesn't have any effect for in-tree crates.
* | tor-cell: Document Cargo featuresIan Jackson2024-10-221-0/+27
| |
* | tor-hscrypto: Document Cargo featuresIan Jackson2024-10-221-1/+18
| |
* | tor-llcrypto: Document memquota-memcost and full featuresIan Jackson2024-10-221-0/+6
| |
* | tor-llcrypto: Sort and tidy Cargo features in README.mdIan Jackson2024-10-221-10/+8
| | | | | | | | | | | | Sort them alphabetically. Use the bullet point style we see elsewhere. Use the same headings as elsewhere.
* | tor-units: Document Cargo featuresIan Jackson2024-10-221-0/+8
| |
* | arti cfg tests: Clarify here and thereIan Jackson2024-10-221-1/+2
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2561#note_3097443
* | arti cfg tests: Fix typoIan Jackson2024-10-221-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2561#note_3097442
* | minimal features test: Introduce new --cfg arti_features_preciseIan Jackson2024-10-222-1/+21
| | | | | | | | | | Work around awkward cargo behaviour and allow us to more reliably test disabled features, even if they're enabled by default at lower levels.
* | test-all-crates: conditional options, to test more cratesIan Jackson2024-10-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This new feature lets us provide the "enable these options which are needed to make the tests pass" featrure, which is different for each of the afflicted crates. Then we can test these crates tor-hsservice arti arti-client which minimal features. This will be important in a moment, as we're going to want to be relying on actually minimal features tests in arti cfg.rs.
* | Merge branch 'mq-fix' into 'main'Ian Jackson2024-10-228-26/+92
|\ \ | | | | | | | | | | | | memquota: Fix account lifetime bugs, and arrange to test mq in shadow See merge request tpo/core/arti!2560
| * | memquota: Use _ rather than allow(dead_code) (fmt)Ian Jackson2024-10-221-1/+4
| | |
| * | memquota: Use _ rather than allow(dead_code)Ian Jackson2024-10-222-12/+16
| | | | | | | | | | | | | | | | | | | | | Promote the associated comments. As suggested here: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2560#note_3097188
| * | tor-memquota: Fix rustfmt-damaged indentationIan Jackson2024-10-221-5/+5
| | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2560#note_3097189
| * | memquota: Fix error message stringsIan Jackson2024-10-211-2/+2
| | | | | | | | | | | | | | | These errors aren't necessarily memory pressure. They can occur due to bugs, and during teardown.
| * | memquota: In debug builds, reliably detect use of dropped AccountIan Jackson2024-10-211-0/+13
| | | | | | | | | | | | | | | This detects the bugs I have just fixed - in Shadow tests with the feature enabled and a (large) limit set.
| * | memquota: Fix a test not to rely on accessing cache with dead AccountIan Jackson2024-10-211-1/+1
| | |
| * | memquota: fix data stream account lifetimeIan Jackson2024-10-211-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DataStream is sometimes disassembled, eg by split. When that happens, the StreamAccount would be dropped - and that was the only strong reference. Put a StreamAccount in each of the pieces, instead of just in the combined DataStream struct.
| * | memquota: Fix resolve stream account lifetimeIan Jackson2024-10-212-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need the mq account for the stream not to collapse. The ResolveStream object needs to contain a strong reference to it. Have begin_stream_impl return the StreamAccount, rather than taking it as a parameter. That makes this bug a little more obvious. It also centralises the StreamAccount creation.
| * | memquota: Fix circuit account lifetime (fmt)Ian Jackson2024-10-212-5/+24
| | |
| * | memquota: Fix circuit account lifetime (clippy churn)Ian Jackson2024-10-212-5/+5
| | | | | | | | | | | | | | | | | | Now that it doesn't call CircuitAccount::new() it has no error paths, and clippy demands we remove the Result, so it must once again become infallible.
| * | memquota: Fix circuit account lifetimeIan Jackson2024-10-212-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | We foolishly made *two* CircuitAccounts, one of which gets immediately dropped. But we need to hold onto the account somewhere, because an mq_queue doesn't keep the account alive. Otherwise everything breaks when mq tracking is enabled.
| * | memquota: Log a trace message when a claim failsIan Jackson2024-10-212-1/+9
| | |
| * | memquota: Log a message at info on startup, if enabledIan Jackson2024-10-211-0/+3
| | |
* | | Merge branch 'inet_not_tcp' into 'main'David Goulet2024-10-221-35/+35
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | general::SocketAddr: Say "inet" rather than "tcp" Closes #1701 See merge request tpo/core/arti!2554
| * | | general::SocketAddr: Say "inet" rather than "tcp"Nick Mathewson2024-10-171-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "inet" makes more sense, since in principle these can also be used for udp, etc. Also making a corresponding change in rpc-connect-sketch.md, which uses this format. Closes #1701.
* | | | Merge branch 'peek' into 'main'Ian Jackson2024-10-221-4/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove an obsolete TODO See merge request tpo/core/arti!2562
| * | | | Remove an obsolete TODOIan Jackson2024-10-211-4/+0
| | |/ / | |/| | | | | | | | | | This *is* in tor-async-utils :-).
* | | | rpclib: Rename RequestCancelled to be accurate.Nick Mathewson2024-10-214-18/+9
| | | |
* | | | Merge branch 'bug1531' into 'main'Ian Jackson2024-10-2115-36/+49
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move crates to crates to slotmap-careful Closes #1531 See merge request tpo/core/arti!2530
| * | | | Convert a few crates to slotmap-carefulNeel Chauhan2024-10-1715-36/+49
| | | | |
* | | | | Merge branch 'test_create_hop_count_reinstate' into 'main'gabi-2502024-10-211-4/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | tor-proto: Reinstate circuit hop check in test_create() See merge request tpo/core/arti!2546
| * | | | tor-proto: Reinstate circuit hop check in test_create()Neel Chauhan2024-10-161-4/+1
| |/ / /
* | | | Merge branch 'arti-rpcserver-comment' into 'main'wesleyac2024-10-211-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix typo in arti-rpcserver auth.rs comment See merge request tpo/core/arti!2558
| * | | | Fix typo in arti-rpcserver auth.rs commentNeel Chauhan2024-10-181-1/+1
| | |/ / | |/| |
* | | | rpc: List missing required features in error dataNick Mathewson2024-10-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our spec says that when the RPC client has said "I require you to have feature X" and we don't have it, we need to include the feature(s) we don't have in an `rpc:unsupported_features` field of our error. Also, add an integration test for this behavior. Closes #1662
* | | | rpc: Include "data" field in error.Nick Mathewson2024-10-171-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In older versions of the rpc spec, this field held a serialized version of the Arti error object. That's no longer the design: now it provides a way for specific errors to include extra, specified, machine-readable data. For more information see the section "Errors" in rpc-meta-draft.md
* | | | Remove Rpc* variants from tor_error::ErrorKindNick Mathewson2024-10-178-92/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are not regular ErrorKinds, since they can never occur in an error that's meant to be returned from a Rust API like `arti-client`. Instead, they only exist for errors returned from RpcError. (I can't find the place where we discussed this previously, but the rationale is that if an ErrorKind never makes sense in response to something that the user does from Rust, we should never have that be an ErrorKind. The fact that the removed kinds do not actually appear outside the RPC system suggests that this is reasonable.)
* | | | rpcserver: Wrap InvokeError as internal errorNick Mathewson2024-10-173-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm about to remove HasKind from InvokeError, which would otherwise break this code. These errors are all in fact internal errors, since in this context they can only stem from incorrectly formed calls to `invoke_special_method`.
* | | | Tweak some RpcErrorKind member names.Nick Mathewson2024-10-171-4/+4
| | | | | | | | | | | | | | | | In some cases, the tor_error::ErrorKind names were nicer.
* | | | rpc: Create a constructor for RpcError.Nick Mathewson2024-10-171-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll use this to make RpcErrors directly, without having to go through an error that implements HasKind. Later, we'll add the ability to set the `data` fields on an RpcError.
* | | | rpc: Allow the "RpcError.kinds" to be an RpcErrorKind.Nick Mathewson2024-10-172-11/+33
| | | | | | | | | | | | | | | | | | | | This change will let us start removing the not-entirely-logical `Rpc.*` variants from tor_error::ErrorKind.
* | | | rpc: Make RpcErrorKind public.Nick Mathewson2024-10-172-2/+3
| | | |
* | | | rpc: Rename RpcCode to RpcErrorKind.Nick Mathewson2024-10-171-6/+13
| | | | | | | | | | | | | | | | This is about to be a public competitor with tor_error::ErrorKind.
* | | | rpc: Use an alias for RpcCode.Nick Mathewson2024-10-171-9/+10
| | | |
* | | | rpc: Remove prefix from RpcCode members.Nick Mathewson2024-10-171-20/+19
|/ / /
* | / memquota: suppress clippy::single_match warning.Nick Mathewson2024-10-171-0/+1
| |/ |/| | | | | | | "Suppress" rather than "fix": this pattern is intentional, and makes it clear that we're doing an exhaustive match.
* | Merge branch 'tor-key-forge-cleanup' into 'main'gabi-2502024-10-173-7/+12
|\ \ | | | | | | | | | | | | tor-key-forge: Minor cleanups and reformatting See merge request tpo/core/arti!2552
| * | tor-key-forge: Fix typo in documentation.Gabriela Moldovan2024-10-171-2/+2
| | |
| * | tor-key-forge: Replace fully-qualified path with import.Gabriela Moldovan2024-10-171-2/+2
| | | | | | | | | | | | | | | `KeypairData` is already in scope, so there's no need to fully-qualify it.