- May 12, 2022
-
-
Ian Jackson authored
This was anomalous, in that it contains &'static str, rather than a proper nested error (eg a config::ConfigError, maybe). But in fact it tursn out it is now not constructed. The last construction site was removed a long time ago in Use derive_builder for Authority and FallbackDir.
-
eta authored
arti-config: Move cmdline to tor-config See merge request tpo/core/arti!498
-
eta authored
Improvements prompted by clippy, and disable one lint See merge request tpo/core/arti!497
-
eta authored
Provide and use macro for impl Derive via Builder See merge request tpo/core/arti!499
-
Nick Mathewson authored
Add correct serde(default) attrs for humantime_serde::option See merge request tpo/core/arti!502
-
Ian Jackson authored
Discovered by a test case in my local tree. The test case was macro-generated by an extension of impl_standard_builder (which macro istself currently awaiting review, arti!499) Have also sent an MR to update the upstream docs https://github.com/jean-airoldie/humantime-serde/pull/8
-
- May 11, 2022
-
-
Ian Jackson authored
The type of ret.map_err(codec_err_to_chan)? is (). ISTM that writing `let () = ` makes it clear that there is nothing there, but the lint forbids this. This lint is warn by default and trips here for me on current nightly. It seems wrong to me. We should be able to make it clear to the reader that there is nothing here - note how this differs from the lines below where Ready contains msg. A let () binding is a good way to do that. I think the lint allow ought to be added everywhere, but that doesn't seem easy right now - see this issue about maint/add_warning: tpo/core/arti#469
-
Ian Jackson authored
This does involve unwrap, but of course that can't fail unless the formats fail, which would already panic (that's implied by format!).
-
Ian Jackson authored
-
Ian Jackson authored
-
Ian Jackson authored
-
Ian Jackson authored
This does not know anything about arti, only about TOML and Config. Code motion, plus necessary import adjustments.
-
Nick Mathewson authored
Tidy up ConfigurationSource a bit See merge request tpo/core/arti!495
-
Ian Jackson authored
-
Ian Jackson authored
This will let other embedders use it.
-
Ian Jackson authored
These generic arguments weren't consistent. It doesn't make sense ot insist on getting a borrowed type and then cloning it. So tidy things up in the direction of taking owned values, which is what ConfigurationSources actually needs. (My personal preference would be &dyn to avoid monomorphisation code bloat but that was controversial last time I proposed it somewhere.)
-
Ian Jackson authored
-
Ian Jackson authored
Discarding this error is not right.
-
Ian Jackson authored
It is not clear to me how this `pub enum` survived the "inaccessible pub" lint.
-
Ian Jackson authored
This emphasises its nature. We're going to provide a more cooked constructor in a moment.
-
Nick Mathewson authored
Improve documentation around Cargo features; make Runtime require Debug Closes #445 See merge request tpo/core/arti!496
-
eta authored
- #445 highlighted the lack of good documentation around Arti's multiple runtime support, as well as it being difficult to determine what runtime was actually in use. - Improve the documentation to solve the first problem. - To solve the second problem, make Runtime require Debug (which is arguably a good idea anyway, since it makes them easier to embed in things), and print out the current runtime's Debug information when arti is invoked with `--version`. - (It also prints out other Cargo features, too!) fixes #445
-
- May 10, 2022
-
-
eta authored
Refactor the tor-dirmgr bootstrapping code more gracefully See merge request tpo/core/arti!488
-
eta authored
Disable fs-mistrust in coverage CI. See merge request tpo/core/arti!493
-
Nick Mathewson authored
Remove cargo-husky, and replace with manual instructions See merge request tpo/core/arti!494
-
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.
-
eta authored
-
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.
-
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.)
-
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.)
-
Nick Mathewson authored
The CI runners like to run as root with umask 000, which our code rightly freaks out about.
-
eta authored
- (Also fixes up some dirfilter stuff, whoops.)
-
eta authored
- The only purpose of WriteNetDir was to provide a filter, which isn't necessary any more. Refactor to provide the filter directly.
-
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)
-
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.
-
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.)
-
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.
-
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.
-
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)
-
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.
-