summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | doc/dev/note: Clarify what rejecting a stream request entailsGabriela Moldovan2026-06-181-4/+11
| | | | |
| * | | | Add a rough plan for relay incoming stream handlingGabriela Moldovan2026-06-181-0/+609
|/ / / / | | | | | | | | | | | | Closes #2574
* | | | Merge branch 'keys-list-tests' into 'main'opara2026-06-1812-621/+65
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | arti: Rewrite hand-written tests using `trycmd` See merge request tpo/core/arti!4126
| * | | | arti: Gate the "arti keys" tests behind onion-service-serviceGabriela Moldovan2026-06-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that these test more than just the help output, we need to gate them behind the `onion-service-service` feature: the tests involve some C Tor keystores, and require at least one onion service to be configured, because onion services (and clients) are the only thing these keystores are used for.
| * | | | arti: Remove no longer used test helperGabriela Moldovan2026-06-171-13/+1
| | | | |
| * | | | arti: Remove now-obsolete keys test moduleGabriela Moldovan2026-06-173-581/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have `trycmd` tests that cover most cases, so I am removing this module. The reason this was introduced in the first place is in the module level docs ```rust //! The `assert_cmd` crate is used here instead of the preferred `trycmd` (see //! [`README`](../README.md)) because the output of `keys list` is not deterministic across //! different machines. The design choices of some components are workarounds for this limitation. ``` But this is no longer an issue now that the `keys list` output is sorted. Ideally, all tests would be written this way (we have a few more modules in `cli_tests` that we should probably port to `trycmd` sometime). Note: some of the tests I'm removing here don't have a `trycmd` counterpart in `arti/tests/testcases/keys`. In my opinion, this is perfectly fine, because the old tests were unnecessarily testing all the possible configurations involving 1-2 keystores (one arti, and one C Tor): it is not the responsibility of the CLI tests to cover all these permutations (they should be tested in `tor-keymgr`).
| * | | | arti: Add a trycmd-based test for arti keys list error handlingGabriela Moldovan2026-06-173-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This is a `trycmd`-based replacement for the `list_unregistered_keystore_fails()` test, which will be removed soon.
| * | | | doc/keys.md: Un-ignore some of the example snippetsGabriela Moldovan2026-06-173-25/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This un-ignores some of the output snippets from the `doc/keys.md` file, so that our `trycmd` test runner will actually run them. This will force us to keep the snippet in sync with the code. This involved adding some extra config for the test C Tor keystore, and tweaking the output to match what the commands actually print out.
| * | | | arti: Sort the arti keys list outputGabriela Moldovan2026-06-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This will make the output deterministic and enable us to write some `trycmd` tests in the form of markdown output snippets.
* | | | | Merge branch 'addrpolicy-encode' into 'main'Clara Engler2026-06-183-10/+79
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | NetdocEncodableFields for AddrPolicy See merge request tpo/core/arti!4113
| * | | | tor-netdoc: Use format_args! instead of format!Clara Engler2026-06-181-1/+1
| | | | |
| * | | | tor-netdoc: Use chain!() instead of pushClara Engler2026-06-181-6/+7
| | | | | | | | | | | | | | | | | | | | Replaces a push by using the chain!() macro from itertools.
| * | | | tor-netdoc: Add test for default deny encoding of AddrPolicyClara Engler2026-06-181-0/+28
| | | | |
| * | | | tor-netdoc: Round-trip encoding test for AddrPolicyClara Engler2026-06-181-1/+8
| | | | |
| * | | | tor-netdoc: Derive NetdocEncodable in unit testClara Engler2026-06-181-1/+1
| | | | |
| * | | | tor-netdoc: Replace Ignored with () in AddrPolicy testClara Engler2026-06-181-5/+2
| | | | | | | | | | | | | | | | | | | | () implements encodable which we will derive soon.
| * | | | tor-netdoc: Add NetdocEncodableFields for AddrPolicyClara Engler2026-06-182-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | This commit implements NetdocEncodableFields for AddrPolicy in a non-trivial fashion. A unit test will be added in a moment.
| * | | | tor-netdoc: Make some policy methods constClara Engler2026-06-182-3/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | This commit makes some policy related constructor functions constant, so we can use them in const expressions, which will be required for the next commit.
* | | | Merge branch 'msrv-1.91' into 'main'gabi-2502026-06-1876-76/+76
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Bump MSRV to 1.91 See merge request tpo/core/arti!4105
| * | | | Bump MSRV to 1.91Clara Engler2026-06-1576-76/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* | | | | Merge branch 'derive-depr' into 'main'Clara Engler2026-06-182-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-netdoc: derives: allow handling deprecated fields See merge request tpo/core/arti!4118
| * | | | | tor-netdoc: constructor derive: allow setting deprecated fieldsIan Jackson2026-06-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We must generally set such a field to the default.
| * | | | | tor-netdoc: parse2 derive: allow setting deprecated fieldsIan Jackson2026-06-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to derive from a struct with deprecated fields, without triggering the warning. This doesn't yet treat encoding as yet, because the only deprecated field I encountered was `skip` which means the derived encoder never mentions it.
* | | | | | Merge branch 'misc_string_slices_1' into 'main'Clara Engler2026-06-1814-68/+187
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix string_slice exceptions outside of netdoc See merge request tpo/core/arti!4092
| * | | | | | arti: remove string slicesNick Mathewson2026-06-101-2/+1
| | | | | | |
| * | | | | | arti-rpcserver: remove string slicesNick Mathewson2026-06-101-5/+4
| | | | | | |
| * | | | | | arti-client: remove string slicesNick Mathewson2026-06-102-8/+6
| | | | | | |
| * | | | | | ptmgr: Remove string slicing.Nick Mathewson2026-06-101-11/+11
| | | | | | |
| * | | | | | hscrypto, linkspec, llcrypto: Use new redaction helpersNick Mathewson2026-06-103-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This eliminates some string slicing.
| * | | | | | safelog: Define redaction helpers to avoid string slicing.Nick Mathewson2026-06-102-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Several of our remaining string slicing instances are for redaction, and it makes sense to have a single tested implementation for this.)
| * | | | | | consdiff: remove string slice usageNick Mathewson2026-06-101-8/+5
| | | | | | |
| * | | | | | protover: remove str slice usageNick Mathewson2026-06-101-11/+4
| | | | | | |
| * | | | | | config: remove str slice usageNick Mathewson2026-06-101-6/+6
| | | | | | |
| * | | | | | basic-utils: remove str slice usageNick Mathewson2026-06-101-4/+2
| | | | | | |
* | | | | | | Merge branch 'sample-relays' into 'main'Jim Newsome2026-06-171-89/+121
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | NetDir::pick_n_relays: test and fix See merge request tpo/core/arti!4110
| * | | | | | pick_n_weighted: change variable names for clarityJim Newsome2026-06-171-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "iter" wasn't an iterator per se. Changed it to "sampled_items", and renamed other variables to call the items more generically "items" than "relay", since the mixed usage was a little confusing, and the function doesn't really know anything about relays.
| * | | | | | NetDir::pick_n_relays and pick_n_weighted: clarify/fix docs re zero-weight itemsJim Newsome2026-06-171-5/+7
| | | | | | |
| * | | | | | NetDir::pick_n_weighted: fix doc-comment to not refer toJim Newsome2026-06-171-2/+1
| | | | | | |
| * | | | | | Rename NetDir::pick_n_filtered_weighted -> pick_n_weightedJim Newsome2026-06-171-22/+14
| | | | | | |
| * | | | | | pick_n_filtered_weighted: move warnings logs to callerJim Newsome2026-06-171-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have more useful context in the caller, `pick_n_relays`.
| * | | | | | pick_n_filtered_weighted: test and fix for rand 0.10 behaviorJim Newsome2026-06-171-79/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests our implementation of sampling to ensure the behavior is as-expected. It also updates the implementation so that the tests pass (It was broken when updating to rand 0.10; see https://gitlab.torproject.org/tpo/core/arti/-/work_items/1907#note_3426398). This removes the direct testing of `rand::IndexedRandom::sample_weighted`, since this is now an impplementation detail of `pick_n_filtered_weighted`, which is itself tested. Verified that this fixes the case of sometimes not being able to select a Guard in integration tests. <https://gitlab.torproject.org/tpo/core/chutney/-/work_items/40057#note_3426299> <https://gitlab.torproject.org/tpo/core/arti/-/work_items/1907#note_3408157> <https://gitlab.torproject.org/tpo/core/arti/-/work_items/2209>
| * | | | | | NetDir::pick_n_relays: move implementation to a testable helperJim Newsome2026-06-171-35/+60
| | | | | | |
| * | | | | | cargo fmtJim Newsome2026-06-171-5/+21
| | | | | | |
| * | | | | | Netdir::pick_n_relays: precompute weightsJim Newsome2026-06-171-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be a no-op refactor to callers. It's a step towards decoupling the weighting and filtering from the sampling.
| * | | | | | test_zero: fix comment re 0-weight handlingJim Newsome2026-06-171-1/+0
| | | | | | |
| * | | | | | NetDir::pick_relay: update doc-comment re zero-weight handlingJim Newsome2026-06-171-1/+4
|/ / / / / /
* | | | | | Merge branch 'keys-list-fixes' into 'main'opara2026-06-175-6/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti: Various `arti keys list` doc fixes See merge request tpo/core/arti!4125
| * | | | | | arti, keymgr: s/IDEA/TODOGabriela Moldovan2026-06-172-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to use "TODO" like we do in the rest of Arti, because otherwise this has a chance of being forgotten (because nobody really greps for "IDEA").
| * | | | | | arti: Don't mention entry validity in the help messageGabriela Moldovan2026-06-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This actually applies to unrecognized entries too, and besides, most users aren't going to think in terms of "valid" vs "invalid" entries, so it's best to omit this qualifier.
| * | | | | | doc/keys.md: Clarify what we mean by "broken" entriesGabriela Moldovan2026-06-171-1/+2
| | | | | | |