summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-proto: Make incoming stream requests participate in memquota (fmt)Ian Jackson2024-10-031-2/+2
|
* tor-proto: Make incoming stream requests participate in memquotaIan Jackson2024-10-032-3/+5
|
* tor-proto: Implement HasMemoryCost for StreamReqInfoIan Jackson2024-10-031-1/+8
| | | | | This is necessarily a bit fudged, since a StreamReqInfo is full of exciting things like ends of other MPSC queues.
* tor-proto: Make stream queues participate in memquota (fmt)Ian Jackson2024-10-031-2/+2
|
* tor-proto: Make stream queues participate in memquotaIan Jackson2024-10-032-8/+19
| | | | Change the typss of StreamMpscSender and StreamMpscReceiver.
* tor-proto: channel: Provide time_provider accessorsIan Jackson2024-10-031-0/+17
| | | | This will save circuits etc. keeping their own clone of the time provider.
* tor-proto: Make circuit->channel queues participate in memquotaIan Jackson2024-10-033-10/+41
| | | | | | | | We use the *channel*'s memquota account. This is arguably wrong, but it's hard to get right now. See #1652. Change the type of the queue, and the places it's constructed. The use sites can all stay the same.
* tor-proto: Introduce a fake_mpsc helper for channel testsIan Jackson2024-10-031-2/+11
| | | | | This provides a nice place to change in the tests, when we want to change the way the queue is made.
* tor-proto: Put a StreamAccount in DataStream etc.Ian Jackson2024-10-034-7/+29
|
* tor-proto: Put a StreamAccount in DataStream etc. (pre-fmt)Ian Jackson2024-10-031-2/+9
|
* tor-proto: Put a CircuitAccount in ClientCirc and circuit::ReactorIan Jackson2024-10-032-1/+18
|
* tor-proto: Plumb the ChannelAccount through to queue creation siteIan Jackson2024-10-034-6/+51
| | | | | This gets it as far as the outbound circuit->channel mpsc queue creation. Also, we provide an accessor for it.
* tor-proto: Plumb the ChannelAccount through to queue creation site (pre-fmt)Ian Jackson2024-10-032-2/+10
|
* tor-proto: Make PendingClientCirc::new fallible (fmt)Ian Jackson2024-10-031-7/+1
|
* tor-proto: Make PendingClientCirc::new fallibleIan Jackson2024-10-032-6/+7
|
* tor-proto: channel: Make construction fallibleIan Jackson2024-10-033-5/+7
| | | | | Making a channel is going to involve making a memquota Participant, which can fail.
* tor-proto: Provide a variant for memquota errorsIan Jackson2024-10-031-0/+6
|
* Provide newtypes to distinguish memoquota accounts at different levelsIan Jackson2024-10-032-0/+118
|
* Merge branch 'mcost' into 'main'Ian Jackson2024-10-023-5/+13
|\ | | | | | | | | Implement tor_memquota:HasMemory cost for a lot of types See merge request tpo/core/arti!2459
| * Some HasMemoryCost impls in tor-protoIan Jackson2024-10-023-5/+13
| |
* | Merge branch 'misc' into 'main'Ian Jackson2024-10-021-0/+10
|\ \ | |/ |/| | | | | tor-proto: SometimesUnboundedSink: provide as_inner accessor See merge request tpo/core/arti!2483
| * tor-proto: SometimesUnboundedSink: provide as_inner accessorIan Jackson2024-10-021-0/+10
| |
* | Merge branch 'mpsc-types' into 'main'Ian Jackson2024-10-024-20/+40
|\ \ | | | | | | | | | | | | tor-proto: Introduce type aliases for some queues See merge request tpo/core/arti!2484
| * | tor-proto: Introduce type alias for StreamReqSenderIan Jackson2024-10-021-2/+6
| | | | | | | | | | | | This will make it a little easier to change the type later.
| * | tor-proto: Introduce type aliases for stream queues (fmt)Ian Jackson2024-10-021-4/+3
| | |
| * | tor-proto: Introduce type aliases for stream queuesIan Jackson2024-10-024-18/+35
| |/ | | | | | | This will make it easier to change their types.
* | Merge branch 'close-channel-2' into 'main'Nick Mathewson2024-10-022-12/+12
|\ \ | |/ |/| | | | | Provide and implement SinkCloseChannel See merge request tpo/core/arti!2485
| * tor-proto: Use trait methods for try_send and channel_close (fmt)Ian Jackson2024-10-011-10/+7
| |
| * tor-proto: Use trait methods for try_send and channel_closeIan Jackson2024-10-012-5/+8
| | | | | | | | This prepares us to change the types of these queues.
* | tor-proto: Add a CoarseTimeProvider bound to all the SleepProviders (fmt)Ian Jackson2024-10-011-4/+14
| |
* | tor-proto: Add a CoarseTimeProvider bound to all the SleepProvidersIan Jackson2024-10-012-11/+11
|/ | | | | | | The memquota arranagements are going to use this. We *don't* apply this to Channel (or to other types that aren't already generic over SleepProvider).
* Merge branch 'unused' into 'main'David Goulet2024-10-011-5/+2
|\ | | | | | | | | Suppress some dead code warnings See merge request tpo/core/arti!2463
| * tor-proto: Allow all dead code if not all features enabledIan Jackson2024-09-301-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes cargo check -p tor-chanmgr --all-features --all-targets which otherwise prints warning: method `reply` is never used --> crates/tor-proto/src/crypto/handshake.rs:73:8 | 65 | pub(crate) trait AuxDataReply<H> | ------------ method in this trait ... 73 | fn reply(&mut self, msg: &H::ClientAuxData) -> Option<H::ServerAuxData>; | ^^^^^ | = note: `#[warn(dead_code)]` on by default
* | Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* | Minor bumps on non-tor/arti cratesNick Mathewson2024-09-301-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are not in the tor/arti namespace, but we have given them MSRV bumps: ``` oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error ``` We are counting this as a breaking change. Since all of these crates are at 0.x.x, we have indicated the breaking change with a minor version bump. This commit was generated with the following script: ``` BUMPS=" oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error " for crate in $BUMPS; do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+1
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* tor-proto: Use Reader::take_all_but().Nick Mathewson2024-09-161-8/+1
|
* tor-bytes: Error: provide and call Error::incomplete_errorIan Jackson2024-09-111-1/+1
| | | | | | | | | | | | | | | | | | | We introduce the new constructor and call it at the error generation sites. But there is still not yet any functional change. Change the type of Truncated's field to be Sensitive. The original reason for not doing this no longer applies, since we don't generally want to open-code construction of this variant. Conveniently, changing the type means we get to find all the sites where one *is* constructed and adjust them. In reader.rs and tor-proto we can just call incomplete_error. In tor-cell, there's a call site where we previously provided an underestimate, and where the Reader isn't available. We adjust that ad-hoc but this is fine because the error variant will change. (relaycell is using a Reader from from_slice.)
* tor-bytes: Add a deficit field to Error::Truncated (fmt)Ian Jackson2024-09-101-1/+3
|
* tor-bytes: Add a deficit field to Error::TruncatedIan Jackson2024-09-101-1/+2
| | | | This will allow us to fix #1592, but it doesn't do so yet.
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-17/+17
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* oneshot-fused-workaround: Set the initial version to 0.1.0.Gabriela Moldovan2024-09-031-1/+1
| | | | This is the first time we're publishing this, so let's start at 0.1.0.
* Fix formatting issues introduced by fixup-features.Gabriela Moldovan2024-09-031-1/+3
|
* Run fixup-features in preparation for release.Gabriela Moldovan2024-09-031-1/+1
|
* Fix typosDimitris Apostolou2024-09-032-3/+3
|
* Move stream_peek into tor-async-utilsJim Newsome2024-08-292-6/+2
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-288-10/+10
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.