summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | tor-circmgr: Post-renaming documentation fixes.Gabriela Moldovan2024-10-244-14/+14
| | | |
* | | | tor-circmgr: s/stub/stem throughout.Gabriela Moldovan2024-10-244-100/+100
| | | |
* | | | tor-circmgr: s/HsCircStubKind/HsCircStemKind.Gabriela Moldovan2024-10-242-27/+27
| | | | | | | | | | | | | | | | As per #1479
* | | | tor-circmgr: s/HsCircStubKind/HsCircStemKind.Gabriela Moldovan2024-10-245-60/+60
| | | | | | | | | | | | | | | | As per #1479
* | | | tor-circmgr: Use the new vanguards terminology throughout.Gabriela Moldovan2024-10-243-75/+75
|/ / / | | | | | | | | | | | | | | | | | | | | | This is the first step towards clarifying the questions from !2230. Corresponding torspec changes: https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/282 Part of #1479
* | | Run "black" to reformat all our pythonNick Mathewson2024-10-241-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Black" is an "opinionated" python formatter, whose opinionatedness is somewhat in the spirit of rustfmt. This MR runs black with default settings on all of our python code in Arti. It was produced by the following commands ``` # Everything in python/ black python/ # Everything with a .py extension fd '.py$' -X black # Everything with a python shebang. git grep -l '#! */usr/bin/env *python' | xargs black ```
* | | rpc: Tweak release_owned to give an error on second removal of "connection".Nick Mathewson2024-10-231-16/+20
| | |
* | | rpc: Use a const for the "connection" object ID.Nick Mathewson2024-10-231-2/+9
| | |
* | | rpc: Simplify method-dispatch-bypass logic a bitNick Mathewson2024-10-235-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the separate function for asking whether to bypass the dispatch code. Instead, it gives the "invoke with bypass" function an error to return when no dispatch is warranted, and moves the whole responsibility for method dispatch or non-dispatch back into tor-rpcbase. I had to add an ObjectId argument to `invoke_rpc_method` to make this work, but that's probably a good thing. Additionally, this commit tweaks the derive-deftly macro to prevent you from asking for dispatch bypass on special methods, where it isn't implemented (and doesn't really make sense).
* | | rpc: Re-run cbindgen.Nick Mathewson2024-10-231-1/+0
| | |
* | | rpc: Add support for dropping the special "connection" object ID.Nick Mathewson2024-10-231-9/+19
| | |
* | | rpc: correct msg and doc for InvalidInput::NullPointerNick Mathewson2024-10-231-2/+2
| | | | | | | | | | | | | | | Previously we implied that it was only for strings, which isn't the case.
* | | rpc: Move "rpc:release" to be a method on the rpc object.Nick Mathewson2024-10-232-33/+25
| | | | | | | | | | | | | | | | | | | | | Now, instead of telling the session or the connection to drop the object ID, we tell the object ID to go away. Closes #1663.
* | | rpcserver: detect and use methods that bypass method dispatch.Nick Mathewson2024-10-231-3/+8
| | |
* | | rpc: do not attempt to dispatch methods with bypassed dispatch.Nick Mathewson2024-10-231-0/+12
| | |
* | | rpc: Add a mechanism for method that bypass regular dispatchNick Mathewson2024-10-231-2/+34
| | | | | | | | | | | | | | | | | | | | | I'm about to use this for rpc:release, which is special because it doesn't actually look at the type of the object that it's invoked on. Later it might be useful for manipulating weakrefs, cloning referenes, detecting reference equality, etc.
* | | rpc: Remove unimplemented rpc:downgrade method for now.Nick Mathewson2024-10-231-9/+0
| | | | | | | | | | | | | | | If and when we implement this, it will likely be different; arti#868 has some thoughts on the implications.
* | | rpc: Move some object-id-manipulation methods to a new module.Nick Mathewson2024-10-233-50/+63
|/ / | | | | | | | | These will have different implementations soon; this is a more logical place for them.
* | linkspec: Fix nightly warning about elided lifetimeNick Mathewson2024-10-221-1/+1
| | | | | | | | | | | | This warning shows up when running `cargo +nightly doc`. Apparently nightly doesn't like it when we have elided a lifetime that has a perfectly good name.
* | Make memquota feature part of full in artiIan Jackson2024-10-222-2/+3
| | | | | | | | Mark it no longer experimental, but part of full. And document it.
* | Make memquota feature part of full in arti-clientIan Jackson2024-10-222-3/+4
| | | | | | | | Mark it no longer experimental, but part of full. And document it.
* | 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
| | | |