| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\
| |
| |
| |
| |
| |
| | |
Don't use SystemTime::now()
Closes #306
See merge request tpo/core/arti!365
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This means you can write a DirFilter and only write code to mess with
the bits you want to.
Also, it is less code here.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are two reasons why the DynFilter newtype might be needed:
1. To impl Default. But we don't need it to impl Default since we can
have an accessor which does the defaulting.
2. To hide the API. But this is usrely an unstable API.
Just writing Arc<dyn> gets rid of a lot of unnecessary boilerplate and
conversion code.
|
| | |
| |
| |
| |
| | |
Abolish the handwritten Debug impl for DynFilter, which is no longer
needed.
|
| | |
| |
| |
| |
| |
| | |
This code sits behind a feature flag, and can be used to modify
directories before storing them. This is part of the implementation
for #397.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Pattern bindings after `@` weren't stabilized then :/
|
| | |
| |
| |
| |
| |
| | |
Some error types indicate that the guard has failed as a dircache.
We should treat these errors as signs to close the circuit, and to
mark the guard as having failed.
|
| | |
| |
| |
| |
| |
| | |
It'll soon more convenient to pass in FallbackDirs as a slice of
references, rather than just a slice of FallbackDirs: I'm going to
be changing how we handle these in tor-dirmgr.
|
| | |
| |
| |
| |
| | |
This makes this information crate-private. The crate can reasonably
just access it.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Using accessors for crate-only fields is otiose.
|
| | |
| |
| |
| |
| |
| | |
Rename this to be named the same as its accessor, and use the rename
feature of builder and serde. (The shorter name is nicer in the code
IMO.)
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Use less space in hashtables for microdescriptors
Closes #386
See merge request tpo/core/arti!415
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were using a hashtable to keep track of missing microdescriptor
digests. But this information is redundant with the NetDir state,
and there's now no longer any performance benefit to keeping a
separate copy.
Part of #386.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Absolish builders for CircMgrConfig and DirMgrConfig
See merge request tpo/core/arti!417
|
| | | | |
| | | |
| | | |
| | | | |
See rationale in the comment.
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
dirmgr: Always send if-modified-since on consensus documents.
Closes #403
See merge request tpo/core/arti!412
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We never want a consensus document that's super-old, since we would
reject it immediately for being too old.
Also, never send an if-modified-since that's so old that we'd reject
the response.
Closes #403
|
| |\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
derive_builder: Switch to upstream 0.11
See merge request tpo/core/arti!414
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has the different syntax for builder field attributes than what I
originally proposed in my MR, and which therefore is in the pinned
branch.
My upstream MR for the field attributes feature was morged:
https://github.com/colin-kiegel/rust-derive-builder/issues/239
|
| | | |
| | |
| | |
| | | |
Instead, check initial_delay in dirmgr directly.
|
| | | |
| | |
| | |
| | | |
It wasn't necessary.
|
| | | |
| | |
| | |
| | |
| | | |
It's no longer about downloads; it's about whatever you need to
retry.
|
| | | |
| | |
| | |
| | |
| | | |
This (almost) a pure code-movement commit: it also makes one public
function private in order to suppress a warning.
|
| |/ /
| |
| |
| |
| | |
We'll need these for our unit tests in tor-dirmgr once we move
RetryDelay into tor-basic-utils.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
dirmgr: Call shrink_to_fit on missing-microdesc hashtable
Closes #388
See merge request tpo/core/arti!399
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This hashtable starts out pretty large, but it can spend most of our
runtime (when we aren't downloading) being small. To avoid doing
too much work, I've made it so we only call shrink_to_fit twice per
consensus: once when we're no longer pending, and once when we're
complete.
Closes #388.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has the humantime_serde::option module, which we have upstreamed
and are about to switch to.
The remaining dependency with version = "1" is going to be removed
in a moment.
|
| | | |
| | |
| | |
| | | |
Make update_config only conditionally exported; add semver-status update.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Add flatfile DirMgr
See merge request tpo/core/arti!318
|
| | |/ / |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I used
git-grep -P '\#\[serde\((?!default|deny_unknown)'
to find places where I needed to add additional attributes on the
builder method fields.
This is currently a bit duplicative, but when #371 is completely done,
the validated (non-builder) configs won't need to be Deserialize any
more.
This is part of #371 and #372.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are going to want to specify custom attributes on fields of the
builder struct. This feature was missing from derive_builder.
This commitid is the current head of my MR branch
https://github.com/colin-kiegel/rust-derive-builder/pull/237
https://github.com/ijackson/rust-derive-builder/tree/builder-field-attrs
Using the commitid prevents surprises if that branch is updated.
We will require this newer version of derive_builder. The version
will need to be bumped again later, assuming the upstream MR is merged
and upstream do a release containing the needed changes.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Errors for dirprovider
Closes #370
See merge request tpo/core/arti!385
|
| | | | |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Replace many manual trait impls with use of educe
See merge request tpo/core/arti!375
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Code motion and the minimal mechanical changes.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/375#note_2783078
|
| | | | |
|
| | | | |
|