aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr/src/mgr.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce ChannelConfigIan Jackson2022-08-161-4/+17
| | | | | This commit is just the necessary plumbing. The config is currently empty. We'll add something to it, for padding control, later.
* Provide ChannelUsage and plumb it all the way downIan Jackson2022-08-161-13/+23
| | | | | | | | | | | | | 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.
* chanmgr: Introduce get_or_launch_internalIan Jackson2022-08-161-0/+10
| | | | This is going to be useful in a moment.
* channel reparameterize: Change error typeIan Jackson2022-08-161-5/+3
| | | | This is going to be able to fail in other ways too, sadly.
* dormancy: Plumb through to chanmgr reconfigure_generalIan Jackson2022-08-161-6/+19
| | | | | | | | | | | | | | | The chanmgr remembers the last dormancy state it was told. We invent a chanmgr-specific Dormancy which the arti-client code knows how to convert from the richer top-level dormant status. This avoids having to have everyone know all the variants of the top-level state. To call reconfigure_general, we must also obtain and plumb through a netdir. Right now we must return an internal error if there is in fact no netdir, because reconfigure_general does not yet cope with a missing netdir. Nothing actually *uses* the dormancy yet.
* chanmgr: reconfigure_general: Rename fn and change typesIan Jackson2022-08-161-0/+11
| | | | | | | | | | | | | | | This function is going to become the code for controlling channels, in general. (Including padding control.) Right now it doesn't do most of the things. In this commit: * Change the prototype and the name now. * Pass `()` for the dormancy and config, adding TODOs. * Provide update_netdir method on AbstractChanMgr, and call that, rather than having the ChanMgr go directly into the channel. (That will enable us to test that `update_netdir` method with test cases that don't have a complete ChanMgr.)
* channel params: Rename initial_update (from total_update)Ian Jackson2022-08-161-1/+1
| | | | The semantics of this are going to become a bit more subtle.
* chanmgr: tests: Introsuce new_test_abstract_chanmgrIan Jackson2022-08-161-8/+9
| | | | This is going to change. Centralise it first.
* channel padding: Rename ChannelsParams from ChannelsConfigIan Jackson2022-06-211-9/+9
| | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2814276 Change names and comments and docs everywhere.
* channel padding: chanmgr: Clarify a commentIan Jackson2022-06-211-3/+3
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813574
* channel padding: Plumb settings from chanmgrIan Jackson2022-06-211-11/+35
|
* ChanMgr: Return provenance information from get_or_launchNick Mathewson2022-04-071-11/+14
| | | | | | We need this since we want to report certain conditions only when they happen on a new channel, not if we observe them on a preexisting channel.
* tor-chanmgr: Do not allocate an Internal error unless we mean it.Nick Mathewson2022-03-081-5/+5
| | | | | | | | | | | | Previously we'd allocate an error as a place-holder here, but it's not a great idea to do that with a `Bug`: each `Bug` stores a whole stack trace, which uses a whole pile of allocations to construct. Now we keep an `Option<Error>` instead. Found while heap profiling. Closes #383.
* tor-chanmgr: use Bug types.Nick Mathewson2022-02-161-4/+9
|
* Expire channels that have been unused for too longYuan Lyu2022-02-041-5/+34
|
* chanmgr: get rid of Arc around ChannelIan Jackson2022-01-131-26/+33
|
* Resolve roughly half of the XXXXs.Nick Mathewson2021-12-061-3/+2
| | | | | | | | We want to only use TODO in the codebase for non-blockers, and open tickets for anything that is a bigger blocker than a TODO. These XXXXs seem like definite non-blockers to me. Part of arti#231.
* add semicolons if nothing returnedDaniel Eades2021-11-251-1/+1
|
* Remove all remaining dbg! instances.Nick Mathewson2021-11-041-1/+0
|
* tor-chanmgr: remove PendingChanError as unnecessary.Nick Mathewson2021-10-281-18/+6
|
* Remove #![allow_unused] in tor_chanmgr::mgrNick Mathewson2021-10-211-1/+1
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+404
This will cause some pain for now, but now is really the best time to do this kind of thing.