aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/channel/padding.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-2/+2
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* tor-proto: Port to web-time-compatNick Mathewson2026-03-261-2/+2
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Include "bug" in all bug error messagesNick Mathewson2025-04-281-1/+1
|
* proto: make padding::Parameters construction fallible.Nick Mathewson2025-03-181-21/+103
| | | | | | | The constructor for rand::distr::Uniform is now fallible, so it makes sense to bubble up its restrictions. This is a breaking change.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+2
| | | | - `Uniform::new_inclusive` is now fallible.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-3/+3
| | | | - The rand::distributions module has been renamed to rand::distr
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* tor-rtmock: allow-Decorate every use of MockSleepProviderIan Jackson2025-03-061-0/+1
| | | | | | | MockSleepProvider and MockSleepRuntime have been declared deprecated by the docs for some time. We're about to mark them `#[deprecated]`. This commit has been split out for clarity of review.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Fix a bunch of needless-conversion warnings.Nick Mathewson2023-03-101-1/+0
| | | | | Apparently 1.68 now warns when you call into_iter() on something that's already an iterator. Fair enough. Let's stop doing that.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-121-0/+1
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* channel padding: Parameters: default_padding replaces Default implIan Jackson2022-08-171-1/+6
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
* ChannelPaddingInstructions: Update and expand docsIan Jackson2022-08-171-1/+1
|
* Rename PaddingParameters::all_zeroes constructor to disabledIan Jackson2022-08-171-4/+2
|
* tor-cell: PaddingNegotiate::default_reducedIan Jackson2022-08-171-10/+0
| | | | | | | | | | | Get rid of unneeded constructor. We never need to use hardcoded reduced padding parameters during negotiation cell construction. If we are using reduced padding parameters, the layers which decide this have netparams to use. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826092
* tor-cell: PaddingNegotiate::start: take IntegerMillisecondsIan Jackson2022-08-171-2/+1
|
* channel: Clarify (and in some places replace) "frontend" terminologyIan Jackson2022-08-171-2/+3
|
* channel padding: Rename low_ms and high_msIan Jackson2022-08-171-13/+13
| | | | | These have the unit in the type. Putting that in the field name too is otiose.
* tor-proto: padding::Parameters: Provide all_zeroesIan Jackson2022-08-161-0/+10
| | | | | This exists so that we handle this case specially, as we will need to, and so that we can represent disablement in a Parameters.
* tor-proto: padding::Parameters::padding_negotiate_cellIan Jackson2022-08-161-1/+17
| | | | | The channel manager is going to use this as part of constructing the right cell for padding neogotiattion.
* tor-proto: padding::Parameters: Provide default_reduced constructorIan Jackson2022-08-161-0/+12
| | | | We're going to want this so that we can do reduced padding.
* channel padding: Add doc commentary with the channel padding planIan Jackson2022-08-161-0/+24
| | | | | | | Much of this does not exist yet. It will do by the end of this branch. Expand a doc note for ChannelsParamsUpdates too.
* tor-proto: padding::Parameters: use impl_standard_builderIan Jackson2022-08-161-7/+3
| | | | | | | This is more standard. It also provides the ::build() method. This isn't a config type, and build failures ought not to happen, so we use Bug for the error.
* clippy: Consolidate many lints in maint/add_warningIan Jackson2022-06-241-3/+9
| | | | | | Found these by disabling the nightly dbg macro special case. Now, we have a mechanism for globally adding suppressions to tests, we can use that instead.
* channel padding: Use IntegerMilliseconds in padding::ParametersIan Jackson2022-06-211-10/+11
|
* channel padding: Introduce ChannelsConfig and reconfigure facilityIan Jackson2022-06-211-1/+0
| | | | Nothing geenrates config updates yet.
* channel padding timer: Support reconfigurationIan Jackson2022-06-211-4/+15
| | | | Nothing calls this yet.
* channel padding timer: Allow creation without providing parameters yetIan Jackson2022-06-211-14/+30
| | | | It turns out that we are going to want this.
* channel padding: Test creation in disabled stateIan Jackson2022-06-211-0/+12
| | | | | We're about to split the main new() function off so write a separate test for new_disabled().
* channel padding: Make Parameters a pub struct with builderIan Jackson2022-06-211-2/+13
| | | | chanmgr is going to want to make one of these from a NetDir.
* Merge branch 'config-fix2' into 'main'Nick Mathewson2022-06-161-0/+1
|\ | | | | | | | | Use impl_standard_builder more and remove manual Default/builder impls See merge request tpo/core/arti!594
| * tor-proto: channel: Tell clippy it's ok to print in testsIan Jackson2022-06-161-0/+1
| |
* | Permit eprintln in channel-padding test.Nick Mathewson2022-06-151-0/+1
|/ | | | | There is not, apparently, an eprintln equivalent for allow-dbg-in-tests.
* channel padding timer: Explain why next() in select_biased!Ian Jackson2022-06-091-0/+7
|
* channel padding timer: document state invariantsIan Jackson2022-06-091-2/+24
| | | | There aren't very many.
* Fix more typos in comments, from a spellcheckerIan Jackson2022-06-091-6/+6
|
* Fix erroneous commentNick Mathewson2022-06-091-1/+1
|
* Fix typos in commentsNick Mathewson2022-06-091-3/+3
|
* tor-proto: padding: Test padding timer distributionIan Jackson2022-06-081-0/+123
|
* tor-proto: channel: Use padding::TimerIan Jackson2022-06-081-2/+0
|
* tor-proto: channel: Provide padding::TimerIan Jackson2022-06-081-0/+405