| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
add unit tests for arti_client::StreamPrefs
See merge request tpo/core/arti!520
|
| |/ / /
| | |
| | |
| | |
| | |
| | | |
this change adds unit tests for the public methods of StreamPrefs. although
these are mostly "setter" style functions, the tests confirm the basic
expectations and operation.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
channel: Provide and use Sink::prepare_send_from
See merge request tpo/core/arti!514
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | |
| | | |
see https://gitlab.com/gitlab-org/gitlab/-/issues/344533
|
| |\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
async-compression v0.3.12 -> v0.3.14
Closes #473
See merge request tpo/core/arti!517
|
| |/ /
| |
| |
| |
| |
| |
| | |
This is to pick up
https://github.com/Nemo157/async-compression/pull/148#issuecomment-1128862482
Fixes https://gitlab.torproject.org/tpo/core/arti/-/issues/473
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
DirMgr: Revise error handling to better tolerate reset-able failures
Closes #412 and #439
See merge request tpo/core/arti!511
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
It does nothing that Fatal does not. Suggested by @eta in review.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We no longer have separate return paths for recoverable and fatal
errors; instead, they are merged, and distinguished based on
recovery actions.
Since it is now possible for download() to give an error that should
_not_ destroy the previous state, it takes `&mut Box<dyn DirState>`.
This change unfortunately means that we can no longer call `state =
state.advance()`, but instead have to do some mem::swap junk with
poisoned values. Any better solution would be a good thing.
Additionally, the reset() and advance() methods can no longer fail.
There is still a separate return path for reset-triggering errors;
I'm about to fix that.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This commit adds a couple of new error types that we will soon want
to distinguish, and a new way of classifying errors. These are not
yet all used.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This should be sufficient to detect several kinds of nefariousness
that we'd previously overlooked.
|
| | | |
| | |
| | |
| | | |
This should have gone in when we fixed #412
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, we did this in `advance()`, but that wasn't so great: it
meant that we could fail in the advance() code, whereas the calls to
`advance()` treated errors as fatal.
This treats failed verification as a blocking error that requires a
reset.
Fixes one aspect of #439.
|
| | | |
| | |
| | |
| | |
| | | |
Fortunately, the only error type that we need to handle blocking
errors with actually has a DirSource in it already.
|
| | | |
| | |
| | |
| | |
| | | |
(A blocking error is one that means that the current bootstrap
attempt has failed, and must be restarted.)
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously all errors were treated as non-fatal.
The add_from_* implementations don't yet behave properly;
I'll fix them in subsequent commits.
|
| | | |
| | |
| | |
| | | |
(Also, implement Display for tor_dirclient::SourceInfo).
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
Previously DocSource would tell you whether the document was from
a local store or a cache server, but it wouldn't tell you _which_
server it came from.
This change required adding DocSource as an argument to
DirState::add_from_download.
|
| |\ \
| |/
|/|
| |
| | |
Do backtrace string matching test only on some platforms.
See merge request tpo/core/arti!512
|
| | |
| |
| |
| | |
I found the previous layout *much* better. Ah well.
|
| |/
|
|
|
|
| |
"Fixes" #455 by suppressing the test.
This is !509 redux.
|
| |\
| |
| |
| |
| |
| |
| | |
Reject directory circuits early if they are too skewed.
Closes #412, #467, and #466
See merge request tpo/core/arti!501
|
| | |\
| |/
|/|
| | |
# Conflicts:
# doc/semver_status.md
|
| | |
| |
| | |
This reverts merge request !509
|
| |\ \
| | |
| | |
| | |
| | | |
Do backtrace string matching test only on Linux
See merge request tpo/core/arti!509
|
| | | |
| | |
| | |
| | | |
"Fixes" #455 by suppressing the test.
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Fix typo
See merge request tpo/core/arti!510
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | | |
Abolish arti-config, replacing with tombstone crate
See merge request tpo/core/arti!508
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Generally, change the paths that mention the crate name to go via a
module-level "use".
This involves adding tor-config as a direct dependency for a few
crates.
|
| | | | |
|