Commit Graph

6422 Commits

Author SHA1 Message Date
Nick Mathewson 879a453212 RPC: Move the "listen" part of the RPC listener code to `arti`.
Now there's a module in `arti` that runs the loop for an RPC
listener.  The part of the old `listener` module that made
the framed connections is now part of the `Session` object.

There is now yet another a temporary location for the pipe; we
should pick something better.  At least now it's configurable.
2023-05-04 10:30:40 -04:00
Nick Mathewson 25398b5a3b rpc: Make an RpcMgr type to own the DispatchTable.
In the future, this will probably hold more data as well, like a
TorClient and some configuration info.

The TorClient will present an issue; I've made comments about that.

Closes #820
2023-05-04 10:22:27 -04:00
gabi-250 287a619d99 Merge branch 'connect-parse-hsdesc' into 'main'
hs-client: Use a real HsDesc instead of an unparsed string.

See merge request tpo/core/arti!1153
2023-05-03 16:52:27 +00:00
Gabriela Moldovan f6456d469d
tor-error: Add a TODO regarding HS desc parsing errors.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:36 +01:00
Gabriela Moldovan b168fd36de
hscrypto: Add comment about impl that will be removed after we address #798.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:32 +01:00
Gabriela Moldovan c2cb96a623
Clarify what the new ErrorKinds mean.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:29 +01:00
Gabriela Moldovan 30983c764f
tor-netdir: Update tests to parse the descriptor, make test consensus lifetime configurable.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:25 +01:00
Gabriela Moldovan c6fccbbb01
hsclient: Use a real HsDesc instead of an unparsed string.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:21 +01:00
Gabriela Moldovan 18cb1671c4
hscrypto: Add From impl for deriving KP_hsc_desc_enc out of KS_hsc_desc_enc.
The `HsClientSecretKeys` stored in the HS client connection context only
have the secret keys. Certain APIs (such as `HsDesc::parse`) expect a
keypair (both `HsClientDescEncKey` and `HsClientDescEncSecretKey`). This
`From` impl makes it possible to get a `HsClientDescEncKey` out of
`HsClientDescEncSecretKey`.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:17 +01:00
Nick Mathewson 02a0afbae4 Merge branch 'more_dir_logging' into 'main'
Lots more dirmgr log messages

Closes #803

See merge request tpo/core/arti!1163
2023-05-03 15:39:13 +00:00
Nick Mathewson e845a553f3 Upgrade tracing to 0.1.36.
This is the first version to impl Value for String.

With luck, this will get minimal_versions CI passing.
2023-05-03 11:09:21 -04:00
Nick Mathewson a7612ecdf8 DirMgr: More logs in top-level bootstrapping code.
Closes #803, I hope.
2023-05-03 11:08:19 -04:00
Nick Mathewson 8151fa504f DirMgr: more trace!() logs and information in download/load functions.
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.
2023-05-03 11:08:19 -04:00
Nick Mathewson b2486bba1e DirMgr: Log at trace! when starting a new "AttemptId". 2023-05-03 11:08:19 -04:00
gabi-250 2c2d9e9425 Merge branch 'hsdesc-parse-decrypt-validate' into 'main'
netdoc: Add a convenience method for HS descriptor parsing.

Closes #809

See merge request tpo/core/arti!1152
2023-05-03 14:34:42 +00:00
Nick Mathewson ca74fb448b Merge branch 'api-sketch' into 'main'
Add a sketch for our FFI/RPC architecture

See merge request tpo/core/arti!1005
2023-05-03 14:05:29 +00:00
Nick Mathewson 65d935c8c1 Merge branch 'finalize_release' into 'main'
Final work for releasing 1.1.4

See merge request tpo/core/arti!1168
2023-05-03 13:01:00 +00:00
Nick Mathewson c65b52e552 Remove semver.md files. 2023-05-03 08:33:20 -04:00
Nick Mathewson 1904cfc8b9 Increment crate versions.
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
```
2023-05-03 08:31:11 -04:00
Nick Mathewson 15f4199590 Finalize changelog. 2023-05-03 08:25:25 -04:00
Ian Jackson dc5092601f Merge branch 'more_links_in_readme' into 'main'
Add a couple of links to the top-level README.

See merge request tpo/core/arti!1164
2023-05-03 11:31:02 +00:00
Nick Mathewson bba754f525 Merge branch 'changelog_20230501' into 'main'
Start on a changelog for Wednesday's release of Arti 1.1.4

See merge request tpo/core/arti!1165
2023-05-02 23:56:31 +00:00
Nick Mathewson 7c06df7ed9 changelog: grammar/style fix 2023-05-02 19:32:44 -04:00
Nick Mathewson cb0e74bcdc changelog: add acknowledgements and links. 2023-05-02 19:18:33 -04:00
Nick Mathewson ed93d47338 changelog: get up-to-date with main. 2023-05-02 19:14:47 -04:00
Nick Mathewson 69c9347875 changelog: mention support of --document-private-items 2023-05-02 19:10:20 -04:00
Nick Mathewson af79333bf7 changelog: correct location of SinkPrepareExt. 2023-05-02 19:05:39 -04:00
Alexander Færøy 5ff19678fe Merge branch 'relayid' into 'main'
RelayId: Remove some duplication and relax a lifetime

See merge request tpo/core/arti!1156
2023-05-02 17:55:07 +00:00
Alexander Færøy 6e157a5389 Merge branch 'arti-client-doc-test' into 'main'
arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.

Closes #843

See merge request tpo/core/arti!1166
2023-05-02 17:54:11 +00:00
Gabriela Moldovan dfc22beddf
netdoc: Mark parse_decrypt_validate as experimental.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-02 17:18:53 +01:00
Gabriela Moldovan 6cb412558d
arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.
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 <gabi@torproject.org>
2023-05-02 14:10:15 +01:00
Nick Mathewson ad61d02882 changelog: document one more semver issue. 2023-05-01 14:03:45 -06:00
Nick Mathewson 8b4a4a378e Start on a changelog for Arti 1.1.4 2023-05-01 14:02:02 -06:00
Nick Mathewson 6735040683 Add a couple of links to the top-level README.
Notably, I'm adding a note to the `arti` README, which includes
information on how to build and use the thing.
2023-05-01 11:36:49 -06:00
Nick Mathewson 17028b3934 Merge branch 'update_20230429' into 'main'
Run cargo update again. (Tracing 0.1.38 has been yanked)

See merge request tpo/core/arti!1162
2023-04-29 14:46:15 +00:00
Nick Mathewson 9ecc237c18 Run cargo update again. (Tracing 0.1.38 has been yanked) 2023-04-29 08:10:34 -06:00
Nick Mathewson 8a02d5b028 Merge branch 'update_20230428' into 'main'
Run cargo update in preparation for release next week

See merge request tpo/core/arti!1161
2023-04-28 21:34:58 +00:00
Nick Mathewson 6d28469ba1 Run cargo update in preparation for release next week 2023-04-28 15:09:03 -06:00
Nick Mathewson c716cb017d Merge branch 'serial_test_upgrade' into 'main'
Upgrade to serial_test 2.0.0

See merge request tpo/core/arti!1159
2023-04-28 16:57:44 +00:00
Nick Mathewson 56b99075f6 Upgrade to serial_test 2.0.0 2023-04-28 10:35:54 -06:00
Ian Jackson c0aa600179 RelayId: implement id_type and as_bytes in terms of RelayIdRef
This eliminates some duplicated code.
2023-04-27 20:39:03 +01:00
Ian Jackson 58a0803667 RelayIdRef: as_bytes: Doesn't borrow from self
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.
2023-04-27 20:39:03 +01:00
Ian Jackson 4b03795915 RelayId: impl Display in terms of RelayIdRef
This removes a duplicated copy of the format strings.
2023-04-27 20:37:36 +01:00
gabi-250 f9358183e0 Merge branch 'key-mgmt-api-sketch' into 'main'
dev docs: Add key manager API sketch.

Closes #834

See merge request tpo/core/arti!1147
2023-04-25 18:22:50 +00:00
Gabriela Moldovan 17ff3a6f6a
dev docs: Add a few lines about handling concurrent access.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:25 +01:00
Gabriela Moldovan 5407e599ab
dev docs: Fill out insert/remove APIs.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:20 +01:00
Gabriela Moldovan 67061688a6
dev docs: Remove incoherent waffle.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:16 +01:00
Gabriela Moldovan a5ff3191e9
dev docs: Update KeyMgr implementation based on latest discussions.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:11 +01:00
Gabriela Moldovan 3202aa33c5
dev docs: Remove unnecessary trait bounds.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:05 +01:00
Gabriela Moldovan 6c6e03ec4a
dev docs: Remove outdated reference to the comment field.
We decided against using it.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:00 +01:00