| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
| |
In answer to
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/632#note_2822107
I think this is subtle enough that it deserves a comment.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There are going to be some tasks (well, right away, one task) which
will want to go away when the sender is dropped.
The docs in postage are silent, but postage::watch::Sender does not
have a Drop impl so I don't think we can rely on the Receivers getting
None from their Stream impl.
So we're going to have the watch send Options, which are None only
when the sender is dropped.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We need to replace the AtomicBool for dormant mode with something that
can wake up tasks. postage::watch is the right shape.
But we want to be able to update it but suppress no-op updates.
(There is going to be a call site where no-op updates can occur.)
In the absence of a suitable upstream method as requested here
https://github.com/austinjones/postage-rs/issues/56
we introduce this facility via an extension trait.
|
| |\
| |
| |
| |
| | |
Clean-ups in circmgr errors
See merge request tpo/core/arti!625
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This interface allows using FilterCount with functions that expect
predicates rather than iterator chains.
I'm about to use it to get meaningful FilterCount results in the
path-selection code in circmgr.
|
| |/
|
|
| |
This type must have been renamed, I guess.
|
| | |
|
| |
|
|
|
|
| |
This is a helper rather than a Display implementation because it
isn't the only logical way to display these values. (In fact,
without context, it isn't even the _most_ logical way)
|
| |
|
|
|
|
|
| |
This is going to make it simpler to write the code in guardmgr (and
later in circmgr) that keeps track of how many relays were rejected
for what reason. The latter, in turn, should improve error messages
when we're unable to pick a guard or a path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were done with the following commands:
```
cargo set-version -p tor-basic-utils --bump patch
cargo set-version -p fs-mistrust --bump minor
cargo set-version -p tor-error --bump patch
cargo set-version -p tor-config --bump patch
cargo set-version -p tor-units --bump patch
cargo set-version -p tor-rtcompat --bump minor
cargo set-version -p tor-llcrypto --bump patch
cargo set-version -p tor-bytes --bump minor
cargo set-version -p tor-socksproto --bump minor
cargo set-version -p tor-cert --bump minor
cargo set-version -p tor-cell --bump minor
cargo set-version -p tor-proto --bump minor
cargo set-version -p tor-netdoc --bump patch
cargo set-version -p tor-netdir --bump minor
cargo set-version -p tor-persist --bump patch
cargo set-version -p tor-chanmgr --bump minor
cargo set-version -p tor-guardmgr --bump minor
cargo set-version -p tor-circmgr --bump patch
cargo set-version -p tor-dirclient --bump patch
cargo set-version -p tor-dirmgr --bump minor
cargo set-version -p arti-client --bump patch
cargo set-version -p arti --bump minor
cargo set-version -p arti-bench --bump minor
cargo set-version -p arti-testing --bump minor
```
|
| |
|
|
|
|
| |
Found these by disabling the nightly dbg macro special case. Now, we
have a mechanism for globally adding suppressions to tests, we can use
that instead.
|
| |
|
|
| |
Update all lint blocks
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
This only affects uses of thread_rng(), and affects them all more or
less indiscriminately. One test does not work with
ARTI_TEST_PRNG=deterministic; the next commit will fix it.
|
| |\|
| |
| |
| |
| | |
New facility for deterministic and reproducible test PRNGs.
See merge request tpo/core/arti!561
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new `testing_rng()` function is meant as a replacement for
thread_rng() for use in unit tests. By default, it uses a randomly
seeded RNG, but prints the seed before the test so that you can
reproduce any failures that occur. You can override this via the
environment to use a previous seed, or by using a deterministic
seed for all your tests.
Backend for #486.
|
| | |
| |
| |
| |
| | |
From running add_warning, with manual picking of the right
hunks/lines.
|
| |/
|
|
|
|
| |
This was the result of:
maint/add_warning crates/*/src/{lib,main}.rs
and then manually curating the results.
|
| |
|
|
|
|
| |
Utilize cargo-sort: https://github.com/DevinR528/cargo-sort
Signed-off-by: Orhun Parmaksız <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I followed the following procedure to make these changes:
* I used maint/changed_crates to find out which crates had changed
since 0.3.0.
* I used grep and maint/list_crates to sort those crates in
topological (dependency) order.
* I looked through semver_status to find which crates were listed as
having semver-relevant changes (new APIs and breaking changes).
* I scanned through the git logs of the crates with no
semver-relevant changes listed to confirm that, indeed, they had
no changes. For those crates, I incremented their patch-level
version _without_ changing the version that other crates depend on.
* I scanned through the git logs of the crates with no
semver-relevant changes listed to confirm that, indeed, they had
no obvious breaking changes.
* I treated all crates that depend on `arti` and/or `arti-client` as
having breaking changes.
* I identified crates that depend on crates that have changed, even
if they have not changed themselves, and identified them as having
a non-breaking change.
* For all of the crates, I used `cargo set-version -p $CRATE --bump
$STATUS` (where `STATUS` is `patch` or `minor`) to update the
versions, and the depended-upon versions.
|
| | |
|
| |
|
|
| |
These are warnings that we've decided it's okay to suppress elsewhere.
|
| | |
|
| |
|
|
| |
I think this is worse code, but it's not *significantly* worse.
|
| |
|
|
| |
I intend to reintroduce this in its own MR.
|
| | |
|
| |
|
|
| |
So we can change unwrap to expect, which makes this too long to repeat.
|
| |
|
|
| |
Apropos review.
|
| |
|
|
|
|
| |
When I added these tests, they didn't find any bugs in my own
implementation, but I did find a bug in futures::future::unfold.
See the in-code comment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a general-purpose implementation of the ad-hoc approach
currently taken in (eg) crates/tor-proto/src/channel/reactor.rs,
with an API intended to defned against the more obvious mistakes.
This allows us to separate the two concerns: the channel reactor can
focus on handling channel cells and control messages and is over 2.5x
shorter.
The complexity of the manual sink implementation, and the machinery
needed to avoid having to suspend while holding an item, are dealt
with separately. That separate implemenation now has proper
documentation. (Tests are in the nest commit to avoid this one being
even more unwieldy.)
We use `extend` to define this as an extension trait. A competitor is
`ext` but in my personal projects I have found `extend` slightly
better.
|
| |
|
|
| |
* Except for safelog and fs-mistrust, which are new.
|
| |\
| |
| |
| |
| |
| | |
# Conflicts:
# crates/tor-config/Cargo.toml
# crates/tor-dirmgr/src/state.rs
# doc/semver_status.md
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798026
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an automated change made with a perl one-liner and verified
with grep -L and grep -l.
Some warnings are introduced with this change; they will be removed
in subsequent commits.
See arti#208 for older discussion on this issue.
|
| |/
|
|
|
|
|
| |
This change was made automatically with a perl one-liner, and
confirmed with `grep -L`.
The `rust-version` field itself was introduced in 1.56.0.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously the code would do stuff like
```
schedule = RetrySchedule::new(INITIAL_DELAY);
```
which is needlessly verbose, since the schedule already keeps track
of its initial delay.
|
| |
|
|
|
|
|
|
| |
Not all of these strictly need to be bumped to 0.2.0; many could go
to 0.1.1 instead. But since everything at the tor-rtcompat and
higher layers has had breaking API changes, it seems not so useful
to distinguish. (It seems unlikely that anybody at this stage is
depending on e.g. tor-protover but not arti-client.)
|
| | |
|
| |
|
|
| |
Noticed this while reviewing !426
|
| | |
|
| |
|
|
| |
Instead, check initial_delay in dirmgr directly.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
This is a separate commit to avoid putting format changes in the
next commit.
|
| |
|
|
|
|
| |
We have upstreamed this code.
This reverts commit 6193c9d9742d1d19a45a0ee1c383858201304912.
|
| |
|
|
|
| |
This will be used to allow our config *builder* structs to be
Deserialize.
|