aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | 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
| | | | | | |
* | | | | | | 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-174-4/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge branch 'doc-fix' into 'main'David Goulet2026-06-171-2/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | tor-chanmgr: Remove comment for something that's not implemented See merge request tpo/core/arti!4124
| * | | | | | tor-chanmgr: remove comment for something that's not implementedSteven Engler2026-06-171-2/+1
| | | | | | |
* | | | | | | Merge branch 'keys-list-output' into 'main'gabi-2502026-06-175-149/+386
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | arti: subcommands: keys: Rework output of keys list See merge request tpo/core/arti!4015
| * | | | | | arti: subcommands: keys: Rework output of keys listhjrgrn2026-06-175-149/+386
| | | | | | |
* | | | | | | Merge branch 'stream-reexport' into 'main'David Goulet2026-06-1714-43/+37
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proto: Reexport the Incoming* types from tor_proto::stream See merge request tpo/core/arti!4123
| * | | | | | | proto: Update tests to use the new stream exportsGabriela Moldovan2026-06-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests don't compile otherwise.
| * | | | | | | proto: Add crate-level exports for two extra stream types (fmt)Gabriela Moldovan2026-06-1711-37/+20
| | | | | | | |
| * | | | | | | proto: Add crate-level exports for two extra stream typesGabriela Moldovan2026-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For convenience. This will soon replace a corresponding re-export from `tor_proto::client::stream`.
| * | | | | | | proto: Re-export StreamReceiver from tor_proto::streamGabriela Moldovan2026-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will soon replace the re-export from `tor_proto::client::stream`.
| * | | | | | | proto: Re-export the Incoming* types from tor_proto::streamGabriela Moldovan2026-06-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These will replace the pub re-exports from `tor_proto::client::stream`. This reorg is needed because currently, the only public export of the incoming stream types is from `tor_proto::client::stream`, but these aren't actually client specific: relays will use them too, for implementing exit, DNS and directory streams. So it makes more sense to export them from the top-level stream module instead.
| * | | | | | | proto: Make the stream module pubGabriela Moldovan2026-06-171-1/+1
| | | | | | | |
* | | | | | | | Merge branch 'ci-test' into 'main'Nick Mathewson2026-06-171-3/+45
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | Added ipv6 and hostname support for reply for socks5 See merge request tpo/core/arti!4063
| * | | | | | | sockproto: Tighten match and clean comments.Nick Mathewson2026-06-171-12/+6
| | | | | | | |
| * | | | | | | Added ipv6 and hostname support for reply for sockspryty262026-06-111-3/+51
| | | | | | | |
* | | | | | | | tor-netdoc: votes: use EmbeddedCert for the authhcertIan Jackson2026-06-172-2/+6
| | | | | | | |
* | | | | | | | tor-netdoc: EmbeddedCert: support whole netdocs (for AuthCert) (fmt)Ian Jackson2026-06-171-2/+7
| | | | | | | |
* | | | | | | | tor-netdoc: EmbeddedCert: support whole netdocs (for AuthCert)Ian Jackson2026-06-172-2/+34
| | | | | | | |
* | | | | | | | Merge branch 'consensus-roundtrip' into 'main'Ian Jackson2026-06-179-100/+312
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement encoding and verification for consensuses, and add a round trip test See merge request tpo/core/arti!4100
| * | | | | | | | tor-netdoc: consensus_threshold: return a RangeFromIan Jackson2026-06-172-8/+14
| | | | | | | | |
| * | | | | | | | tor-netdoc: Document new facilitiesIan Jackson2026-06-171-0/+2
| | | | | | | | |
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Round trip an md consensusIan Jackson2026-06-171-9/+17
| | | | | | | | |
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Make roundtrip test generic (fmt)Ian Jackson2026-06-171-19/+16
| | | | | | | | |
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Promote a fudgeIan Jackson2026-06-171-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microdescriptor consensuses are affected by this same anomaly.
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Make roundtrip test genericIan Jackson2026-06-171-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will let us test microdescriptors and votes with the same code.
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Round trip a plain consensusIan Jackson2026-06-172-2/+43
| | | | | | | | |
| * | | | | | | | tor-netdoc: tests: Add regsub utility functionIan Jackson2026-06-172-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to need this for fudges in round trip tests of consensuses etc.
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Mess with authcerts in a block (fmt)Ian Jackson2026-06-171-10/+10
| | | | | | | | |
| * | | | | | | | tor-netdoc: tests: ns parse2 test: Mess with authcerts in a blockIan Jackson2026-06-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids rebinding file and text and input to the authcerts. We're going to want to use at least some of those values later.
| * | | | | | | | tor-netdoc: tests: ns parse2 test: enable UnknownIan Jackson2026-06-171-1/+2
| | | | | | | | |