Commit Graph

4845 Commits

Author SHA1 Message Date
Ian Jackson e23b1e00b5 tor-rtmock: MockExecutor: Configurable scheduling policy 2023-07-06 15:14:40 +01:00
Ian Jackson be632ba0f9 tor-rtmock: Provide MockRuntime 2023-07-06 15:14:40 +01:00
Ian Jackson 67941488ab tor-rtmock: Unit tests for MockExecutor 2023-07-06 15:14:40 +01:00
Ian Jackson d82ed8d793 tor-rtmock: Provide MockExecutor 2023-07-06 15:14:40 +01:00
Ian Jackson 70fdd92030 tor-rtmock: impl Default for MockNetProvider 2023-07-06 15:14:40 +01:00
Ian Jackson 24da490ef5 tor-rtmock: impl Default for MockNetProvider (prep)
We want MockNetProvider to be Default.

In this commit: impl Default for MockNetwork and use it in new().
2023-07-06 15:14:40 +01:00
Ian Jackson 29cc83b35e tor-rtmock: impl Default for MockSleepProvider
Pick an arbitrary start time roughly now.  This will do for many
tests.
2023-07-06 15:14:40 +01:00
Ian Jackson 395a616c9f tor-rtmock: net: "Provide" a UDP "implementation" which doesn't work
Nothing in our tree actually *uses* the UDP in tests.

We want a mock UDP provider that isn't part of a real runtime, so that
we can make a totally-mock runtime for properly controlled testing.

It seems best to make this part of MockNetProvider rather than a
separate type.
2023-07-06 15:14:40 +01:00
Ian Jackson 070a934451 tor-rtmock: Introduce impl_runtime_prelude (fmt) 2023-07-06 15:14:40 +01:00
Ian Jackson 492699d522 tor-rtmock: Introduce impl_runtime_prelude
This deduplicates some imports, which would otherwise be about to
become triplicated.
2023-07-06 15:14:40 +01:00
Ian Jackson 97e817b330 tor-rtmock: Introduce impl_runtime! macro
This deduplicates some trait delegation.

We want this now because we're about to introduce a third mock
runtime, so this would become triplication otherwise.
2023-07-06 15:14:40 +01:00
Nick Mathewson 5f896aa504 Merge branch 'tracing-panic' into 'main'
arti: Install a panic hook that sends messages to `tracing`

Closes #921

See merge request tpo/core/arti!1377
2023-07-06 13:09:54 +00:00
Nick Mathewson d2b6fee3f9 arti: Note possibility for future use of other tracing panic provider 2023-07-06 08:50:53 -04:00
Nick Mathewson 01f1192b20 arti: On panic, avoid allocation even more.
The original version of our panic handler would allocate a string
for the panic `Location`.  But if we're panicking we'd like to keep
allocations to a minimum: so instead format the `Location`
conditionally.

This also drops a useless `std::borrow::Cow`.  (The possibility of a
"Don't have a `Cow`" commit message was considered and rejected.)
2023-07-06 08:45:34 -04:00
Gabriela Moldovan 258dd195e0 keymgr: Explain why the TODO regarding EncodableKey can't be addressed. 2023-07-05 22:21:47 +01:00
Nick Mathewson afa51fd5ca Add TODO comments about possibly migrating away from the backtrace crate. 2023-07-05 16:39:11 -04:00
Nick Mathewson 9c4de185e9 arti: Install a panic hook that sends messages to `tracing`
(Also leaves installed the default handler that sends messages to
stderr.)

Closes #921.
2023-07-05 16:37:10 -04:00
Ian Jackson 0003a632de Merge branch 'unpublishing' into 'main'
Mark several crates with `publish=false`.

Closes #944

See merge request tpo/core/arti!1371
2023-07-05 16:49:41 +00:00
Nick Mathewson 517bf1cf03 Mark arti-bench with "publish = false"
This crate is only useful for development; earlier we published it,
but I believe that was in error.
2023-07-03 13:52:20 -04:00
Nick Mathewson 2c5b81e872 Mark vestigial crates as "publish=false"
These crates were started, but they aren't integrated into
Arti (yet?).  As such it doesn't make sense to keep publishing
updated versions of them every time we tweak our standard
lints.
2023-07-03 13:49:51 -04:00
Nick Mathewson 19b1d3bba5 Additional documentation around bridges/PT configuration
This tries to flesh out some of the details for users who may be new
to bridges and PTs.

Closes #706.
2023-07-03 13:00:25 -04:00
Nick Mathewson f626bcd7f1 Finish a sentence in the documentation for TorClient::netdir() 2023-07-03 12:35:31 -04:00
Nick Mathewson 27bd990a79 Remove semver.md files for 1.1.6 2023-06-30 10:28:53 -04:00
Gabriela Moldovan 3afe810a3b keymgr: Fix broken doc link. 2023-06-30 14:41:33 +01:00
Nick Mathewson de13a7319b Bump patchlevel versions on crates with smaller changes
Done with the commands below.

The following crates have had various changes, and should get a
patchlevel bump. Since they are pre-1.0, we do not need to
distinguish new APIs from other changes.

```
cargo set-version --bump patch -p arti-client
cargo set-version --bump patch -p safelog
cargo set-version --bump patch -p tor-bytes
cargo set-version --bump patch -p tor-cert
cargo set-version --bump patch -p tor-circmgr
cargo set-version --bump patch -p tor-config
cargo set-version --bump patch -p tor-consdiff
cargo set-version --bump patch -p tor-dirclient
cargo set-version --bump patch -p tor-dirmgr
cargo set-version --bump patch -p tor-error
cargo set-version --bump patch -p tor-hsservice
cargo set-version --bump patch -p tor-linkspec
cargo set-version --bump patch -p tor-llcrypto
cargo set-version --bump patch -p tor-netdir
cargo set-version --bump patch -p tor-netdoc
cargo set-version --bump patch -p tor-proto
cargo set-version --bump patch -p tor-rpcbase
cargo set-version --bump patch -p tor-socksproto
```

This crate has new features, but no new non-experimental Rust APIs.
So even though it is post-1.0, it gets a patchlevel bump.

```
cargo set-version --bump patch -p arti
```
2023-06-30 08:42:21 -04:00
Nick Mathewson 65e81bf0ca Bump minor versions on crates with breaking changes
Done with:
```
cargo set-version --bump minor -p tor-hsclient
cargo set-version --bump minor -p arti-rpcserver
cargo set-version --bump minor -p tor-hscrypto
cargo set-version --bump minor -p tor-cell
```
2023-06-30 08:38:16 -04:00
Nick Mathewson 40768a9f61 Bump versions on crates with nonfunctional changes
These crates have had nonfunctional changes only, mostly due to !1271,
or ac90cb7500, or documentation changes: crates that depend on
them do not require a version bump.

```
arti-bench
arti-config
arti-hyper
arti-testing
caret
fs-mistrust
retry-error
tor-async-utils
tor-basic-utils
tor-chanmgr
tor-checkable
tor-congestion
tor-consdiff
tor-events
tor-guardmgr
tor-persist
tor-protover
tor-ptmgr
tor-rtcompat
tor-rtmock
tor-units
```
2023-06-30 08:30:55 -04:00
gabi-250 8c1e96a22c Merge branch 'arti-path-bug' into 'main'
keymgr: Allow periods in ArtiPath and ArtiPathComponent.

See merge request tpo/core/arti!1358
2023-06-30 11:30:45 +00:00
Gabriela Moldovan a61071f7b6 keystore: Change the dummy HsClientSpecifier to "default". 2023-06-30 11:49:07 +01:00
Gabriela Moldovan 35e063702f keymgr: Update ArtiPath and ArtiPathComponent docs.
The docs were lying, we actually support UTF-8 paths (though we might
later decide to restrict the charset further).
2023-06-30 11:49:05 +01:00
Gabriela Moldovan 474f273b6c keymgr: Allow periods in ArtiPath and ArtiPathComponent.
The `ArtiPath` of a client auth key contains the `HsId` of the onion
Since the `HsId` contains a `.onion` component, let's allow `.` for now.
In the future, we may want to update the code (and keystore structure)
to strip away the `.onion` part before building the `ArtiPath`.
2023-06-30 11:48:27 +01:00
Ian Jackson 5d99725c65 Merge branch 'keymgr-docs' into 'main'
keymgr: Downgrade "TODO hs" to "TODO HSS"

See merge request tpo/core/arti!1360
2023-06-30 10:48:25 +00:00
Ian Jackson 88527d14c8 Merge branch 'fix-unfortunate-merge-outcome' into 'main'
arti-client: Rename KeyStore to Keystore.

See merge request tpo/core/arti!1359
2023-06-30 10:41:58 +00:00
Ian Jackson a7334f86ae Merge branch 'docsrs-fix' into 'main'
Add a missing "experimental-api" rustdoc notation

See merge request tpo/core/arti!1353
2023-06-30 10:41:12 +00:00
Ian Jackson f177a5bde4 Merge branch 'fixup-features' into 'main'
Run fixup-features on current `main`

See merge request tpo/core/arti!1352
2023-06-30 10:38:53 +00:00
Gabriela Moldovan 90183368a2 keymgr: Downgrade "TODO hs" to "TODO HSS"
This TODO doesn't need to block the release.
2023-06-30 11:16:28 +01:00
Gabriela Moldovan e899c41135 arti-client: Rename KeyStore to Keystore.
`KeyStore` was renamed to `Keystore` globally in !1355. This fixes a
compile error caused an unfortunate series of non-conflicting (from
git's POV) but incompatible merges:

* !1356 added a line threferencing an error variant that capitalizes the
  "s" in "KeyStore" (`ErrorDetail::KeyStore`)
* !1356 landed just before !1355 (the global renaming). Since there was
  no conflict between the 2, we're now in a state where the code added
  in !1356 is referencing an `ErrorDetail` variant that no longer
  exists.
2023-06-30 11:01:58 +01:00
Alexander Færøy 60f6fe7460 Merge branch 'keymgr-naming' into 'main'
keymgr: Rename KeyStore to Keystore globally.

See merge request tpo/core/arti!1355
2023-06-30 00:11:17 +00:00
Gabriela Moldovan 458af6e007 keymgr: Fix another infinite loop around Keymgr error handling.
This `From` impl was just calling itself recursively...
2023-06-29 23:30:28 +01:00
Gabriela Moldovan 36606a66dd keymgr: Rename KeyStore to Keystore globally.
We've been capitalizing the "s" in "KeyStore" inconsistently. This
`s/KeyStore/Keystore/g` across the codebase.
2023-06-29 22:46:15 +01:00
Nick Mathewson 8fe79b5a1d Add a missing "experimental-api" rustdoc notation 2023-06-29 17:18:23 -04:00
Nick Mathewson a88fa71f25 Resolve XXXs from fixup-features.
Some of these seem spurious: it looks like fixup-features resolved
an issue and then complained about it too.  I'll investigate further.
2023-06-29 17:14:00 -04:00
Nick Mathewson f8ee830a94 Run "cargo sort". 2023-06-29 17:10:27 -04:00
Nick Mathewson 23c67d92e6 Run "fixup-features". 2023-06-29 17:09:52 -04:00
Nick Mathewson 6e2b48c6b9 Merge branch 'rustdoc_fix' into 'main'
Fix a rustdoc link.

See merge request tpo/core/arti!1351
2023-06-29 20:53:41 +00:00
Ian Jackson 3c85863aa1 Merge branch 'exp' into 'main'
tor-error: Make KeystoreFsPermissions experimental for now

See merge request tpo/core/arti!1350
2023-06-29 19:55:06 +00:00
Ian Jackson 9ef65775c9 Merge branch 'validate-client-spec' into 'main'
keymgr: Validate ArtiPaths, replace HsClientSpecifier with generic ArtiPathComponent

See merge request tpo/core/arti!1262
2023-06-29 19:49:30 +00:00
gabi-250 09cb5eed4e Merge branch 'keymgr-config' into 'main'
arti-client: Add keystore_dir to StorageConfig.

See merge request tpo/core/arti!1312
2023-06-29 19:30:41 +00:00
Ian Jackson e299c2b4f7 Merge branch 'keymgr' into 'main'
tor-keymgr: Adjust stability guarantees for release

Closes #934

See merge request tpo/core/arti!1346
2023-06-29 19:27:14 +00:00
Ian Jackson 16a00846bd Run rustfmt 2023-06-29 19:59:26 +01:00