Commit Graph

2020 Commits

Author SHA1 Message Date
Arturo Marquez 34e3438d3b
Change target 2022-01-06 19:57:34 -06:00
Arturo Marquez 3c853126de
Add `coverage` job
Following instructions at:

`https://www.collabora.com/news-and-blog/blog/2021/03/24/rust-integrating-llvm-source-base-code-coverage-with-gitlab/`
2022-01-06 14:05:17 -06:00
eta 40f96ad932 Merge branch 'remove_unused_rngs' into 'main'
Remove a bunch of unused RNGs

See merge request tpo/core/arti!213
2022-01-06 16:17:37 +00:00
eta f08854bc69 Merge branch 'main' into 'remove_unused_rngs'
# Conflicts:
#   crates/tor-circmgr/src/build.rs
2022-01-06 15:48:42 +00:00
eta ea41fa3346 Merge branch 'refactor/unwrap-or-default' into 'main'
prefer 'unwrap_or_default' to manual constructor

See merge request tpo/core/arti!215
2022-01-06 15:36:12 +00:00
Nick Mathewson 214ac17eed Move a comment to the right place. 2022-01-06 09:05:08 -05:00
Nick Mathewson 5c3300867d Merge remote-tracking branch 'origin/mr/214' 2022-01-06 09:02:09 -05:00
Nick Mathewson 3a456100a8 Merge remote-tracking branch 'origin/mr/217' 2022-01-06 08:30:25 -05:00
Nick Mathewson c15168be61 Merge remote-tracking branch 'origin/mr/212' 2022-01-06 08:28:13 -05:00
Ian Jackson 1e70d56737 arti-bench: Remove a FIXME by saying it's OK for this program to panic 2022-01-06 11:58:01 +00:00
Daniel Eades d68e934716 prefer 'unwrap_or_default' to manual constructor 2022-01-01 19:14:29 +00:00
Daniel Eades 592642a9e6 extend lints to include 'clippy::all' 2021-12-28 20:15:40 +00:00
Neel Chauhan d72d37ff4a Remove a bunch of unused RNGs 2021-12-25 18:44:55 -08:00
Neel Chauhan 383843f0d7 tor-circmgr: Don't clone parameters in create_chantarget() 2021-12-25 17:22:38 -08:00
Neel Chauhan 7dba3d8c51 tor-proto: In begin_stream_impl(), if number of hops is zero, don't continue 2021-12-25 16:01:22 -08:00
eta 12045cb454 Merge branch 'exclude-arti-bench-coverage' into 'main'
Exclude arti-bench from coverage.

See merge request tpo/core/arti!210
2021-12-21 21:36:28 +00:00
eta 3054fc30f6 Merge branch 'ticket_256' into 'main'
Only count timeouts when we've seen net activity recently.

Closes #256

See merge request tpo/core/arti!207
2021-12-21 19:07:37 +00:00
eta 0be9558629 Merge branch 'arti-bench-usability' into 'main'
Usability improvements to arti-bench.sh script

See merge request tpo/core/arti!209
2021-12-21 18:16:37 +00:00
Nick Mathewson 3f85e69a76 Exclude arti-bench from coverage.
This program is itself for testing; we don't strongly care how much
coverage it has on its own.
2021-12-21 12:29:40 -05:00
Nick Mathewson 032b0d2575 arti-bench.sh: Handle the case where CHUTNEY_PATH is set.
Previously, this case would cause arti-bench to hang forever, trying
to bootstrap against one network while another network was running.
2021-12-21 09:54:16 -05:00
Nick Mathewson ba6828d9fe arti-bench.sh: set $RUST_LOG if it isn't set.
(An empty $RUST_LOG no output, and confuse the nickm^Wuser.)
2021-12-21 09:54:16 -05:00
Nick Mathewson 584e46d619 tests/chutney/setup.sh: Fix a shellcheck warning.
shellcheck doesn't like `export FOO="$(bar)"` as one line, since it
has the possibility of missing errors.
2021-12-21 09:54:16 -05:00
Nick Mathewson efe74e8c9b Only count timeouts when we've seen net activity.
This closes arti#256.  It makes our behavior match Tor's more closely,
though it has a simpler implementation than Tor. I think that the extra
complexity in Tor's logic is because we used to record timeouts in
the histogram as well as in the success/failure log.
2021-12-20 15:34:17 -05:00
Nick Mathewson 09d0c20c94 Merge branch 'eta/instant-checked-add' into 'main'
preemptive.rs: Use Instant::checked_add instead of raw subtraction

See merge request tpo/core/arti!206
2021-12-20 20:07:59 +00:00
eta 091065454e preemptive.rs: Use Instant::checked_add instead of raw subtraction
The implementations of `Add` / `Sub` (et al.) on `std::time::Instant`
can panic if the underlying OS structure can't represent the result
(like arti#266). Use Instant::checked_add and print a warning instead,
to prevent panicking.

Also, we now add instead of subtracting; I suspect it's reasonable that
you might not be able to go backward past the first `Instant` created on
some platforms, but going *forward* should probably work?
2021-12-20 19:27:55 +00:00
Nick Mathewson d82d70939e Update CONTRIBUTING to mention FIXME, not XXX. 2021-12-20 13:52:13 -05:00
eta 0cdf65c256 Merge branch 'refactor/must-use-self' into 'main'
address clippy's latest lint

See merge request tpo/core/arti!205
2021-12-20 18:38:18 +00:00
Nick Mathewson 6303a71d58 tor-proto: Replace XXXs with references to arti#269
These will require thought; should we ignore them, act on them, or
continue to  treat them as internal errors?
2021-12-20 10:56:24 -05:00
Nick Mathewson 26fc8073f2 Remove XXXs from tor-circmgr::mgr
IIUC, these anticipatd a need to store min_exit_circs_per_port in
CircMgr.  But the current design, where it goes into preemptive.rs and
thence to usage, seems to work fine.
2021-12-20 10:46:13 -05:00
Nick Mathewson f73f6a4e80 arti-client: Change an XXXX to a TODO.
We _do_ reject bad hostnames: just not where I once thought we might.
We need to decide if the current behavior is what we want (and I think
it is, probably?).
2021-12-20 10:02:24 -05:00
Nick Mathewson a2afb29806 Change an UTF-8 XXX to a TODO.
We're assuming that prop285 is accepted in some form.
2021-12-20 09:54:41 -05:00
Nick Mathewson 8cf143217e tor-netdoc: Change an XXX to a TODO.
Our behavior in handling not-yet-valid router descriptors doesn't match
the C Tor implementation, but it's not a big deal:
we don't currently use router descriptors at all.
2021-12-20 09:46:56 -05:00
Nick Mathewson 6299ca70b4 tor-netdoc: Use a more correct error type
If we fail to convert a curve25519 key to an ed25519 key for checking
the onion-key crosscert, don't call that an internal error: it means
that something is wrong with the provided ntor key.
2021-12-20 08:58:30 -05:00
Nick Mathewson 92e53bff62 Remove an XXXX about ed25519 signatures.
As of tor-spec commit 01122c5bd7d2f0f, the spec is no longer ambiguous
on this point.
2021-12-20 08:53:42 -05:00
Daniel Eades 9b51a52b53 address clippy's latest lint 2021-12-20 09:46:41 +00:00
eta 0577eac0bf Merge branch 'one_metahandler_at_a_time' into 'main'
tor-proto: Allow one meta-cell handler at a time.

See merge request tpo/core/arti!204
2021-12-16 21:43:33 +00:00
Nick Mathewson 64257a10fa tor-proto: Allow one meta-cell handler at a time.
Previously the code would let us try to install a meta-cell handler
before the old one was done, leading to possible confusion.
2021-12-16 16:01:50 -05:00
eta b01f695f53 Merge branch 'arti-bench' into 'main'
Introduce an experimental benchmarking utility for Arti

See merge request tpo/core/arti!195
2021-12-16 20:47:47 +00:00
eta 7921a88f8d Merge branch 'fallbackdirs-15-12-2021' into 'main'
fallbackdir: Update list generated on December 15, 2021

See merge request tpo/core/arti!202
2021-12-16 20:30:16 +00:00
eta 6a12f388f2 Merge branch 'ct_sendme_tags' into 'main'
tor-proto: use const-time eq on sendme tags.

See merge request tpo/core/arti!201
2021-12-16 20:29:01 +00:00
eta 53d084fdb6 Merge branch 'half_stream_connected_ok' into 'main'
tor-proto: set HalfStream::connected_ok right.

See merge request tpo/core/arti!203
2021-12-16 20:28:24 +00:00
Tor CI Release e17359bc18 fallbackdir: Update list generated on December 15, 2021
Signed-off-by: Tor CI Release <no-email@torproject.org>
2021-12-16 11:52:22 -05:00
Nick Mathewson 51c4ca73f2 tor-proto: set HalfStream::connected_ok right.
Previously we'd always set it to true, allowing one CONNECTED per
half-closed stream even if the stream had already received a
CONNECTED  cell.

This resolves an XXXX.
2021-12-16 11:48:39 -05:00
Nick Mathewson a09fbc9f27 tor-proto: replace a streammap XXXX with a ticket. 2021-12-16 11:33:50 -05:00
eta 06a94288ca Introduce an experimental benchmarking utility for Arti
The new `arti-bench` crate does a simple end-to-end benchmark test
embedding Arti: it generates some random data (of configurable amount,
depending on command-line parameters), and then sends said data back and
forth via Arti (which should be configured to use a local Chutney
network).

Additionally, the benchmark can also be run via a local SOCKS5 server
(in order to benchmark the performance via a local Chutney node, for
comparison).

The `tests/chutney/arti-bench.sh` sets up and tears down Chutney as
required to make this work.

This is very much a first cut; there are many things that should
eventually get added, such as support for multiple connections, JSON
output capabilities, running multiple tests, ...
2021-12-16 16:12:59 +00:00
Nick Mathewson d794355b07 tor-proto: use const-time eq on sendme tags.
There's no known attack here, but it's best practice to always compare
digests using a constant-time comparison operator.

This resolves an XXXX comment.
2021-12-16 11:06:30 -05:00
Nick Mathewson e2dd418c84 tor-proto: document an infelicitous behavior.
This was an XXXX before. Now it explains why the behavior is safe for
now, but maybe not forever.
2021-12-16 10:39:00 -05:00
Nick Mathewson de45ee41a4 tor-cell: replace an XXXX with a TODO.
The original comment was a gnomic question about what to box; the real
issue is that we want to avoid copying data in our critical path.
2021-12-16 10:29:30 -05:00
Nick Mathewson 9f6e09b4d1 tor-dirmgr: retain cache_usage on reset.
Previously we didn't retain the value of our cache_usage field when
calling reset() from GetMicrodescsState.

This resolves an XXXX comment.
2021-12-16 09:31:23 -05:00
eta 49be908feb Merge branch 'more_destroyreason' into 'main'
Extend trace messages for destroy/truncated reasons.

See merge request tpo/core/arti!200
2021-12-16 14:29:38 +00:00