| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `blind_keypair` function should only call `blind_pubkey` when it
is present.
Also, fix the documentation: blind_keypair is a hsv3-service function,
not a hsv3-client function.
Closes #1504.
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This test is supposed to check the case where we launch a bunch
of requests but the socket is dropped before we get a response.
Different operating systems handle 'drop' a bit differently,
and schedule threads differently, so we shouldn't be surprised
at slightly different errors here.
In particular, OSX is more prone to deliver the close as a proper
"close" rather than an EPIPE or such, which previously broke
this test.
Closes #1510.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Make arrangements in tor-memquota for memory tracking to be optional
See merge request tpo/core/arti!2351
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Reported at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2351#note_3062292
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This will hopefully allow much caller code to be compiled out.
The users (IsParticipant impls) don't generally need to bother with
it - they can just ignore it.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now if we run doctests without the feature enabled, we test that a
no-op MemoryQuotaTracker works.
Those tests aren't currently run in CI, but they will be after !2350.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Wrap up most of the structures in IfEnabled.
Sadly this diff is very noisy. I experimented with macros for the
little enabled check at the start of each function but they didn't
really help.
We don't test this yet. We'll do a smoke test of this later.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We're going to bind self_ to something more complicated, in each of
these functions, and that's what all these field references etc. will
need to refer to.
Do this mechanical change first for clarity.
|
| | | | |
| | | |
| | | |
| | | | |
EnabledToken is pub because it's going to appear in public APIs.
|
| | | | | |
|
| | |/ /
| | |
| | |
| | | |
This will make some later diffs easier to read.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
rpcbase: Implement RPC method delegation support.
See merge request tpo/core/arti!2342
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(Couldn't use Deref here, since we needed to get an Arc.)
Only one delegation target per object is permitted for now.
This will help with #1523.
|
| | |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds the basic TorRelayConfig object along a builder in order to
create a TorRelay object.
At this commit, the configuration object only holds a "StorageConfig"
which is a simple starting point which will allow to expand to a KeyMgr
and then a ChanMgr along more configuration.
There is also no custom Error for the crate at this point.
Fixes #1534
Signed-off-by: David Goulet <[email protected]>
|
| | |/
|/|
| |
| |
| |
| | |
This commit adds the display_recovery and
display_problem tests. Line coverage is increased from
0 to 96.97 percent.
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-proto: Encapsulate flow-control
See merge request tpo/core/arti!2340
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As clippy points out otherwise, this no longer actually loops.
Since the iterator already guarantees that the messages it produces
are ready to send with respect to flow control, and we've already
validated that we can send with respect to the circuit window,
the loop, we can always handle the first item from the iterator.
i.e. this changes a `while let` to an `if let`.
|
| | | |
| | |
| | |
| | | |
This is no longer needed. Removing it shouldn't change any behavior.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we've exhausted circuit-level SENDME window, iterating over streams
is likely to be a waste of CPU. Theoretically we might be able to send
some messages that don't count towards windows, but on balance it
doesn't seem worth it.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This prevents us from having to iterate over streams blocked on flow
control inside the circuit reactor, and potentially allows further
simplification.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Encapsulate flow-control into a separate object that partially abstracts
away the difference between window-based (legacy) flow control and
xon-based (prop324) flow control.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since we no longer have an outbound queue for each hop, and instead
return an error here if there is insufficient circuit window to send a
message, there's no need to pre-check whether we have sufficient window.
If there's insufficient circuit window, we'll still return an error slightly
later, after failing to take from the circuit window.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
We use `debug!` (tracing logging) everywhere else. Use it here too.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Each queue has two `Participation`s, not just one.
This didn't matter in the `lifecycle` test, because one of the two
Participations was never touched since it was cloned, and a fresh
clone starts out with a cache of zero.
But we're about to reuse this code in a context where both
Participations end up with a cache.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059928
|
| | | |
| | |
| | |
| | | |
It's not a unit. It's `MpscUnboundedSpec` that's a unit
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
And MpscUnboundedSpec too.
As discussed in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059516
|
| | | |
| | |
| | |
| | |
| | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059543
|
| | | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059520
|
| | | |
| | |
| | |
| | |
| | | |
Fixes the livelock possibility discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059519
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will let us call mpsc::Receiver::close.
We have it take Pin, even though we don't really want that for our use
case, because if you use StreamUnobtrusivePeeker with a non-Unpin
stream you'll ant that.
|
| | | |
| | |
| | |
| | |
| | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059518
|
| | | |
| | |
| | |
| | |
| | | |
Requested by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059517
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
We'll use this in a moment.
|
| | | |
| | |
| | |
| | |
| | | |
We're going to want the one for Participation - it saves us an
annoying Option. Let's provide the one for WeakAccount too.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
tor-circmg: Make `GuardMgr` mandatory
See merge request tpo/core/arti!2339
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `path::exitpath::test::by_ports` test sometimes failed now that the
test is using a `GuardMgr` since `select_guard`, when given a chosen
exit, only ensures that the guard and chosen exit are not in the same
family. It does not ensure that the guard and exit do not share an
extended family. This commit relaxes an assertion in the test.
```text
thread 'path::exitpath::test::by_ports' panicked at crates/tor-circmgr/src/path/exitpath.rs:295:9:
assertion failed: r1.can_share_circuit(r3, subnet_config)
```
This "chosen exit" functionality isn't actually being used anywhere
(`ExitPathBuilderInner::ChosenExit` is only ever constructed in tests).
|