| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| | * | Fix a comment. | Nick Mathewson | 2024-04-11 | 1 | -2/+1 | |
| | | | ||||||
| | * | rpc: Add a missing not() to generic test. | Nick Mathewson | 2024-04-11 | 1 | -1/+1 | |
| | | | ||||||
| | * | Upgrade derive-deftly requirement to 0.10.3 | Nick Mathewson | 2024-04-11 | 11 | -12/+12 | |
| | | | | | | | | | We're taking this for the fix to derive-deftly#52. | |||||
| | * | Remove a duplicate $twheres. | Nick Mathewson | 2024-04-11 | 1 | -1/+1 | |
| | | | ||||||
| | * | rpc: Adjust a TODO comment. | Nick Mathewson | 2024-04-11 | 1 | -1/+1 | |
| | | | ||||||
| | * | rpc: Move deftly attributes into an `rpc` namespace. | Nick Mathewson | 2024-04-11 | 7 | -24/+24 | |
| | | | ||||||
| | * | Add generic support for RPC objects. | Nick Mathewson | 2024-04-08 | 1 | -8/+200 | |
| | | | | | | | | | | | | | | | | | | | Since we can't enumerate every instantiation at compile time, we instead provide a macro to generate an _installer_ function that installs a set of functions for a given instantiation. Due to the limitations of macro_rules, the syntax for generics is a bit ugly. | |||||
| | * | Refactor invoke_fn macro to make inventory optional | Nick Mathewson | 2024-04-08 | 1 | -14/+19 | |
| | | | | | | | | | | | Now there is an `decl_rpc_invoke_fn` macro that *only* declares the type-erased functions. Another macro's job will be to register it. | |||||
| | * | Globally rename rpc_invoke_fn to static_rpc_invoke_fn | Nick Mathewson | 2024-04-08 | 3 | -16/+16 | |
| | | | | | | | | | | | | | | | | | This will be called _static_ to make it clear that it registers the method statically, so you don't need to install it at runtime. After a bit more work, there will be a separate macro that declares an installer function. | |||||
| | * | Refactor: remove existence of HasConstTypeId_ as a trait | Nick Mathewson | 2024-04-08 | 9 | -56/+55 | |
| | | | | | | | | | | | | | | | | | | | We don't actually need this to be a trait; we just need methods and objects to have a `CONST_TYPE_ID_` if they want to participate in the inventory-based method registry. Removing this trait makes it much simpler to declare methods and objects. | |||||
| | * | Port many of the macros in tor-rpcbase to use derive-deftly. | Nick Mathewson | 2024-04-04 | 16 | -233/+249 | |
| | | | | | | | | | | | | | This simplifies our implementation logic in a few places, and simplifies our invocation syntax greatly. There are a few infelicities, noted in `TODO RPC` comments. | |||||
| | * | rpcbase: Require that every Object is Send + Sync + 'static | Nick Mathewson | 2024-04-04 | 1 | -2/+2 | |
| | | | | | | | | | | | (We don't plan to have any Object that can't be used as an `Arc<dyn Object>`.) | |||||
| * | | Merge branch 'counted_hashmap' into 'main' | Ian Jackson | 2024-04-11 | 2 | -42/+565 | |
| |\ \ | | | | | | | | | | | | | | | | | | | streammap: Use an internal counted_hashmap to simplify invariant checking Closes #1344 See merge request tpo/core/arti!2058 | |||||
| | * | | counted_map: Use educe(Default). | Nick Mathewson | 2024-04-02 | 1 | -12/+4 | |
| | | | | ||||||
| | * | | counted_map: Use PhantomData<fn(P)->P> | Nick Mathewson | 2024-04-02 | 1 | -4/+4 | |
| | | | | | | | | | | | | | This is always Send+Sync, and invariant with P. | |||||
| | * | | counted_map: Add some notes about correctness; downgrade unsafes | Nick Mathewson | 2024-04-02 | 2 | -13/+21 | |
| | | | | | | | | | | | | | | | | (We're letting the "unchecked" suffix of this function be enough to indicate that it's risky to use.) | |||||
| | * | | streammap: Use an internal counted_hashmap to simplify invariant checking | Nick Mathewson | 2024-03-28 | 2 | -43/+566 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of making `streammap.rs` responsible for keeping track of a count field, this lowers that functionality into a lower-level CountedHashMap type. Said type has a little more functionality than we need, to sketch out how we'd want to develop it moving forward if we find that it's useful elsewhere. Closes #1344. | |||||
| * | | | tor-guardmgr: Replace vanguard heap with a simpler approach. | Gabriela Moldovan | 2024-04-10 | 2 | -134/+118 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2075#note_3016306 using a heap isn't the best way to manage the vanguards: * in the default case, which will apply to most users, the L2 and L3 set sizes are 4 and 8 respectively. Using a heap doesn't make sense for such small sets * the use of `Weak<TimeBoundVanguard>`s will be an inconvenience later on, when we implement vanguard set persistence, since `Weak` isn't serializable or deserializable This switches to a simpler apporach, where the `VanguardMgr` computes the soonest expiration timestamp of its `VanguardSet`s by iterating over all the vanguards in each set. Closes #1366 | |||||
| * | | | Merge branch 'vanguard-mgr-sets' into 'main' | gabi-250 | 2024-04-10 | 12 | -70/+1097 | |
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | tor-guardmgr: Make lite vanguards work Closes #1275 and #1340 See merge request tpo/core/arti!2075 | |||||
| | * | | | tor-guardmgr: Do not store the NetDir in VanguardMgr. | Gabriela Moldovan | 2024-04-10 | 1 | -31/+23 | |
| | | | | | | | | | | | | | | | | | | | | | Instead, we try to get a `NetDir` from the `NetDirProvider` each time we `run_once()`. | |||||
| | * | | | tor-guardmgr: Remove unnecessary call to discard_expired(). | Gabriela Moldovan | 2024-04-10 | 2 | -3/+8 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Rename vanguards to vanguards heap for clarity. | Gabriela Moldovan | 2024-04-10 | 1 | -12/+12 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Remove unused params field. | Gabriela Moldovan | 2024-04-10 | 1 | -4/+0 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Validate lifetimes before constructing VanguarParams. | Gabriela Moldovan | 2024-04-10 | 1 | -4/+35 | |
| | | | | | | | | | | | | | | | | | | | | | If the [min, max] lifetime interval for a vanguard layer is the empty set (i.e. min > max), we return the default lifetime. | |||||
| | * | | | tor-guardmgr: Hold a weak reference to NetDirProvider. | Gabriela Moldovan | 2024-04-10 | 1 | -7/+14 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Don't recreate the event stream for each iteration (fmt). | Gabriela Moldovan | 2024-04-10 | 1 | -1/+7 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Don't recreate the event stream for each iteration. | Gabriela Moldovan | 2024-04-10 | 1 | -3/+5 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Only replenish the L3 sets if full vanguards are in use (fmt). | Gabriela Moldovan | 2024-04-10 | 1 | -8/+2 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Only replenish the L3 sets if full vanguards are in use. | Gabriela Moldovan | 2024-04-10 | 1 | -33/+54 | |
| | | | | | ||||||
| | * | | | tor-netdir: Increase channel size to so set_netidr_and_notify doesn't block. | Gabriela Moldovan | 2024-04-09 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | `TestNetDirProvider::set_netidr_and_notify` blocks if the channel is full, so let's give it a non-zero size. | |||||
| | * | | | tor-guardmgr: Clarify VanguardMgr::select_vanguard behaviour. | Gabriela Moldovan | 2024-04-09 | 1 | -0/+9 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Use ids_listed() instead of by_ids() (fmt). | Gabriela Moldovan | 2024-04-09 | 1 | -1/+2 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Use ids_listed() instead of by_ids(). | Gabriela Moldovan | 2024-04-09 | 1 | -1/+1 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Update TODO to say we want RelayUsage::vanguard(). | Gabriela Moldovan | 2024-04-09 | 1 | -1/+1 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Explain why we're making a uniform choice. | Gabriela Moldovan | 2024-04-09 | 1 | -0/+3 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Add tests for the vanguard manager. | Gabriela Moldovan | 2024-04-05 | 3 | -0/+392 | |
| | | | | | ||||||
| | * | | | tor-netdir: Implement TestNetDirProvider::events(). | Gabriela Moldovan | 2024-04-05 | 2 | -9/+54 | |
| | | | | | ||||||
| | * | | | arti: Enable arti-client/vanguards if vanguards are enabled. | Gabriela Moldovan | 2024-04-05 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | Without this we can't enable vanguards in the shadow tests. | |||||
| | * | | | tor-guardmgr: Replenish the vanguard sets as needed. | Gabriela Moldovan | 2024-04-05 | 2 | -13/+222 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Implement From<&VanguardSet> for RelayIdSet. | Gabriela Moldovan | 2024-04-05 | 1 | -1/+20 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Add a function for selecting vanguard lifetimes. | Gabriela Moldovan | 2024-04-05 | 1 | -0/+28 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Implement VanguardSet::pick_relay. | Gabriela Moldovan | 2024-04-05 | 2 | -12/+35 | |
| | | | | | | | | | | | | | | | | | Closes #1340 | |||||
| | * | | | tor-guardmgr: Implement vanguard mgr. | Gabriela Moldovan | 2024-04-05 | 1 | -10/+114 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Make TimeboundVanguard fields pub(super). | Gabriela Moldovan | 2024-04-05 | 1 | -2/+2 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Add VanguardMgrError::NetDir. | Gabriela Moldovan | 2024-04-05 | 1 | -0/+5 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Store the TimeboundVanguards in a binary heap. | Gabriela Moldovan | 2024-04-05 | 2 | -5/+47 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Implement launch_background_tasks. | Gabriela Moldovan | 2024-04-05 | 1 | -4/+35 | |
| | | | | | ||||||
| | * | | | tor-circmgr: Call VanguardMgr::launch_background_tasks. | Gabriela Moldovan | 2024-04-05 | 2 | -1/+10 | |
| | | | | | ||||||
| | * | | | tor-guardmgr: Give VanguardSets a target set size. | Gabriela Moldovan | 2024-04-05 | 2 | -4/+18 | |
| | | | | | | | | | | | | | | | | | | | | | The target is the number of vanguards the `VanguardMgr`s will try to maintain in the `VanguardSet`. | |||||
| | * | | | tor-guardmgr: Derive getters for VanguardParams. | Gabriela Moldovan | 2024-04-05 | 1 | -1/+7 | |
| | | | | | ||||||
