Nick Mathewson
aed9572c03
Add a few tracing calls to tor-guardmgr.
2021-10-08 09:14:36 -04:00
Nick Mathewson
29112e0729
Update the tor-guardmgr README.md.
2021-10-07 15:36:26 -04:00
Nick Mathewson
0ff56a3138
Resolve small issues and XXXX/TODO comments in GuardMgr.
...
By the time I merge this, most of the comments should have tickets
to go with them.
2021-10-07 14:03:21 -04:00
Nick Mathewson
00acc5c5b8
Tests for top-level GuardMgr.
...
Also, refactor our message handling to be more like the tor_proto
reactors. The previous code had a bug where, once the stream of
events was exhausted, we wouldn't actually get any more
notifications.
2021-10-07 12:09:29 -04:00
Nick Mathewson
7ef33b7afa
Tests for tor_guardmgr::sample.
2021-10-07 10:45:42 -04:00
Nick Mathewson
0710fb2102
Initial tests for tor_guardmgr::guard
2021-10-07 10:45:42 -04:00
Nick Mathewson
6cdce3dee6
Implement persistent state for guard mgr
2021-10-07 10:45:42 -04:00
Nick Mathewson
0779923d64
Initial backend implementation for guard node manager.
...
There are some missing parts here (like persistence and tests)
and some incorrect parts (I am 90% sure that the "exploratory
circuit" flag is bogus). Also it is not integrated with the circuit
manager code.
2021-10-07 10:45:42 -04:00
Nick Mathewson
520396bd2d
Update total_weight to use UncheckedRelay.
2021-10-07 09:30:08 -04:00
Nick Mathewson
2b0ecec041
Make UncheckedRelay public in tor-netdir.
...
This will let us provide a couple of better APIs for use in tor-guardmgr
2021-10-07 09:30:08 -04:00
Nick Mathewson
565b396b86
Add From<u64> for RelayWeight.
2021-10-07 09:30:08 -04:00
Nick Mathewson
7e68883a27
Change tor-persist to use json instead of toml.
...
The limitations with toml seemed to be reaching a head, and I wasn't
able to refactor the guardmgr code enough to actually have its state
be serializable as toml. Json's limitations are much narrower.
2021-10-07 09:30:08 -04:00
Nick Mathewson
6c6785c04d
Fix a type inference complaint in tor-dirmgr's tests.
...
I have no idea why this just turned up now.
2021-10-07 09:30:08 -04:00
Trinity Pointard
9c275a04ee
update ctrlc and der
...
ctrlc had rustsec issues, der was yanked
2021-10-06 23:55:08 +02:00
Nick Mathewson
150270f904
Update cargo.lock again.
2021-10-05 08:21:34 -04:00
Nick Mathewson
7bdb6e7633
Update cargo.lock; upgrade to newer rusqlite.
2021-10-05 08:10:04 -04:00
Nick Mathewson
10bedd925c
Use subtle and some refactoring to remove branches in ntor
...
Closes #163
2021-10-01 12:27:24 -04:00
Nick Mathewson
1d64e88d67
Implement ConstantTimeEq for key ids.
2021-10-01 10:53:18 -04:00
Nick Mathewson
0c0a057bef
In CI, *temporarily* ignore RUSTSEC-2021-0119 in nix crate.
...
The affected API (getgrouplist) isn't one that we use, directly or
transitively. We can't just upgrade immediately, since the ctrlc
crate is currently stuck on the older version of nix.
2021-10-01 09:24:38 -04:00
Jani Monoses
f7e114c833
Allow building tor-persist for WASM
2021-10-01 14:22:31 +03:00
Nick Mathewson
83b03a20a3
Clarify why we use a dyn pointer for StorageHandle.
2021-09-30 15:36:11 -04:00
Nick Mathewson
f1d6779218
Use StorageHandle in tor_circmgr.
2021-09-30 15:36:11 -04:00
Nick Mathewson
37bec4997d
remote unused tor-persist/src/config.rs
2021-09-30 15:36:11 -04:00
Nick Mathewson
37040d06d1
Add tests for tor-persist object-safe wrapper.
2021-09-30 15:36:11 -04:00
Nick Mathewson
fa9e64e27b
tor-persist: Add a testing-only state manager that doesn't use disk
2021-09-30 15:36:11 -04:00
Nick Mathewson
eef06efea6
Move FsStatemgr to an inner module.
2021-09-30 15:36:11 -04:00
Nick Mathewson
f3d29b5006
Add an object-safe wrapper for StateMgr.
...
This is an attempt to uplift the trick that tor-circgmr is currently
using, since we'll want it in tor-guardmgr too.
2021-09-30 15:36:11 -04:00
Nick Mathewson
ed44d7d968
Ensure pick_n_relays returns relays in random order.
...
(Also, fix a test)
2021-09-29 13:49:07 -04:00
Nick Mathewson
932924b733
tor-netdir: Add RelayWeight type and accessors.
...
I'm not thrilled with this code, but I think it's needed to
implement guards correctly.
2021-09-29 13:49:07 -04:00
Nick Mathewson
9114a9ed6e
tor_netdir::testnet: Correct a documentation error.
2021-09-29 13:49:07 -04:00
Nick Mathewson
d6e5d1b5a1
tor-netdir: Add some accessor that guardmgr will need.
...
We'll need `id_pair_is_listed()` to track whether a sampled guard is
(or is not) listed in the consensus.
We'll need `missing_descriptor_for` to see whether we've downloaded
enough microdescs to use a consensus.
2021-09-29 13:49:07 -04:00
Nick Mathewson
d78b25f2b0
Typo fix in comment.
2021-09-29 13:49:07 -04:00
Trinity Pointard
e05a2ae51d
add basic integration test
2021-09-27 17:35:32 +02:00
Nick Mathewson
5e196f7f3f
Run cargo update on other dependencies.
2021-09-25 15:46:32 -04:00
Trinity Pointard
954395573a
update fslock to compile android
2021-09-25 12:01:45 +02:00
Nick Mathewson
34ad08c1db
Run cargo upate.
2021-09-23 08:27:48 -04:00
Nick Mathewson
b51e2ff5b3
Upgrade memmap2, directories, and dirs dependencies.
2021-09-23 08:26:29 -04:00
Trinity Pointard
1a157f5d60
refactor a bit reproducible_build.sh
2021-09-20 17:48:13 +02:00
Trinity Pointard
0493c2b830
try use cache and make MacOS bin available as artifact
2021-09-20 17:48:13 +02:00
Trinity Pointard
78b6a36671
add reproducible builds for MacOS
2021-09-20 17:48:12 +02:00
Nick Mathewson
8bf394b0d5
Move version-controlled Cargo.lock to /.
...
Previously I'd hoped to have it only apply to reproducible builds,
but the work of keeping it up-to-date and checking it for drift
seems to have been tripping us up. Let's try doing it the other way
for now, and we'll see how that goes.
2021-09-20 11:37:11 -04:00
Daniel Eades
5d0e00ecef
update lock file
2021-09-19 13:46:11 +01:00
Daniel Eades
9a3b183679
remove unused dep
2021-09-19 09:47:57 +01:00
Nick Mathewson
19a920d12a
Update misc/Cargo.lock.
2021-09-17 08:11:39 -04:00
Jani Monoses
5f1f239d51
Enable js feature for getrandom for WASM.
...
By default rand does not build for WASM browser targets.
2021-09-17 06:43:02 +03:00
Nick Mathewson
4df5596aab
Update misc/Cargo.lock
2021-09-16 14:27:47 -04:00
Jani Monoses
08c9edfc54
Stop using anyhow in tor-dirclient.
2021-09-16 14:27:04 -04:00
Nick Mathewson
039601f179
tor-netdir: Add a by_id_pair() function to look up a relay by both IDs.
2021-09-16 10:19:35 -04:00
Nick Mathewson
140e5d4ca2
Merge remote-tracking branch 'origin/mr/82'
2021-09-16 08:39:21 -04:00
Nick Mathewson
95343a25e3
Add small qualifiers on android.md
2021-09-16 08:35:02 -04:00