Daniel Eades
c2c6a04309
run clippy on test modules
2021-09-08 17:28:40 +02:00
Daniel Eades
fb3b8b84b5
fix/silence clippy lints in test modules
2021-09-08 17:28:31 +02:00
Nick Mathewson
9cf1fa36f4
More tests in pareto.rs
2021-09-08 09:18:23 -04:00
Nick Mathewson
c2cf63c72d
Latest arti-corpora.
2021-09-07 15:51:10 -04:00
Nick Mathewson
74fa18458e
Use same defaults for abandon and close times in timeout code.
...
On torspec!40, Mike says:
I don't think there is a practical difference here. As per
Section 2.4.5, if 60 seconds is not enough and causes the
liveness test to fail due to too many timeouts, we will double
the initial timeout.
This makes our behavior the same as C tor.
2021-09-07 14:53:50 -04:00
Nick Mathewson
5d7b08993e
Stop making abandoned/successful circuit counts persistent
...
The C Tor implementation doesn't do this, and Mike says:
I think it is a reasonable enough assumption that if Tor has
restarted, this kind data is no longer fresh enough to be
accurate for this purpose. This is also only 20 circuits here,
and typical timeouts are now around 1-2 seconds or less.. So a
restarted client with a timeout that is too low for a new
internet connection will figure this out pretty quickly. I think
that is OK.
(from torspec!40)
2021-09-07 14:50:36 -04:00
Nick Mathewson
e5cb5de223
A little more test coverage in tor-circmgr::mgr
2021-09-07 14:43:55 -04:00
Nick Mathewson
6c37f78e58
tor_circmgr::mgr -- refactor some duplicate code.
2021-09-07 14:24:16 -04:00
Nick Mathewson
45e880f507
Rename pick_action to clarify that it can modify self
2021-09-07 14:14:31 -04:00
Jani Monoses
39e39cd277
Make journald an optional feature.
2021-09-07 20:56:37 +03:00
Nick Mathewson
353a16ce7e
Exclude tor-bytes fuzzing helper code from tarpaulin coverage.
2021-09-07 13:30:53 -04:00
Nick Mathewson
358b3e1ea0
Update corpus and links.
2021-09-07 12:32:50 -04:00
Nick Mathewson
f0de653af1
Fix bugs in last fuzzer code.
2021-09-07 12:29:28 -04:00
Nick Mathewson
331b64716d
Merge remote-tracking branch 'origin/mr/72'
2021-09-07 09:47:19 -04:00
Nick Mathewson
97692e3cc2
Improvements to array-of-u8 handling in tor-bytes.
...
Now that we have const generics, we can use them. We can also avoid
an extra clone in the implementation for [u8; N].
Nothing in our codebase requires that we use Reader or Writer on a
GenericArray holding anything other than u8, so I've switched back
to the more efficient implementation there.
I've added a fuzzer case for the new method, but apparently rustc nightly isn't working too
well with fuzzers for me; I'm going to try it tomorrow.
2021-09-07 09:46:54 -04:00
Jani Monoses
d5b0d76435
Do not log to journald by default
2021-09-07 15:56:17 +03:00
Jani Monoses
92d0ae26a9
Allow logging to journald.
...
Log to journald when available, add journald config option.
Separate logging setup into its own function.
2021-09-07 15:54:42 +03:00
Nick Mathewson
bd2c9fd8c1
Document every macro.
...
(The nightly version of clippy now includes macros for its
missing_docs_in_private_items lint.)
2021-09-07 08:44:47 -04:00
Nick Mathewson
37d1ec7fed
Merge remote-tracking branch 'origin/mr/70'
2021-09-07 07:55:28 -04:00
Jani Monoses
25b4421fa6
Fix typos
2021-09-07 07:52:00 +03:00
Trinity Pointard
9db9c0c90f
use a TPA runner so shm is big enough
2021-08-31 18:28:53 +02:00
Trinity Pointard
b2f4b3d38e
use /dev/shm for reproducible builds
2021-08-30 21:58:38 +02:00
Trinity Pointard
db5986ed30
use https submodule
2021-08-30 16:22:38 +02:00
Trinity Pointard
3df2fd7a54
build repro only on schedule
...
build takes about 23 minutes, it's quiet long for something that is
usefull mostly on releases
2021-08-29 16:36:28 +02:00
Trinity Pointard
33474537ab
make reproducible Windows build
...
Linux hash : c024778da162cda77869c46d162729d012a7758bee973bc83fa78c964d080903
Windows hash : e97e171740b889b7e3722b79c3763177174baac7fa34a5c3615c999298e1bc48
2021-08-29 13:48:33 +02:00
Nick Mathewson
781dc4bd64
Light refactoring and documentation improvements in proxy.rs
2021-08-27 14:22:15 -04:00
Nick Mathewson
25d058e074
Fix for CI script.
...
It looks like there was a directory here I didn't update when I
moved all the crates into crates/
2021-08-27 10:18:20 -04:00
Nick Mathewson
557a0ff40b
Move all crates into a `crates` subdirectory.
...
This will cause some pain for now, but now is really the best time
to do this kind of thing.
2021-08-27 09:53:09 -04:00
Nick Mathewson
ff5a5ed533
Document trace_filter a bit more.
2021-08-27 09:38:32 -04:00
Nick Mathewson
440cb368a9
Merge remote-tracking branch 'origin/mr/68'
2021-08-27 09:33:59 -04:00
Nick Mathewson
bec5ed5b1c
Simplify NetParameters::default()
...
Instead of loading it with expect() calls, make a new function that
returns a Result, and call expect() only once.
2021-08-27 09:17:49 -04:00
Nick Mathewson
89cf2332e2
tor-persist: Panic on lock poisoning.
...
(This is what we do for lock poisoning everywhere else.)
2021-08-27 09:12:28 -04:00
Nick Mathewson
2c0ec4e442
Tweaks on patch to add clippy::unwrap_used lint.
...
The most frequent changes are:
- Rewording messages about poisoned locks
- Correcting some error types
2021-08-27 09:05:25 -04:00
Nick Mathewson
28cc12be25
Merge remote-tracking branch 'origin/mr/67' into unwrap_used
2021-08-27 08:36:59 -04:00
Nick Mathewson
aa912a7656
Updates for reproducible build docs
2021-08-26 13:22:41 -04:00
Jani Monoses
df73dfe0c8
More flexible tracing configuration.
...
Replace the trace config file option with a more flexible trace_filter
and expose the same via the ARTI_LOG environment variable.
If ARTI_LOG is set it will override the setting in the config file.
Example:
ARTI_LOG="info,tor_proto::channel=trace" ./target/debug/arti
The syntax is described here
https://docs.rs/tracing-subscriber/0.2.20/tracing_subscriber/filter/struct.EnvFilter.html#directives
2021-08-26 17:54:06 +03:00
Trinity Pointard
46f30aad4d
address review comments
...
sha256: 7f190568fa05f71ad356dc56a7a9725a4be18e5e40d6880f469e22981a18edd7
2021-08-26 08:38:45 +02:00
S0AndS0
2333659aca
Change `unwrap` to `expect` with message
...
> Note, while `cargo fmt` doesn't complain I think this section could be
> prettier. Also it may be a good idea to have tests double-check that future
> changes don't cause a panic condition.
2021-08-25 14:12:53 -07:00
S0AndS0
b95513c5e6
Move "use_unwrap" lint from some to want list
...
And convert some `add_or_port` calls to use `SocketAddr` instead of
parse + unwrap on strings.
> Note, this last change is only for IPv4 addresses, for now, and only
> within tests.
2021-08-25 12:23:57 -07:00
Trinity Pointard
eb0522fe63
fix segfault on static bin
...
see https://github.com/rusqlite/rusqlite/issues/914
sha256: 684ebc4b8c270fc63beba185f6c54ceeb98734f13aa7aeca9b64acb33432a21c
2021-08-25 20:37:58 +02:00
Trinity Pointard
540302851e
make arti availlable as build artifact
...
and make builds reproducible
sha256sum: f141c54929a43a31b9ed6b529f6f863aace87f7406818b2f8ffe2b7a5e2803fb
2021-08-25 18:16:45 +02:00
Nick Mathewson
d4430554b0
Upgrade to new phf version.
2021-08-25 07:25:48 -04:00
S0AndS0
432fd9443e
WIP: Add the "unwrap_used" lint.
...
> Check `unwrap_used` section of Clippy documentation for details;
>
> https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
This adds the following Clippy configuration to crates;
#![deny(clippy::unwrap_used)]
**Warning** while tests and compiler do not show any errors, the submitted
changes are very much a Work In Progress and mistakes may have been made. Check
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/67
Merge Request thread for more details.
2021-08-24 15:31:31 -07:00
Nick Mathewson
729fccba0c
Move MSRV note to README
2021-08-24 15:53:43 -04:00
Nick Mathewson
e4795c57d0
Add a quick MSRV note.
2021-08-24 15:50:51 -04:00
Nick Mathewson
dd2b31b31c
Merge remote-tracking branch 'origin/mr/66'
2021-08-24 14:57:55 -04:00
Nick Mathewson
38b7f76ea3
Basic implementation for prop#332 ntor v3 backend.
...
This isn't tied into the protocol code yet, since we don't actually
have anybody to negotiate with here. We'll need some API tweaks in
order to express the sending of extended information too. For now,
I'm putting it behind a feature, but if we build this into the tor
network, the feature-gate should go away.
2021-08-24 14:43:36 -04:00
Jani Monoses
1af7f4f485
Use trailing_ones() API.
...
Rust 1.46, where this API was introduced, is old enough.
2021-08-24 19:04:30 +03:00
Jani Monoses
7d6d04ead7
Link to the relevant spec section.
2021-08-24 19:02:11 +03:00
Nick Mathewson
ab37a8cadb
Upgrade tracing-subscriber
2021-08-24 08:04:51 -04:00