Skip to content

tor-guardmgr: Replace vanguard heap with a simpler approach.

gabi-250 requested to merge gabi-250/arti:vanguard-mgr-refactor into main

As mentioned in !2075 (comment 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 VanguardSets by iterating over all the vanguards in each set.

Assigning to @nickm since this is a follow-up from !2075 (merged)

Closes #1366 (closed)

Merge request reports