summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge branch 'streamprefs-test' into 'main'eta2022-05-231-0/+77
|\ \ \ \ | |/ / / |/| | | | | | | | | | | add unit tests for arti_client::StreamPrefs See merge request tpo/core/arti!520
| * | | add unit tests for arti_client::StreamPrefsmichael mccune2022-05-231-0/+77
|/ / / | | | | | | | | | | | | | | | 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.
* | | Merge branch 'channel' into 'main'Ian Jackson2022-05-235-75/+569
|\ \ \ | | | | | | | | | | | | | | | | channel: Provide and use Sink::prepare_send_from See merge request tpo/core/arti!514
| * | | prepare_send_from: clippy: Replace some or_else with orIan Jackson2022-05-231-2/+2
| | | |
| * | | prepare_send_from: clippy: Have dprintln explicitly return ()Ian Jackson2022-05-231-1/+1
| | | |
| * | | prepare_send_from: clippy: Avoid a lintIan Jackson2022-05-231-2/+1
| | | | | | | | | | | | | | | | I think this is worse code, but it's not *significantly* worse.
| * | | prepare_send_from: clippy: Add missing docsIan Jackson2022-05-231-11/+18
| | | | | | | | | | | | | | | | I intend to reintroduce this in its own MR.
| * | | prepare_send_from: clippy: Replace two unwrapsIan Jackson2022-05-231-2/+6
| | | |
| * | | prepare_send_from: Break out get_output! macroIan Jackson2022-05-231-2/+11
| | | | | | | | | | | | | | | | So we can change unwrap to expect, which makes this too long to repeat.
| * | | prepare_send_from: docs and comments improvementsIan Jackson2022-05-231-13/+115
| | | | | | | | | | | | | | | | Apropos review.
| * | | prepare_send_from: Add testsIan Jackson2022-05-231-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | channel: Provide and use Sink::prepare_send_fromIan Jackson2022-05-235-75/+326
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Update Gitlab CI config for Gitlab 14.10eta2022-05-231-1/+3
| | | | | | | | | see https://gitlab.com/gitlab-org/gitlab/-/issues/344533
* | | Merge branch 'update-async-compression' into 'main'eta2022-05-231-8/+8
|\ \ \ | |/ / |/| | | | | | | | | | | | | | async-compression v0.3.12 -> v0.3.14 Closes #473 See merge request tpo/core/arti!517
| * | async-compression v0.3.12 -> v0.3.14Jim Newsome2022-05-201-8/+8
|/ / | | | | | | | | | | | | 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
* | Merge branch 'cert_dl_recovery_v3' into 'main'eta2022-05-197-246/+632
|\ \ | | | | | | | | | | | | | | | | | | DirMgr: Revise error handling to better tolerate reset-able failures Closes #412 and #439 See merge request tpo/core/arti!511
| * | Simplify advance and reset functions with mem::replace.Nick Mathewson2022-05-191-8/+4
| | |
| * | Explain why we call update_status unconditionally.Nick Mathewson2022-05-191-0/+3
| | |
| * | Remove BootstrapAction::ImpossibleNick Mathewson2022-05-193-7/+4
| | | | | | | | | | | | It does nothing that Fatal does not. Suggested by @eta in review.
| * | Fix compilation with Rust 1.56.Nick Mathewson2022-05-171-3/+2
| | |
| * | DirMgr: Remove blocking_error return path.Nick Mathewson2022-05-172-53/+29
| | |
| * | DirMgr: Unify error return pathsNick Mathewson2022-05-173-170/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | DirMgr: Remove special handling of "changed" booleanNick Mathewson2022-05-172-84/+69
| | |
| * | DirMgr: Start refactoring error handling.Nick Mathewson2022-05-172-3/+96
| | | | | | | | | | | | | | | | | | 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.
| * | Fix a portability issue with Rust 1.56Nick Mathewson2022-05-161-1/+1
| | |
| * | Give an error if the cache violates If-Modified-Since.Nick Mathewson2022-05-161-7/+24
| | | | | | | | | | | | | | | This should be sufficient to detect several kinds of nefariousness that we'd previously overlooked.
| * | Add missing extend_tolerance to add_consensus_text.Nick Mathewson2022-05-161-0/+1
| | | | | | | | | | | | This should have gone in when we fixed #412
| * | DirMgr: Blame the correct cache for consensus validation failureNick Mathewson2022-05-161-2/+15
| | |
| * | Move consensus signature verification to add-document code.Nick Mathewson2022-05-161-22/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | On a blocking error, blame the appropriate directory cacheNick Mathewson2022-05-162-0/+22
| | | | | | | | | | | | | | | Fortunately, the only error type that we need to handle blocking errors with actually has a DirSource in it already.
| * | DirMgr: Add a way for a state to report a blocking error.Nick Mathewson2022-05-162-7/+26
| | | | | | | | | | | | | | | (A blocking error is one that means that the current bootstrap attempt has failed, and must be restarted.)
| * | Implement nonfatal errors in add_from_*Nick Mathewson2022-05-161-52/+91
| | |
| * | DirMgr: Let add_from_* distinguish non-fatal errorsNick Mathewson2022-05-162-54/+79
| | | | | | | | | | | | | | | | | | | | | Previously all errors were treated as non-fatal. The add_from_* implementations don't yet behave properly; I'll fix them in subsequent commits.
| * | DirMgr: Improve display for DocSourceNick Mathewson2022-05-164-4/+15
| | | | | | | | | | | | (Also, implement Display for tor_dirclient::SourceInfo).
| * | DirMgr: make DocSource useful by having it include dirserver info.Nick Mathewson2022-05-163-22/+47
| |/ | | | | | | | | | | | | | | | | 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.
* | Merge branch 'backtrace' into 'main'Nick Mathewson2022-05-171-0/+15
|\ \ | |/ |/| | | | | Do backtrace string matching test only on some platforms. See merge request tpo/core/arti!512
| * Placate rustfmtIan Jackson2022-05-171-5/+1
| | | | | | | | I found the previous layout *much* better. Ah well.
| * Do backtrace string matching test only on some platforms.Ian Jackson2022-05-171-0/+19
|/ | | | | | "Fixes" #455 by suppressing the test. This is !509 redux.
* Merge branch 'ticket_466' into 'main'Nick Mathewson2022-05-166-11/+121
|\ | | | | | | | | | | | | Reject directory circuits early if they are too skewed. Closes #412, #467, and #466 See merge request tpo/core/arti!501
| * Merge branch 'main' into 'ticket_466'Nick Mathewson2022-05-1641-559/+694
| |\ | |/ |/| | | # Conflicts: # doc/semver_status.md
* | Revert "Merge branch 'backtrace' into 'main'"eta2022-05-161-6/+0
| | | | | | This reverts merge request !509
* | Merge branch 'backtrace' into 'main'eta2022-05-161-0/+6
|\ \ | | | | | | | | | | | | Do backtrace string matching test only on Linux See merge request tpo/core/arti!509
| * | Do backtrace string matching test only on LinuxIan Jackson2022-05-161-0/+6
| | | | | | | | | | | | "Fixes" #455 by suppressing the test.
* | | Merge branch 'typos' into 'main'Nick Mathewson2022-05-141-1/+1
|\ \ \ | |/ / |/| | | | | | | | Fix typo See merge request tpo/core/arti!510
| * | Fix typoDimitris Apostolou2022-05-141-1/+1
|/ /
* | Merge branch 'arti-config-2' into 'main'Nick Mathewson2022-05-1317-349/+291
|\ \ | | | | | | | | | | | | Abolish arti-config, replacing with tombstone crate See merge request tpo/core/arti!508
| * | Document semver changesIan Jackson2022-05-131-0/+2
| | |
| * | Abolish arti-config, replacing with tombstone crateIan Jackson2022-05-137-100/+8
| | |
| * | arti-config abolition: Change references to use tor_configIan Jackson2022-05-138-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | tor-config: Provide useful documentation for sources moduleIan Jackson2022-05-131-0/+14
| | |