Skip to content
Snippets Groups Projects

Add flatfile DirMgr

Merged cgrigis requested to merge cgrigis/arti:add-flatfile-dirmgr into main

This is a first shot at implementing the changes needed for #267 (closed).

  • Definition of a DirProvider trait, abstracting the DirMgr. This is not complete, and in particular there is an issue with the client calling bootstrap(): the call cannot be abstracted in the trait, because async fn's are not (yet) supported.

  • Changes in TorClient to use a DirProvider instead of a DirMgr. Not complete, due to the above (currently has a nasty hack of keeping a reference to the actual DirMgr).

  • Implementation of a minimalist DirProvider called FlatFileDirMgr, that only loads the directory from cache files. Hidden behind a lightarti feature.

  • Changes in TorClient to use FlatFileDirMgr under a lightarti feature.

  • Addition of a couple of methods to UnvalidatedMdConsensus, to help manipulating the relays in FlatFileDirMgr.

  • Addition of FromStr for Authority, to allow us to load an authority from a file. The use of it is actually outside of Arti, in our client code, feeding the authorities to TorClient through configuration.

All comments and suggestions for improvements welcome. :smile: (Given that I am very new to Rust, I am sure I wrote a lot of "unrusty" things :upside_down: ).

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading