summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
* Bump minor version of tor-rtcompat and most of its dependentsNick Mathewson2022-10-031-4/+4
| | | | | | | (Since the APIs for the `Schedule::sleep*` functions changed, this is a breaking change in tor-rtcompat. Therefore, the Runtime trait in tor-rtcompat is now a different trait. Therefore, anything that uses the Runtime trait in its APIs has also broken.)
* Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-3/+3
|
* fix clippy::needless_borrowtrinity-1686a2022-09-101-1/+1
|
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-8/+0
|
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* Update README.md files with "readmes" tool.Nick Mathewson2022-08-311-4/+20
|
* Upgrade statrs in preparation for release.Nick Mathewson2022-08-301-1/+1
|
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-242-0/+2
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* channel padding: Only do anything with link protocol 5Ian Jackson2022-08-171-0/+7
| | | | | | | Or rather, if we *didn't* negotiate 4, which is too old. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
* channel padding: Properly advertise link protocol 5Ian Jackson2022-08-171-3/+2
| | | | | | | | | We already actually send and negotiate the padding, since !657, but we ought to negotiate a protocol version where that's not a violation! As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
* channel padding: Move initial config of ChannelPaddingInstructionsIan Jackson2022-08-171-6/+5
| | | | | | | | | | | | | Making ChannelPaddingInstructions::default() accurately reflect the initial state of the reactor's padding timer simplifies the code somewhat. (When padding is wanted, parameters are computed and inserted explicitly, so the only change is that if we start out dormant, we defer setting the timer parameters until necessary.) As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
* channel padding: Parameters: default_padding replaces Default implIan Jackson2022-08-172-1/+7
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
* Add semver notesIan Jackson2022-08-171-0/+7
|
* channel reactor: Add some commented-out debug for paddingIan Jackson2022-08-171-1/+5
|
* channel padding: Correctly always send the timer parametersIan Jackson2022-08-171-1/+8
| | | | Fixes "chanmgr configuration: Avoid sending needless initial update(s)"
* channel padding: Abolish ARTI_EXPERIMENTAL_CHANNEL_PADDING env varIan Jackson2022-08-171-8/+0
| | | | This was for testing and is no longer needed.
* channel engage_padding_activities: swap docs to tor0protoIan Jackson2022-08-171-1/+11
| | | | This allow us to make a working cross-reference.
* channel fake_channel_details: Use precise cfgIan Jackson2022-08-171-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826169
* ChannelPaddingInstructions: Update and expand docsIan Jackson2022-08-172-11/+41
|
* ChannelPaddingInstructions: Rename `params` field to `insns`Ian Jackson2022-08-171-6/+6
|
* Rename ChannelsParams types to ChannelPaddingInstructions (fmt)Ian Jackson2022-08-171-1/+4
| | | | Run rustfmt; no other changes.
* Rename ChannelsParams types to ChannelPaddingInstructionsIan Jackson2022-08-174-43/+43
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826167 This makes some lines too long; I will run rustfmt in a separate commit for clarity.
* Rename PaddingParameters::all_zeroes constructor to disabledIan Jackson2022-08-171-4/+2
|
* Channel: Make mutable() and engage_padding_activities infallibleIan Jackson2022-08-171-6/+5
| | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826151 This gets rid of quite some Bug error paths.
* Move ChannelUsage from tor_proto to tor_chanmgrIan Jackson2022-08-171-55/+26
| | | | | | | | | | | Replace Channel::note_usage with Channel::engage_padding_activities, which unconditionally causes the channel to (start to) do netflow padding things. The condition now lives in chanmgr. Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826094
* 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-173-7/+10
|
* tor-proto channel padding: Document PADDING_NEGOTIATE overwritingIan Jackson2022-08-171-0/+3
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2825979
* chanmgr ChannelUsage: Fix and clarify docsIan 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, testing: Provide accessors for ChannelsParamsUpdatesIan Jackson2022-08-161-0/+11
|
* tor-proto, testing: Provide new_fake_channelIan Jackson2022-08-161-0/+22
| | | | To test the padding control we will want this.
* tor-proto, testing: Make fake_channel_details availableIan Jackson2022-08-161-16/+18
| | | | Now it's not just cfg(test), but feature testing.
* tor-proto: Make "testing" feature that exports some thingsIan Jackson2022-08-164-5/+26
| | | | | We are going to want this for through-the-layers padding control testing.
* channel padding: Send negotiation cellsIan Jackson2022-08-163-4/+17
|
* tor-proto channel: Make arrangements to send PADDING_NEGOTIATEIan Jackson2022-08-162-2/+35
| | | | | | | | | | | | | This is actually a general facility for inserting locally-generated cells into the outgoing stream. It doesn't seem to be possible to do this without adding an additional condition check to the reactor, since we need to insert it into the right place in the stream, giving it priority over data, and only using it up if there was room in the output. We don't engage this machinery yet, because nothing sets special_outgoing.
* chanmgr configuration: Avoid sending needless initial update(s)Ian Jackson2022-08-161-5/+6
| | | | | | | | | | | Change ChannelsParams::initial_update to compare fields with their default values, and, if they're the same as the default, not to include them in the returned update. And if that update is then empty, return None. The overall effect is to avoid the call to chan.reparameterize if we're using the builtin default parameters, which is usual.
* channel: Use channel usage to control channel paddingIan Jackson2022-08-161-8/+111
| | | | | We introduce the per-channel state that is used to keep track of channel usage, and defer padding setup until it's wanted.
* channel: Provide somewhere for the frontend's mutable stateIan Jackson2022-08-161-0/+24
| | | | | Right now this is just furniture. We're going to put channel padding control state here.
* Provide ChannelUsage and plumb it all the way downIan Jackson2022-08-161-0/+27
| | | | | | | | | | | | | Channel padding depends on what the channel is being used for. We therefore need to let the channel code know this information. The implementation of the per-channel padding control logic will be in the new note_usage function, which for now is simply a stub. A future commit will introduce a `PaddingControlState` which lives in the channel frontend; consult the doc comment for that type to see why the plumbing through the channel manager terminates in the channel frontend.
* channel reparameterize: Change error typeIan Jackson2022-08-161-5/+3
| | | | This is going to be able to fail in other ways too, sadly.
* channel params: ChannelsParamssUpdates: provide combine()Ian Jackson2022-08-161-0/+13
| | | | | We're going to need this because the frontend is going to need to defer some channel padding parameters updates.
* channel params: Add a missing comma.Ian Jackson2022-08-161-1/+1
| | | | | | | Unfortunately, because we don't have derive-adhoc here yet, rustfmt didn't get to notice that this comma was needed. We are going to add field(s), so add the comma now.
* channel params: Rename initial_update (from total_update)Ian Jackson2022-08-161-3/+3
| | | | The semantics of this are going to become a bit more subtle.
* 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-162-0/+27
| | | | | | | Much of this does not exist yet. It will do by the end of this branch. Expand a doc note for ChannelsParamsUpdates too.