Skip to content
Snippets Groups Projects
  1. May 12, 2022
  2. May 11, 2022
  3. May 10, 2022
    • eta's avatar
      Merge branch 'dirmgr-purification-2' into 'main' · 0597c31a
      eta authored
      Refactor the tor-dirmgr bootstrapping code more gracefully
      
      See merge request tpo/core/arti!488
      0597c31a
    • eta's avatar
      Merge branch 'fix-coverage-ci' into 'main' · 5a2d08e0
      eta authored
      Disable fs-mistrust in coverage CI.
      
      See merge request tpo/core/arti!493
      5a2d08e0
    • Nick Mathewson's avatar
      Merge branch 'excise-husky' into 'main' · 50493c13
      Nick Mathewson authored
      Remove cargo-husky, and replace with manual instructions
      
      See merge request tpo/core/arti!494
      50493c13
    • eta's avatar
      Remove cargo-husky, and replace with manual instructions · 6fc7a864
      eta authored
      A build script reaching into your .git/hooks/ and modifying them
      nonconsensually was a bit of a horrifying concept, and also made it hard
      to build arti with the feature disabled. Remove this crate, and replace
      it with manual instructions on how to install the hooks in
      CONTRIBUTING.md.
      6fc7a864
    • eta's avatar
      33b2b428
    • eta's avatar
      tor-dirmgr: small fixups for the bootstrapping refactor · 27f4657f
      eta authored
      - Some FIXMEs got removed or amended.
      - AddMicrodescs now yields a mutable reference, so we can use .drain()
        and reuse the allocation.
      - Some panics were downgraded to debug_asserts.
      27f4657f
    • eta's avatar
      tor-dirmgr/bootstrap.rs: error on older netdirs, add log line · 8347f8cb
      eta authored
      - We don't want to inadvertently replace our netdir with one that's
        actually older, so detect and error on this condition.
      - Also, print a debug line when we get a new netdir without enough
        guards.
      - (An unrelated TODO was also added.)
      8347f8cb
    • eta's avatar
      tor-dirmgr/state.rs: take an object to get a netdir, not a netdir · 2c28e217
      eta authored
      - Taking a previous netdir directly and keeping it around before we need
        it is a bit of a waste of memory, and also doesn't mesh well with how
        SharedMutArc works.
      - To remedy this, introduce a new trait `PreviousNetDir` and have the
        state machines take that instead. (I was a bit tempted to just pass in
        the SharedMutArc directly. Maybe I should've done that.)
      2c28e217
    • Nick Mathewson's avatar
      Disable fs-mistrust in coverage CI. · 78e86e6b
      Nick Mathewson authored
      The CI runners like to run as root with umask 000, which our code
      rightly freaks out about.
      78e86e6b
    • eta's avatar
      tor-dirmgr/state.rs: remove GetConsensusState::bodge_new · 27073a5d
      eta authored
      - (Also fixes up some dirfilter stuff, whoops.)
      27073a5d
    • eta's avatar
      tor-dirmgr/state.rs: remove WriteNetDir, use filters directly · 7b5fad31
      eta authored
      - The only purpose of WriteNetDir was to provide a filter, which isn't
        necessary any more. Refactor to provide the filter directly.
      7b5fad31
    • eta's avatar
      tor-dirmgr/state.rs: use the NetDirChange API instead of WriteNetDir · 8b016697
      eta authored
      - GetMicrodescsState now uses the NetDirChange API to propagate netdir
        changes, instead of modifying the netdir directly.
      - PendingNetDir was refactored in order to support this use case.
      - As a result, the netdir-related methods in WriteNetDir can be removed,
        leaving only the DirFilter for now.
      - add_from_cache() no longer takes a store, because nothing uses it.
      - (bodge: apply_netdir_changes() was put in a few places missed
        previously)
      8b016697
    • eta's avatar
      tor-dirmgr/state.rs: add new NetDirChange API, consume it · 7a52e77e
      eta authored
      - The new DirState::get_netdir_change() API lets the state machine
        export a NetDirChange: a request to either replace the current netdir,
        or add microdescs to it.
      - bootstrap.rs now consumes this new API, even though nothing implements
        it yet.
      - This will let us implement GetMicrodescsState without having to
        directly mutate the netdir. The calling code also handles checking the
        netdir against the circmgr for sufficiency, and updating the consensus
        metadata in the store, meaning the revised GetMicrodescsState will not
        have to perform these tasks.
      7a52e77e
    • eta's avatar
      tor-dirmgr/state.rs: feed through additional parameters, use them · cad815e3
      eta authored
      - The additional parameters passed to GetConsensusState are now passed
        through all the states, and used as well.
      - WriteNetDir doesn't have a now() or config() method any more, since
        the states now get this from the runtime or the config parameters.
      - This required modifying the tests to make a mocked runtime and custom
        config directly, instead of using DirRcv for this purpose.
      - Additionally, because we don't have to upgrade a weak reference for
        DirState::dl_config(), that function no longer wraps its return value
        in Result.
      - (A bunch of the FIXMEs from the previous commit that introduced the
        additional parameters have now been rectified as a result.)
      cad815e3
    • eta's avatar
      tor-rtcompat: make CompoundRuntime handle SleepProviders properly · f0739e46
      eta authored
      Previously, CompoundRuntime would use the default implementations of
      SleepProvider::now() and ::wallclock(), instead of using its wrapped
      SleepProvider. This mildly embarrassing omission has been rectified.
      f0739e46
    • eta's avatar
      tor-dirmgr/state.rs: refactor GetConsensusState::new · a9bae9ad
      eta authored
      - GetConsensusState::new now takes a set of parameters matching what it
        actually needs, instead of just taking a writedir. (It still *does*
        take a writedir, and indeed still uses it for basically everything,
        but that will eventually go away.)
      - Its call sites were updated.
        - Some tests now need to take a runtime, and got indented a lot as a
          result.
        - Resetting was made non-functional, because we need to thread through
          the parameters passed to GetConsensusState to all of the other
          states, too. This will happen in a later commit.
      a9bae9ad
    • eta's avatar
      tor-dirmgr: move DirState to state.rs · 62ece0ea
      eta authored
      - Given that this is effectively an implementation detail, it doesn't
        really make sense to have it be in the crate root...
      - (also, we're going to change it a bunch now)
      62ece0ea
    • eta's avatar
      tor-dirmgr/bootstrap.rs: refactor fetch_single · 72ea9e34
      eta authored
      - fetch_single now takes what it needs, instead of an Arc<DirMgr<R>>.
      - This required refactoring the CANNED_RESPONSE mechanism, given the
        test would otherwise fail due to not having a CircMgr to pass to
        fetch_single.
      72ea9e34
Loading