aboutsummaryrefslogtreecommitdiff
path: root/Cargo.lock
Commit message (Collapse)AuthorAgeFilesLines
...
* proto: methods to wait until a channel/circuit is shut down.Nick Mathewson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | The implementation here is perhaps excessively simple: we put a `oneshot::Sender` in the `Reactor` object, and a `Shared<oneshot::Receiver>` in the circuit or channel. When the reactor is dropped, any copy of the `Shared<Receiver>` will yield `Err(Cancelled)`. I'm marking these methods as experimental because I'm not sure I've thought of all the implications here, and we might want to change things around. Down the road, these methods might want to yield a `Result<>` indicating why the reactor was shut down. This feature was inspired by a request from Saksham Mittal, and a felt need while working on !1472.
* Merge branch 'ticket889_fuzz' into 'main'Nick Mathewson2023-08-021-0/+1
|\ | | | | | | | | Fuzzers for Equi-X and HashX See merge request tpo/core/arti!1459
| * equix/fuzz: Fixes to get nick's prototype runningMicah Elizabeth Scott2023-08-011-0/+1
| | | | | | | | | | | | | | | | | | There are some places we might improve this, maybe testing more data types and shapes. This patch just makes the minimal changes necessary to get it working: adds allocation logic to the fuzzer itself, and adds visibility for the bucket_array::mem interface. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* | equix, hashx: Benchmark against C implementationMicah Elizabeth Scott2023-08-011-255/+20
|/ | | | | | | | | | | | | | | | | | | | | This is a small batch of improvements for the equix and hashx benchmarks. The headline feature is that we are now including the C implementations (slightly modified from tevador's, hosted as part of c-tor) and using them in apples-to-apples comparisons. Minor features: - Benchmarks moved to new nested crates, preventing their dependencies from spilling into the main workspace build. - Tests are now grouped - We also test the performance of memory reuse where possible - Code cleanup for per-runtime options These benchmark builds will now automatically pull in the c-tor git repo and build portions of it with a Rust wrapper. This uses the 'cc' and 'bindgen' crates, so it requires a C compiler and libclang on the host system. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* Upgrade to sanitize-filename 0.5.0Nick Mathewson2023-08-011-2/+2
|
* Merge branch 'hss_apis' into 'main'Nick Mathewson2023-08-011-0/+3
|\ | | | | | | | | | | | | hsservice: Initial data structures and APIs Closes #972, #971, and #970 See merge request tpo/core/arti!1452
| * hsservice: Adapt API sketches from onion-service-notes.mdNick Mathewson2023-07-311-0/+1
| |
| * hsservice: Adapt data structures from onion-service-notes.mdNick Mathewson2023-07-311-0/+2
| | | | | | | | | | | | | | Also, removed some older structures that don't make sense in the current design. Closes #970
* | Add error if [[bridges.transports]] isn't written in config fileSaksham Mittal2023-08-011-0/+2
| |
* | Bump patchlevel versions of crates with trivial changesNick Mathewson2023-08-011-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had trivial changes only: typically, changes to documentation or to clippy warnings. There's no good reason to update which version of them other crates depend on, so we only bump _their_ patchlevels. ``` tor-async-utils caret safelog tor-events tor-units tor-rtcompat tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-cert tor-cell tor-consdiff tor-congestion arti-rpcserver arti-testing arti-bench arti-config arti-hyper ```
* | Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
* | Update minor versions on crates that have had breaking changesNick Mathewson2023-08-011-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates had first-order breaking changes: ``` retry-error tor-keymgr tor-proto tor-hsclient tor-rtmock ``` Additionally, these broke because they re-exposed RetryError: ``` tor-circmgr ``` Additionally, these broke because they may re-expose something from tor-proto: ``` arti-client tor-chanmgr tor-dirclient tor-dirmgr tor-guardmgr ``` Additionally, these broke for other fiddly reasons: `tor-ptmgr` implements traits from tor-chanmgr, which has a breaking change above. `arti-hyper` exposes types from arti-client in its API.
* | Run cargo update in preparation for a release.Nick Mathewson2023-08-011-258/+238
|/
* hashx: use RngCore for HashX's internal PRNGMicah Elizabeth Scott2023-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | This refactors the random number generator used within HashX's program generator so that it uses the rand::RngCore trait. The basic SipHash powered u64 generator now implements RngCore, while a buffer layer wraps this and provides u8 and u32 values as needed by the generator. Some of this new RngCore layer is now exposed to the hashx crate's public API. The intent is to allow external code to test, benchmark, or fuzz the program generator by supplying its own random number stream. Benchmarks show a small but confusing performance improvement associated with this patch. About a 2% improvement in generation. This could be due to the Rng changes. No change in compiled hash execution performance. Even though this patch only touches program generation, benchmarks show a 4% speedup in interpreted execution. This seems most likely explained by instruction cache effects, but I'm not sure. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* Start implementing Proposal 327Micah Elizabeth Scott2023-07-271-0/+14
| | | | | | | | | | | | | This adds a new tor-hspow crate with the first layers of support in place for onion service client puzzles as described in Proposal 327. The API here is experimental, and it's currently only implementing the self-contained parts of the client puzzle. So, it can verify and solve puzzles, but it has no event loop integration or nonce replay tracking or prioritization code yet. These things seem like they would eventually live in the same crate. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* Reimplement Equi-X in RustMicah Elizabeth Scott2023-07-271-0/+20
| | | | | | | | | | | This is a new pure Rust implementation of the Equi-X algorithm designed by tevador for Tor's onion service proof of work puzzle v1. Equi-X is an asymmetric puzzle algorithm based on Equihash, with N=60, K=3, the XOR replaced with modular addition, a 16-bit index space, and HashX as the inner hash function. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* Reimplement HashX in RustMicah Elizabeth Scott2023-07-271-26/+365
| | | | | | | | | | | | | | | | | This is a new pure Rust implementation of the HashX algorithm designed by tevador for Tor's onion service proof of work puzzle v1. HashX is a lightweight family of randomly generated hash functions. A seed, via blake2 and siphash, drives a program generation model which randomly selects opcodes and registers while following some constraints that avoid timing stalls or insufficient hash mixing. The execution of these hash funcions can be done using a pure Rust interpreter, or about 20x faster using a very simple just in time compiler based on the dynasm assembler crate. This has been implemented for x86_64 and aarch64. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* keymgr: Add KeyMgr::generate() for generating new keys.Gabriela Moldovan2023-07-241-0/+1
|
* keymgr: Add function for generating EncodableKeys.Gabriela Moldovan2023-07-241-0/+1
|
* Merge branch 'pwd-grp' into 'main'Nick Mathewson2023-07-201-32/+5
|\ | | | | | | | | Update pwd-grp to 0.1.1 to fix MacOS build etc. See merge request tpo/core/arti!1427
| * Update pwd-grp to 0.1.1 to fix MacOS build etc.Ian Jackson2023-07-201-32/+5
| | | | | | | | This also gets rid of a duplicate copy of derive-adhoc.
* | Bump requirement to rlimit 0.10.1Nick Mathewson2023-07-201-2/+2
| | | | | | | | | | | | There was a bug in 0.10.0 that broke MacOS. Part of #963.
* | retry-error: Introduce a Wrapper type in a testIan Jackson2023-07-191-0/+1
| | | | | | | | | | We're going to require that a RetryError contains things that are AsRef<dyn Error> and ParseIntError isn't so we need a newtype.
* | retry-error: Provide fmt_error_with_sources in retry-errorIan Jackson2023-07-191-0/+2
|/ | | | | This code came from tor-error. So now tor-error depends on retry-error.
* Update Cargo.lock for d-a versionsIan Jackson2023-07-181-3/+30
| | | | | | | | | | | | | | | | !1410 and !1412 had a semantic conflict *in the Cargo lockfile*! !1410 added a new indirect dependency on derive-adhoc, which is used in pwd-grp. pwd-grp is still declaring a dependency on d-a 0.6.1. (This ought to be updated there in due course, but isn't a bug.) !1412 updated our direct dependency on derive-adhoc to require 0.7.x. In fact, the breaking change 0.6.x to 0.7.x is minor and we could have written a more relaxed dependency.But cargo's syntax for that is very clumsy - here is an example from derive-adhoc iteself: itertools = ">=0.10.1, <0.12" Fix this for now in our tree with a `cargo update`, to unbreak main.
* Merge branch 'upgrades_20230717' into 'main'Alexander Færøy2023-07-171-31/+22
|\ | | | | | | | | Mid-month dependency upgrades See merge request tpo/core/arti!1412
| * Upgrade to latest derive-adhoc.Nick Mathewson2023-07-171-4/+4
| |
| * Upgrade to latest rlimit.Nick Mathewson2023-07-171-27/+18
| |
| * keymgr: Upgrade to latest itertools.Nick Mathewson2023-07-171-1/+1
| | | | | | | | (Everything else is already on 0.11.0.)
* | Merge branch 'pwd-grp' into 'main'gabi-2502023-07-171-11/+13
|\ \ | |/ |/| | | | | | | | | Replace use of unmaintained users crate with homegrown pwd-grp Closes #877 See merge request tpo/core/arti!1410
| * fs-mistruct: switch from users to pwd-grpIan Jackson2023-07-141-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | users is unmaintained. pwd-grp is the crate I have just written to replace it. In this commit: Change the cargo dependency and imports. Replace the cacheing arrangements. users has a built-in cache; pwd-grp doesn't. Now, instead of cashing individual lookups, we cache the trusted user and trusted gid calculation results. This saves on some syscalls, and is also more convenient to write. (Mocking is still done via the dependency.) Many systematic consequential changes of details: * The entrypoint names to the library are different: pwd-grp uses the names of the corresponding Unix functions. * pwd-grp's returned structs are transparent, so we don't call accessors for .uid(), .name(), etc. * pwd-grp's methods are much more often fallible (returning io::Result<Option<...>) * We're using the non-UTF-8 pwd-grp API, which means we must use turbofish syntax in some places. * The mocking API is a bit different.
* | Merge branch 'keymgr-config-tweaks' into 'main'gabi-2502023-07-171-0/+3
|\ \ | |/ |/| | | | | | | | | tor-keymgr config updates Closes #939 See merge request tpo/core/arti!1404
| * tor-keymgr: Add ArtiNativeKeystoreConfig.Gabriela Moldovan2023-07-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the keystore config consisted of a single field in `StorageConfig`, which encoded 2 bits of information: whether the keystore is enabled, and its root directory: ``` [storage] # use this path, fail if compiled out # keystore = "/path/to/arti/keystore" # # use default path, fail if compiled out # keystore = true # # disable # keystore = false ``` This commit adds `ArtiNativeKeystoreConfig`, which will replace the multi-purpose `keystore` field. The new config will look like this: ``` #[storage.keystore] # Whether the keystore is enabled. # # If the `keymgr` feature is enabled and this option is: # * set to false, we will ignore the configured keystore path. # * set to "auto", the configured keystore, or the default keystore, if the # keystore path is not specified, will be used # * set to true, the configured keystore, or the default keystore, if the # keystore path is not specified, will be used # # If the `keymgr` feature is disabled and this option is: # * set to false, we will ignore the configured keystore path. # * set to "auto", we will ignore the configured keystore path. # # Setting this option to true when the `keymgr` feature is disabled is a # configuration error. #enabled = "auto" # The root directory of the arti keystore #path = "${ARTI_LOCAL_DATA}/keystore" ``` While `ArtiNativeKeystoreConfig` currently only has 2 fields, `enabled` and `path`, future versions of the keystore might require additional config options.
* | Add country codes to relays inside a NetDireta2023-07-131-0/+1
|/ | | | | | | | | | | | - When the `geoip` feature flag of `tor-netdir` is enabled, perform GeoIP lookups for all relays added to the directory and add the resulting country code to the `Relay` struct. - The GeoIP database is provided in a new `PartialNetDir::new_with_geoip` constructor. - A new trait was also added to `tor-linkspec`, `HasCountryCode`, to enable getting this data out from other crates. Part of onionmasq#47.
* rng ranges: Use gen_range_infallible() for Duration::ZERO..=TIan Jackson2023-07-101-0/+1
|
* keymgr: Use Box<dyn EncodableKey> instead of Box<dyn Any>.Gabriela Moldovan2023-07-101-0/+1
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1337#note_2917701 This will make it harder to accidentally return the wrong value from `Keystore::get` (the returned value is now at least guaranteed to implement `EncodableKey`). Closes #937
* Merge branch 'da-task' into 'main'gabi-2502023-07-101-0/+28
|\ | | | | | | | | RFC: tor-rtmock: Use derive-adhoc for composite runtimes See merge request tpo/core/arti!1381
| * tor-rtmock: Use derive-adhoc for composite runtimesIan Jackson2023-07-071-0/+28
| |
* | tor-error: tracing module: Use macro to generate macrosIan Jackson2023-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | This abolishes some quintuplication. The output is identical except that: * The syntax display in the rustdoc output for the resulting macros seems to have somewhat less whitepsace. * The whimsical error messages in the examples are all identical. Ah well.
* | event_report: assert correctness of format endingNick Mathewson2023-07-071-0/+1
| | | | | | | | | | (Also, document that this static assertion is the reason why you are seeing a confusing error message.)
* | tor-error: Add optional tracing supportNick Mathewson2023-07-071-0/+1
|/ | | | | | | | | | The main contribution here is a set of convenience macros for logging error `Report`s. Notably, this macros always logs `Internal` and `BadAspiUsage` errors at `WARN`, unless they are already at `ERROR` or more. This is a little tricky because `tracing::event!()` requires its Level argument to be a constant.
* Merge branch 'task4' into 'main'Ian Jackson2023-07-061-1/+7
|\ | | | | | | | | Introduce a MockExecutor for fully-isolated test cases See merge request tpo/core/arti!1375
| * tor-dirmgr: bridge descriptor tests: Use MockRuntime (drop Tokio dep)Ian Jackson2023-07-061-1/+0
| | | | | | | | This isn't used any more.
| * tor-rtmock: MockRuntime: provide test_with_variousIan Jackson2023-07-061-0/+1
| | | | | | | | In both fallible and infallible variants, for convenience.
| * tor-rtmock: MockExecutor: Configurable scheduling policyIan Jackson2023-07-061-0/+1
| |
| * tor-rtmock: Provide MockRuntimeIan Jackson2023-07-061-0/+1
| |
| * tor-rtmock: Unit tests for MockExecutorIan Jackson2023-07-061-0/+1
| |
| * tor-rtmock: Provide MockExecutorIan Jackson2023-07-061-0/+3
| |
* | Merge branch 'log_precision' into 'main'Nick Mathewson2023-07-061-0/+4
|\ \ | |/ |/| | | | | | | | | arti: Add a `logging.time_granularity` option with 1s default. Closes #551 See merge request tpo/core/arti!1376
| * arti: Add a `logging.time_granularity` option with 1s default.Nick Mathewson2023-07-061-0/+4
| | | | | | | | | | | | | | This lets us provide less information in our logs: in particular, it lets us avoid logging with microsecond precision. Closes #551.