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
rls
67871536f5
Use unwrap_or_default instead of unwrap_or_else(Default::default)
2021-08-23 18:41:58 +02:00
Jani Monoses
44d1271c86
Switch all uses of the log crate to the tracing.
...
Issue #74
2021-08-20 21:10:50 +03:00
Nick Mathewson
4d9ffd627c
Latest arti-corpora
2021-08-20 12:25:33 -04:00
Nick Mathewson
92501895fd
Fix a few things that the "typos" tool didn't like.
2021-08-20 12:11:28 -04:00
Nick Mathewson
d3b9c52cc0
Typo fixes.
2021-08-20 11:26:52 -04:00
Nick Mathewson
2b299430f6
Fix a comment typo
2021-08-18 13:43:41 -04:00
Nick Mathewson
6829021ccc
Light doc edits
2021-08-18 13:19:43 -04:00
Trinity Pointard
38fbdcd9ca
allow new without default for IsolationToken
2021-08-18 18:30:27 +02:00
Trinity Pointard
aad54a6969
replace IsolationToken::default with no_isolation
2021-08-18 18:07:56 +02:00
Nick Mathewson
c5be8212de
Add a split_from() API for infallible creation of Data messages.
2021-08-18 10:56:07 -04:00
Nick Mathewson
38621ea797
Remove panicking cases from tor-cell msg construction
2021-08-18 10:38:04 -04:00
Nick Mathewson
cd202f48a7
Document panics in tor-netdir::testnet.
2021-08-18 10:11:50 -04:00
Nick Mathewson
341e3937b4
Revisions based on new documented-panics lint.
...
I've tried to remove some of possible panics, and improve the
documentation for when the others might occur.
2021-08-18 09:55:39 -04:00
Nick Mathewson
ffc27999ef
add_warning.py: explain what to do when no args are given
2021-08-18 08:56:44 -04:00
Nick Mathewson
0b6f638517
Add clippy::missing_panics_doc to add_warnings.py.
2021-08-18 08:53:58 -04:00
Nick Mathewson
fe5d826942
Merge remote-tracking branch 'origin/mr/60'
2021-08-18 08:53:11 -04:00
Nick Mathewson
6895bc58f3
Merge remote-tracking branch 'origin/mr/61'
2021-08-18 08:49:19 -04:00
Nick Mathewson
9a9c8151e2
More tests for tor_netdir, plus a bugfix and a little refactoring.
...
(While messing around with test coverage on `in_same_subnet`, I
found that there was a copy-paste error where we were using v4_bits
when v6_bits would have been appropriate.)
2021-08-17 16:42:21 -04:00
S0AndS0
484cc24856
Add the "implicit_clone" lint.
...
> Check `implicit_clone` section of Clippy documentation for details;
>
> https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
This adds, and addresses, the following Clippy configuration to crates;
#![deny(clippy::implicit_clone)]
And moves related line within `maint/add_warning.py` file. My intent is to
mitigate extra edits after merging, so please let me know if I need to do this
last bit differently.
2021-08-17 11:49:39 -07:00
Nick Mathewson
a484d911a8
Make construct_netdir() return a PartialNetDir.
...
This way we can still use it even if we've removed too many
microdescriptors to make a real network.
2021-08-17 14:28:02 -04:00
Nick Mathewson
46519d87d7
Test Netdir behavior with BadExit flag.
2021-08-17 14:24:31 -04:00
Nick Mathewson
aa942f33b5
Make MicrodescBuilder implement Debug and Clone
2021-08-17 14:24:31 -04:00
Nick Mathewson
1a65448eb5
Re-work the test network generator to take a customization function.
2021-08-17 14:24:31 -04:00
Nick Mathewson
3d550b73c2
X_m tiebreaker rules are now specified
2021-08-17 09:33:42 -04:00