| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | tor-guardmgr: Make remove_unlisted return the number of unlisted vanguards. | Gabriela Moldovan | 2024-04-30 | 1 | -2/+4 |
| | | | | | For symmetry with remove_expired. | ||||
| * | tor-guardmgr: Make remove_expired return the number of expired vanguards. | Gabriela Moldovan | 2024-04-30 | 1 | -17/+23 |
| | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2109#note_3024672 | ||||
| * | tor-guardmgr: Prevent misleading logs when not rotating vanguards. | Gabriela Moldovan | 2024-04-29 | 1 | -0/+10 |
| | | | | | | `rotate_expired()` now only logs that it is rotating the vanguards if some existing vanguards have actually expired. | ||||
| * | tor-guardmgr: Add a TODO about using the vanguard consensus params. | Gabriela Moldovan | 2024-04-29 | 1 | -0/+3 |
| | | |||||
| * | tor-guardmgr: Remove old TODO about making VanguardMode a VanguardParam. | Gabriela Moldovan | 2024-04-29 | 1 | -3/+0 |
| | | | | | | | | | | `VanguardParams` already contains the `vanguards_enabled` and `vanguards_hs_service` `VanguardMode` params. We still intend to abolish `VanguardConfig` in favour of deriving the `VanguardMode` from the consensus params (#1382), but this is not the right place for such a TODO. | ||||
| * | tor-guardmgr: Remove unnecessary clippy allows. | Gabriela Moldovan | 2024-04-29 | 2 | -2/+0 |
| | | | | | None of these should be unused anymore. | ||||
| * | tor-guardmgr: Remove unnecessary VanguardSetsTrackedMut contraption. | Gabriela Moldovan | 2024-04-22 | 1 | -163/+16 |
| | | | | | | | | | The VanguardMgr now unconditionally flushes the vanguard sets to disk each time there's a consensus change, and every time a vanguard expires. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2090#note_3021013 | ||||
| * | tor-guardmgr: Remove pick_{l2,l3}_relay, add l2(), l3() accessors. | Gabriela Moldovan | 2024-04-22 | 1 | -25/+10 |
| | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2090#note_3021016 | ||||
| * | tor-guardmgr: Make vanguard logs begin with an uppercase letter for consistency. | Gabriela Moldovan | 2024-04-22 | 1 | -1/+1 |
| | | | | | | Our log messages begin with an uppercase letter in the rest of the code base. | ||||
| * | tor-guardmgr: Add logging around vanguard rotation. | Gabriela Moldovan | 2024-04-22 | 1 | -3/+19 |
| | | |||||
| * | tor-guardmgr: Derive PartialEq for VanguardSets. | Gabriela Moldovan | 2024-04-22 | 1 | -3/+3 |
| | | | | | This will be useful for testing. | ||||
| * | tor-guardmgr: Make VanguardSet private. | Gabriela Moldovan | 2024-04-22 | 1 | -18/+10 |
| | | | | | | | This doesn't need to be `pub(super)` anymore, `VanguardMgr` now manipulates the `VanguardSets` exclusively through `VanguardSetsTrackedMut`. | ||||
| * | tor-guardmgr: Move vanguard set replenishing logic to VanguardSetsTrackedMut. | Gabriela Moldovan | 2024-04-22 | 1 | -13/+272 |
| | | | | | | | A lot of this is code motion: the code added to `VanguardSetsTrackedMut` was copied from the `VanguardMgr` impl, so I recommend reviewing this with `git diff --color-moved=zebra`. | ||||
| * | tor-guardmgr: Add VanguardSetsTrackedMut for mutating VanguardSets. | Gabriela Moldovan | 2024-04-22 | 1 | -0/+54 |
| | | | | | | | | | | This enables us to track when `VanguardMgr`'s `VanguardSets` is *actually* mutated. This will soon be useful because we only want to flush the `VanguardSets` to storage if we actually added or removed some relays from the set. | ||||
| * | tor-guardmgr: Add some accessors for VanguardSets. | Gabriela Moldovan | 2024-04-22 | 1 | -0/+43 |
| | | | | | | These will be useful later, when we place the `l2_vanguards` and `l3_vanguards` from `VanguardMgr` with a `VanguardSets`. | ||||
| * | tor-guardmgr: VanguardSet::remove_{unlisted,expired} returns whether the set ↵ | Gabriela Moldovan | 2024-04-22 | 1 | -5/+14 |
| | | | | | | | | | | changed. The two removal functions now return whether any values were removed from the `VanguardSet`. Their return values are currently ignored, but will soon be used for deciding whether to flush the `VanguardSet`s to disk (if full vanguards are enabled). | ||||
| * | tor-guardmgr: Introduce an abstraction over the two vanguard sets. | Gabriela Moldovan | 2024-04-22 | 1 | -0/+19 |
| | | | | | | | | `VanguardSets` (not to be confused with `VanguardSet`) will soon be used as: * a helper for serializing the L2 and L3 `VanguardSet`s * an abstraction over the two vanguard sets | ||||
| * | tor-guardmgr: Derive Default for VanguardSet. | Gabriela Moldovan | 2024-04-22 | 1 | -1/+6 |
| | | | | | | | | | | | We will soon replace `VanguardSet::new` with `VanguardSet::default`: `new()` currently expects a set of `VanguardParams` (from which the target size of the set is derived), but we don't have a `VanguardParams` until we obtain a `NetDir`. Moreover, it doesn't make sense to attempt to set the target size of the `VanguardSet` before obtaining a `NetDir`, because we can't actually populate the set without a `NetDir` (we can't select relays). | ||||
| * | tor-guardmgr: By default, use full vanguards for onion services. | Gabriela Moldovan | 2024-04-22 | 1 | -2/+2 |
| | | | | | | | | By default, HS clients should be using lite vanguards, and HS services full vanguards. See https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/258#note_3011734 | ||||
| * | tor-guardmgr: Remove unnecessary mutable reference. | Gabriela Moldovan | 2024-04-15 | 1 | -1/+1 |
| | | |||||
| * | tor-guardmgr: Remove outdated TODO. | Gabriela Moldovan | 2024-04-15 | 1 | -6/+0 |
| | | | | | It was addressed in !2083 | ||||
| * | tor-guardmgr: Remove outdated documentation. | Gabriela Moldovan | 2024-04-15 | 1 | -3/+0 |
| | | | | | | This is no longer true because of !2082. The `VanguardSet` *does* own its `TimeBoundVanguards`. | ||||
| * | tor-guardmgr: Remove unused TimeBoundVanguard implementations. | Gabriela Moldovan | 2024-04-15 | 1 | -24/+0 |
| | | | | | These are not used anymore as of !2082, so we can remove them now. | ||||
| * | tor-guardmgr: Add the two VanguardModes to VanguardParams. | Gabriela Moldovan | 2024-04-11 | 1 | -0/+12 |
| | | | | | | | | | We have two vanguard modes, one for when arti is running as a client, and a separate one for when it's running as a service. Both modes are extracted from the `NetParameters`, so they belong in `VanguardParams`. | ||||
| * | tor-guardmgr: Replace vanguard heap with a simpler approach. | Gabriela Moldovan | 2024-04-10 | 1 | -27/+25 |
| | | | | | | | | | | | | | | | | | | | 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 | ||||
| * | tor-guardmgr: Remove unnecessary call to discard_expired(). | Gabriela Moldovan | 2024-04-10 | 1 | -1/+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: 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 | 1 | -0/+16 |
| | | |||||
| * | tor-guardmgr: Replenish the vanguard sets as needed. | Gabriela Moldovan | 2024-04-05 | 1 | -0/+24 |
| | | |||||
| * | tor-guardmgr: Implement From<&VanguardSet> for RelayIdSet. | Gabriela Moldovan | 2024-04-05 | 1 | -1/+20 |
| | | |||||
| * | tor-guardmgr: Implement VanguardSet::pick_relay. | Gabriela Moldovan | 2024-04-05 | 1 | -9/+32 |
| | | | | | Closes #1340 | ||||
| * | tor-guardmgr: Make TimeboundVanguard fields pub(super). | Gabriela Moldovan | 2024-04-05 | 1 | -2/+2 |
| | | |||||
| * | tor-guardmgr: Store the TimeboundVanguards in a binary heap. | Gabriela Moldovan | 2024-04-05 | 1 | -5/+29 |
| | | |||||
| * | tor-guardmgr: Give VanguardSets a target set size. | Gabriela Moldovan | 2024-04-05 | 1 | -1/+11 |
| | | | | | | 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 |
| | | |||||
| * | tor-guardmgr: Pass an rng to select_vanguard. | Gabriela Moldovan | 2024-04-05 | 1 | -1/+3 |
| | | | | | | This function will need to randomly select a vanguard, so it needs an `Rng`. | ||||
| * | tor-guardmgr: Implement TryFrom<&NetParameters> for VanguardParams. | Gabriela Moldovan | 2024-04-05 | 1 | -3/+18 |
| | | |||||
| * | tor-guardmgr: Fix typo in VanguardSet docs. | Gabriela Moldovan | 2024-04-05 | 1 | -1/+1 |
| | | |||||
| * | tor-circmgr: Fix a clippy warning. | Gabriela Moldovan | 2024-03-21 | 1 | -1/+1 |
| | | |||||
| * | tor-guardmgr: Explain what neighbor_exclusion is for. | Gabriela Moldovan | 2024-03-21 | 1 | -1/+4 |
| | | |||||
| * | tor-guardmgr: Make Vanguard::select_relay take a RelayExclusion. | Gabriela Moldovan | 2024-03-21 | 1 | -1/+6 |
| | | | | | | | | This enables us to prevent the same relay from being picked in consecutive positions in a path. Part of #1340 | ||||
| * | tor-circmgr: Unconditionally define VanguardMode. | Gabriela Moldovan | 2024-03-20 | 1 | -18/+2 |
| | | |||||
| * | tor-guardmgr: Derive getters for Vanguard. | Gabriela Moldovan | 2024-03-20 | 1 | -2/+1 |
| | | |||||
| * | tor-guardmgr: Return an error if VanguardMode does not support the specified ↵ | Gabriela Moldovan | 2024-03-11 | 1 | -1/+5 |
| | | | | | Layer. | ||||
| * | tor-guardmgr: Move the VanguardSets into the inner mutable state. | Gabriela Moldovan | 2024-03-11 | 1 | -1/+1 |
| | | |||||
| * | tor-guardmgr: Say more about TimeBoundVanguards. | Gabriela Moldovan | 2024-03-11 | 1 | -0/+8 |
| | | |||||
| * | tor-guardmgr: Make the VanguardMode variants serialize to lowercase. | Gabriela Moldovan | 2024-03-11 | 1 | -0/+1 |
| | | |||||
| * | tor-guardmgr: Add vanguards API skeleton. | Gabriela Moldovan | 2024-03-11 | 2 | -0/+142 |
| Part of #1275 | |||||
