| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \ \ \ \ \ \ \
| |_|/ / / / / / /
|/| | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Update code to actually eliminate fslock *and* the LockFile type.
See merge request tpo/core/arti!3954
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
With dropping the fslock crate, we lost this feature flag from _its_
use of winapi.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This mainly amounts to clarifying some of our windows desiderata,
and removing the final refrences to fslock.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We can't actually open a file on wasm-unknown-unknown,
but it's more convenient for us if we don't have to conditionally
compile this crate every place that uses it.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We can do this since our msrv is now 1.89.0, where
File::lock is supported.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
There were two that relied on the the ability to have a lock
in an unlocked state. Instead, we replace those with
Option<LockFileGuard> or its equivalent.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
"Stored" is more accurate than "current".
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The blinded HsIds were used a proxy for the time periods, but it's
better to just compare the TPs directly.
Part of #966
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This will soon need to be copied into `HsDescForTp`.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We no longer consider the HsDir rate-limited if its `requery == now`.
This was caught by the new tests.
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This needs to be dropped before the next test (because the test will try
to acquire the lock inside the `Mocks` impl).
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We need to build this twice per test (because keypairs aren't `Clone`).
I find that putting boilerplate like this in a separate function makes
the tests more legible.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I'm trying to reduce the cognitive load of the test a bit, because I
will soon extend it so it will grow even more complex.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I find very long paths a bit hard to read..
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The line the comment is referring to for no longer exists.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
To ensure it's actually `Ok(())` like we expect.
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
`connect()` no longer panics, so we don't need it anymore.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Doing this means we wont't need to go through the trouble of building a
valid `Rendezvous2` cell in the tests.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is used, and is getting in the way a little bit, so I am removing
it.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
If the blinded id has changed since we cached our descriptor, it means
the TP has changed, and so we can assume the new descriptor is fresher.
Part of #966
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This enables us to tell whether a newly fetched descriptor's revision
counter can be compared with the revision counter of our cached
descriptor.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
C Tor calls this a "period", but "interval" is more accurate.
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
As David mentioned in a review comment, we don't want to refetch the
descriptor unless *all* introduction attempts have failed. See
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3925#note_3402810
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
If the client doesn't have a timely cached descriptor, then ignore
the requery period and reach out to all the HsDirs of the service.
This can, in theory, cause the client to unnecessarily query the HsDirs
when its cached descriptor has expired, but this would be a very rare
event, because the descriptor is long lived.
I'm carving out this exception to the usual rate-limiting behavior,
because I suspect having the client more eagerly reattempt the
connection will be better for UX, (by the time the client's descriptor
expires, the service, assuming it's still online, is expected to have
published a new one, so IMO it makes sense to try to fetch it).
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Because we now refetch HsDirs on introduce NACK, we need some type of
rate-limiting to prevent clients from hammering the HsDirs if the
service is offline.
This rate-limiting is per-HsDir: the client will avoid querying the
same HsDir more frequently than `hs_dir_requery_period`. The HsDir
requery info is stored in the new `DataHsDirs` map.
Part of #966
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is no longer an `&OwnedChanTarget`, so I'm renaming it accordingly.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The new `RelayIdFor` type alias I'm about to add will need to call
`RelayIdFor::{for_lookup, for_store}` with a type that isn't
`&OwnedChanTarget`, so I will need these functions to take a generic
`HasRelayIds`.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This refactors `RelayIdForExperience` into a more generic `RelayIdFor`
type.
`RelayIdFor` will serve the basis for another key type that will be used
for storing `HsDir` information.
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I find having too many of these nested `else { None }` branches makes
the overall logic harder to follow, so I changed this to use `Option<>`
combinators instead.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This avoids us replacing our cached hsdesc with one that has a lower
revision counter.
This was not a problem before, because we'd only ever fetch a new
descriptor when our cahced one expired, but now that we refetch the
descriptor on introduction NACK, we need to make sure the new descriptor
is actually more recent than the one we have.
The implementation is a bit convoluted because I had to avoid retaining
a reference to the known-timely cached `desc` so as not to anger borrowck.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This will soon need to be called from two places, unfortunately.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The `revision` field is no longer dead code.
|