aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * DirMgr: more trace!() logs and information in download/load functions.Nick Mathewson2023-05-031-8/+30
| | | | | | | | | | | | | | My goal here is to make sure that we can't confuse one download operation and another, and that we actually know what's going on. Previously, not all state transitions or attempts to fetch information actually corresponded to a log.
| * DirMgr: Log at trace! when starting a new "AttemptId".Nick Mathewson2023-05-031-1/+7
| |
* | Merge branch 'hsdesc-parse-decrypt-validate' into 'main'gabi-2502023-05-032-1/+75
|\ \ | |/ |/| | | | | | | | | netdoc: Add a convenience method for HS descriptor parsing. Closes #809 See merge request tpo/core/arti!1152
| * netdoc: Mark parse_decrypt_validate as experimental.Gabriela Moldovan2023-05-022-0/+6
| | | | | | | | Signed-off-by: Gabriela Moldovan <[email protected]>
| * netdoc: Document how to extract an `HsDesc` out of an ↵Gabriela Moldovan2023-04-251-0/+32
| | | | | | | | | | | | | | | | | | `UncheckedEncryptedHsDesc`. This adds an example to the `HsDesc::parse` docs. The constants from the example are lifted from the `parse_desc_good` test. Signed-off-by: Gabriela Moldovan <[email protected]>
| * netdoc: Add a convenience method for HS descriptor parsing.Gabriela Moldovan2023-04-252-1/+37
| | | | | | | | | | | | | | | | | | This adds the `HsDesc::parse_decrypt_validate` method, which parses, decrypts, and validates HS descriptors. Closes #809 Signed-off-by: Gabriela Moldovan <[email protected]>
* | Remove semver.md files.Nick Mathewson2023-05-033-3/+0
| |
* | Increment crate versions.Nick Mathewson2023-05-0343-298/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* | Merge branch 'relayid' into 'main'Alexander Færøy2023-05-022-12/+13
|\ \ | | | | | | | | | | | | RelayId: Remove some duplication and relax a lifetime See merge request tpo/core/arti!1156
| * | RelayId: implement id_type and as_bytes in terms of RelayIdRefIan Jackson2023-04-271-8/+2
| | | | | | | | | | | | This eliminates some duplicated code.
| * | RelayIdRef: as_bytes: Doesn't borrow from selfIan Jackson2023-04-272-1/+2
| | | | | | | | | | | | | | | | | | | | | This borrows from the contained key, but not from self. This will allow us to implement RelayId::as_bytes in terms of RelayIdRef::as_bytes.
| * | RelayId: impl Display in terms of RelayIdRefIan Jackson2023-04-271-3/+9
| |/ | | | | | | This removes a duplicated copy of the format strings.
* | arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.Gabriela Moldovan2023-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the tests run as part of `cargo test -p arti-client` fails because the `pt-client` feature is not enabled by default: ``` failures: ---- src/config.rs - config::BridgesConfig (line 221) stdout ---- error[E0432]: unresolved import `arti_client::config::pt` --> src/config.rs:225:26 | 7 | use arti_client::config::pt::ManagedTransportConfigBuilder; | ^^ could not find `pt` in `config` error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:233:19 | 15 | builder.bridges().bridges().push(bridge_1); | ^^^^^^^ private field, not a method error[E0599]: no function or associated item named `default` found for struct `BridgeConfigBuilder` in the current scope --> src/config.rs:236:48 | 18 | let mut bridge2_builder = BridgeConfigBuilder::default(); | ^^^^^^^ function or associated item not found in `BridgeConfigBuilder` error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:247:19 | 29 | builder.bridges().bridges().push(bridge2_builder); | ^^^^^^^ private field, not a method error[E0599]: no method named `transports` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:255:19 | 37 | builder.bridges().transports().push(transport); | ^^^^^^^^^^ method not found in `&mut BridgesConfigBuilder` error: aborting due to 5 previous errors Some errors have detailed explanations: E0432, E0599. For more information about an error, try `rustc --explain E0432`. Couldn't compile the test. failures: src/config.rs - config::BridgesConfig (line 221) test result: FAILED. 5 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 2.10s ``` This disables the `BridgesConfig` doc test if the `pt-client` feature is not enabled. Closes #843 Signed-off-by: Gabriela Moldovan <[email protected]>
* | Upgrade to serial_test 2.0.0Nick Mathewson2023-04-281-1/+1
|/
* Bump our own memchr dependency to 2.5Nick Mathewson2023-04-221-1/+1
| | | | | This appears to be necessary for getting "minimal-versions" to be happy with memchr dependencies between reges and async-compression.
* RPC: Log all internal errors.Nick Mathewson2023-04-192-4/+13
|
* rpc: Simplify and clarify SendUpdateError.Nick Mathewson2023-04-191-7/+13
|
* Arti: Add ability to remember the list of methods names.Nick Mathewson2023-04-195-14/+56
| | | | | | | | | | | | Right now, this lets us say whether the method was unrecognized or whether the parameter type was incorrect. We'll use this to enforce correct method names later on. (I have to add another `inventory` here, since the `typetag` maintainer does not want to expose this functionality: see https://github.com/dtolnay/typetag/issues/57#issuecomment-1506106290 )
* rpc: New syntax for method declarationNick Mathewson2023-04-191-9/+46
| | | | | Now you just declare your function `my_func` with the right types, and invoke `rpc_invoke_fn!{ my_func(ObjType, MethodType); }`
* rpc: impl From<SendUpdateError> for RpcError.Nick Mathewson2023-04-191-0/+14
|
* rpcserver: Use with_fn.Nick Mathewson2023-04-192-12/+8
|
* rpcbase: Use with_fn.Nick Mathewson2023-04-193-8/+14
|
* async-utils: Add a SinkExt with a with_fnNick Mathewson2023-04-192-0/+85
| | | | | (This function behaves as `futures::sink::SinkExt::with`, except that the function that it takes does not return a future.)
* async-utils: rename sinkext to prepare_sendNick Mathewson2023-04-192-2/+2
|
* async-utils: rename SinkExt to SinkPrepareExtNick Mathewson2023-04-194-13/+14
|
* rpc: Minor tweaks to get a sink to compile.Nick Mathewson2023-04-191-4/+5
|
* rpc: Use Method types to determine type of method outputs, updates.Nick Mathewson2023-04-192-81/+142
| | | | This lets us do much less in our rpc_invoke_fn functions.
* rpc: Split Method into DynMethod and MethodNick Mathewson2023-04-195-42/+86
| | | | | Now `Method` has an Output and Update associated type, and `decl_method` can do a little more.
* Merge branch 'post_1145' into 'main'Alexander Færøy2023-04-182-8/+18
|\ | | | | | | | | Followups from !1145 See merge request tpo/core/arti!1146
| * netdoc: Document that particular bit values for flags are not part of our API.Nick Mathewson2023-04-171-1/+3
| |
| * netstatus: re-number routerstatus flags to go in order.Nick Mathewson2023-04-171-7/+7
| | | | | | | | | | | | | | | | Otherwise there is too much risk of accidentally adding in another 1<<12 when we meant to add a 1<<13. (It would be neat to have an alternative to bitflags here that would auto-number our bitflags for us.)
| * netdir: more documentation on MIDDLE_ONLY flag.Nick Mathewson2023-04-172-0/+8
| | | | | | | | Clarify that it isn't anything that most users will need to check.
* | Merge branch 'rpc_refactoring_v2' into 'main'Ian Jackson2023-04-183-195/+150
|\ \ | | | | | | | | | | | | | | | | | | A few RPC refactorings Closes #817 and #824 See merge request tpo/core/arti!1144
| * | rpc: simplify API by always providing a sink.Nick Mathewson2023-04-162-26/+18
| | | | | | | | | | | | | | | Previously we have two places where we had to do "make a `Drain` sink if updates aren't wanted"; now there's only one.
| * | rpc: Ensure well-ordering of responses.Nick Mathewson2023-04-161-60/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the main loop received updates via a `mpsc::channel`, and final responses via a `futures::unordered`. This could lead to final responses being transmitted to the user before the updates were all flushed. Now all of the responses are sent to the main loop via the same channel, and they can't get out-of-sequence. Closes #817 and (IMO) simplifies the code a bit.
| * | rpc: Wire updates into rpc invoke functions again.Nick Mathewson2023-04-161-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | Now that the sink is not part of the context, RPC functions that are able to send an update have to declare an `impl Sink` as their fourth argument. This syntax is not final. Part of #824.
| * | rpc: Move update sink out of context.Nick Mathewson2023-04-163-147/+51
| | | | | | | | | | | | | | | Now the update sink is its own boxed object. It is not yet passed to the invoke functions that want it.
* | | Merge branch 'fix_802_core' into 'main'Ian Jackson2023-04-181-1/+6
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | DirMgr: Detect that directory state is ready if it begins with all MDs Closes #802 See merge request tpo/core/arti!1126
| * | DirMgr: Detect that directory state is ready if it begins with all MDsNick Mathewson2023-04-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we'd only call PendingNetDir::upgrade_if_necesessary when adding a microdescriptor. But if it began already having all of its descriptors (because we found them in the cache), we wouldn't actually upgrade it to a PendingNetDir::Yielding, which would make it unusable, and would make us schedule its reset time too far in the future. Fixes #802.
* | | netdoc: Add MiddleOnly flag to RelayFlagsjuga2023-04-172-0/+8
| | | | | | | | | | | | Closes #833
* | | rpcserver: Fix a couple of broken rustdoc linksNick Mathewson2023-04-162-3/+5
| |/ |/|
* | Merge branch 'use_secmem_proc_03' into 'main'gabi-2502023-04-132-2/+2
|\ \ | | | | | | | | | | | | | | | | | | Update our secmem_proc dependency to 0.3.0 Closes #664 See merge request tpo/core/arti!1138
| * | Update our secmem_proc dependency to 0.3.0Nick Mathewson2023-04-132-2/+2
| | | | | | | | | | | | | | | | | | (This wasn't possible before we updated our MSRV to 1.65.) Closes #664.
* | | Merge branch 'misc_upgrades' into 'main'gabi-2502023-04-1313-15/+15
|\ \ \ | | | | | | | | | | | | | | | | Upgrade a couple more dependencies See merge request tpo/core/arti!1139
| * | | Upgrade our hex-literal dependencyNick Mathewson2023-04-1312-13/+13
| | | |
| * | | Upgrade our num_enum dependency.Nick Mathewson2023-04-132-2/+2
| |/ /
* | | Merge branch 'rpc_conformance' into 'main'Nick Mathewson2023-04-1315-159/+665
|\ \ \ | |/ / |/| | | | | | | | | | | | | | RPC: Terminology and error-handling conformance Closes #826 and #825 See merge request tpo/core/arti!1136
| * | rpc, spec: Document current ObjectError, RequestError behavior as correct.Nick Mathewson2023-04-131-10/+2
| | |
| * | rpc: Change `id=<SYNTAX>` to "no id".Nick Mathewson2023-04-133-14/+32
| | | | | | | | | | | | | | | | | | | | | Now instead of hoping that buggy clients will detect a magic `id`, we can simply tell them that they will get no `id` at all. If they can't handle that case, no major harm is done: the connection will get closed anyway.
| * | rpc: Require that errors are RpcError.Nick Mathewson2023-04-133-7/+22
| | | | | | | | | | | | | | | | | | Since we're serializing everything in this format, let's enforce it. With this change, we can no longer cram arbitrary junk into an RPC error, so we have to clean up our handling of cancelled requests.