| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |_|_|_|/
|/| | | |
| | | | |
| | | | | |
This new trait is compatible with tokio-console.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Stop using MockSleepProvider in a few crates
See merge request tpo/core/arti!3424
|
| | | | | | | |
|
| | |/ / / /
| | | | |
| | | | |
| | | | | |
Part of #1885.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-dirserver: Refactor cons retrieval with JOIN
See merge request tpo/core/arti!3436
|
| | | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit refactors `get_recent_consensus()` in `tor-dirserver` to use
a single SQL statement with the power of `INNER JOIN` instead of two SQL
statements querying the store after retrieving the SHA256 hash.
The primary motivation for this is to have cleaner code.
A single SQL statement is often-times easier to comprehend, as well more
performant in execution, although that can only be proven with a
profiler and is not of much concern, given that this function is only
executed roughly every 60-90min.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Possible fix for #2232.
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Unlike assert!(matches!(..)), assert_matches prints the value of the
expression on a failure.
Probably we should use this macro more widely in the future.
This might help diagnose recurrences of #2232
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
Replace copy_interactive with futures-copy.
See merge request tpo/core/arti!3416
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change lets us avoid spawning extra tasks (due to one-direction
nature of copy_interactive), and avoid some lock contention (due to
use of AsyncReadExt::split).
Addresses part of #786.
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
```text
warning: use of deprecated associated function `assert_cmd::Command::cargo_bin`: incompatible with a custom cargo build-dir, see instead `cargo::cargo_bin_cmd!`
--> crates/arti/tests/cli_tests/hsc.rs:26:28
|
26 | let mut cmd = Command::cargo_bin("arti").unwrap();
| ^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
```
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This will replace ClientCircView in the IncomingStreamRequestFilter
APIs, which will enable us to use IncomingStreamRequestFilter for
incoming streams on the exit side too.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This commit changes various things in the dirmirror operation, namely
the use of a SystemTime wrapper type that provides saturation on both
ends.
|
| | | |
| | |
| | |
| | |
| | | |
This commit adds `CHECK` constraints to the database schema in order to
ensure all timestamps are positive.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit makes the entire database operations synchronous, thereby
replacing deadpool with r2d2.
The full motivation is outlined in a rustdoc comment at the top of the
`database` module, but it can be summarized to the fact that SQLite is
by design inherently synchronous due to directly interfacing with the
file system.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit creates a function named `mirror::operation::serve`, that
will serve as the primary entry point for the dirmirror operation.
While the function itself already contains some logic, such as querying
the timeout to wait for the next consensus, it is largely a rustdoc
design document that adds lots of comment to the `mirror::operation`
module.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit starts work in the `mirror::operation` module by
implementing the functions for calculating the `Duration` to wait from a
given `SystemTime` until the point in time when the dirmirror should
download new documents from the authorities again.
Also, this commit introduces new error types and internal helper
functions in order to fulfill this purpose better.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit does a large overhaul in the overall way on how we interact
with SQLite.
Although SQLite is a fairly straightforward tool, it has one large
caveat, namely the handling of the infamous `SQLITE_BUSY` error.
In WAL mode, the journaling mode we are using, the respective error may
occur if there is an existing write transaction while another thread is
trying to either upgrade an existing read transaction or create an
exclusive transaction at the same time. In this case, SQLite will fail
at the statement that either requires the write operation or at the
creation of the transaction respectively.
In order to tackle this problem, SQLite provides the `busy_timeout`
pragma, which allows specifying a timeout in milliseconds during which
SQLite will retry to obtain a write transaction or fail immediately.
This only works in the latter case, that is, creating a write
transaction from the beginning.
To solve this issue, we introduce two new functions:
1. `database::read_tx`
2. `database::rw_tx`
Both functions accept a database pool alongside a closure accepting a
`Transaction` and returning an arbitrary return value.
The first function creates a deferred transaction that gets rolled-back
in the end, making it suitable for read-only connections.
The latter function creates an exclusive transaction that gets committed
in the end, making it suitable for read-write connections. This also
honors the `busy_timeout`, i.e. the function retries for up to 1s to
acquire a write transaction before failing ultimately.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This commit introduces the no-op sql macro used to mark string literals
as SQL statements. It is purely semantical and serves the purpose to
quickly identify string literals as SQL statements.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This commit introduces the `mirror` module which is fairly boilerplate
at the moment. However, everything of it is very well documented using
rustdoc, thereby more or less creating a design document.
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
arti-client: Update `ARTI_CLIENT_RELEASE_DATE`
See merge request tpo/core/arti!3413
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
```bash
./maint/update-release-date
```
|
| | | | | |
|
| | | | | |
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
```bash
readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name')
for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done
```
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
arti: Revise strings that implied that we were a SOCKS-only proxy.
Closes #2225
See merge request tpo/core/arti!3398
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
Closes #2225
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
New futures-copy crate to replace copy_interactive.
See merge request tpo/core/arti!3393
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This makes sure that flushes happen correctly by relaying traffic
over a pair of buffered connections between two parties that
don't say anything until they receive a message.
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This crate's API is loosely based on some of tokio's functions,
and its implementation strategy is loosely based on
futures::io::copy.
It's designed to be generally useful outside of the arti ecosystem.
Should help with the original challenge of #786.
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
maint: Fixup features for release
See merge request tpo/core/arti!3400
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
```bash
cargo run -p fixup-features -- --exclude examples/ --exclude maint/ Cargo.toml
```
|
| | | | | |
|
| |/ / / |
|
| |/ /
| |
| |
| |
| |
| |
| | |
Apparently the http_connect refactoring made these no longer
trigger.
Closes #2226
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Implement HTTP CONNECT proxy support in Arti.
Closes #2221
See merge request tpo/core/arti!3391
|
| | | |
| | |
| | |
| | |
| | |
| | | |
We can't remove them all, since X-Tor-Stream-Isolation is recognized
by C-Tor. I've added a non-deprecated Tor-Stream-Isolation
that works indepenently.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|