| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
| |
This isn't complete (see TODO), but it's enough to let us report the
right ErrorKind if something fails to parse.
|
| |
|
|
|
|
|
|
| |
It had too many possible Kinds depending on what kind of string had
failed to parse.
I decided to use #[source] here instead of #[from], so that we
would have to explicitly convert these errors where they show up.
|
| |
|
|
|
| |
At first I had thought that all sqlite errors would be internal, but that's
not the case.
|
| |
|
|
|
|
|
|
|
| |
This failure occurred because our tests use canned data to exercise
the directory state functionality, and the canned consensus has
suddenly become very expired.
There are better fixes possible, but this is a minimal one that
should get CI working on main again.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The interface is similar to the one exposed by `arti-client`: it
internally uses postage::watch to give a series of events showing
when a bootstrap status is changing.
Thanks to the existing state/driver separation in the DirMgr design
we don't need much new logic: each download state needs to expose
(internally) how far along it is in its download, which the
bootstrap code passes to the DirMgr if it has changed.
I believe that in the long run, we'll probably want to expose more
(or different) information here, and we'll want to process it
differently. With that in mind, I've made the API for
`DirBootstrapStatus` deliberately narrow, so that we can change its
of its internal later on without breaking code that depends on it.
(The information exposed by this commit is not yet summarized in
`arti-client`.)
Part of #96.
|
| |
|
|
| |
That's what I get for blindly trusting @nickm :p
|
| |\
| |
| |
| |
| |
| |
| | |
Fix ticket 178: Don't use a NetDir until we have microdescriptors for all of our primary guards.
Closes #178
See merge request tpo/core/arti!220
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This prevents a security-failure condition that could happen if our
directory caches don't give us these microdescriptors, but we
nevertheless decide that the directory is usable.
Closes #178
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
When our current consensus is getting close to being invalid (but
it isn't invalid yet), we try to get a new one. So far, so good.
But we had a bug: when we went to get a new consensus, we'd see that we
had a perfectly fine not-yet-invalid consensus in our cache, reload it,
find that it was ready, and continue!
This patch fixes our behavior: If we have a usable consensus, then
when we reset the bootstrapping process, we ignore any cached consensus.
Fixes bug #274.
|
| |
|
|
|
|
|
| |
Previously we didn't retain the value of our cache_usage field when
calling reset() from GetMicrodescsState.
This resolves an XXXX comment.
|
| |\
| |
| |
| |
| | |
Refactor directory events to use a new FlagPublisher mechanism.
See merge request tpo/core/arti!188
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This approach tries to preserve the current interface, but uses a
counter-based event backend to implement a coalescing stream of
events that can be represented as small integers. The advantage
here is that publishing events no longer needs to be a blocking
operation, since there is no queue to fill up.
|
| |/
|
|
|
|
|
|
| |
This warning occurs if we ask for microdescriptors from our local
cache, and our cache gives us something we didn't ask for. It
shouldn't be possible, so let's warn when it occurs.
This patch resolves an XXXX.
|
| |
|
|
|
| |
This is still not as soon as I'd like: a real change here will require
refactoring DirMgr::notify().
|
| |
|
|
|
|
|
|
|
|
| |
We can't change the authorities while in-flight: that would be pretty
miserable to implement.
Similarly we can't change the cache while in-flight.
Everything else should be fair game, though there are a couple of tricky
bits. I've tried to document those.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
These test our download schedules, resetting to the original state,
and storing downloaded objects.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This test uses a consensus that I've copied from
tor-netdoc/testdata. I would include it directly, but I think that
will cause trouble when it comes time to run "cargo package".
|
| |
|
|
|
| |
This will let us test the state processing code without having to
give it up-to-date directory objects.
|
| |
|
|
|
| |
(This appears to be the emerging consensus of how to handle
RUSTSEC-2020-0159.)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
Previously our code would clear the 'pending' flag on a consensus
only when a _downloaded_ md made it become usable.
Closes #199.
|
| | |
| |
| |
| |
| | |
The futures::lock::Mutex was unnecessary, since we never held it
when we were suspending.
|
| |/
|
|
| |
(One represents code that I forgot to write.)
|
| | |
|
| | |
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|