Nick Mathewson
fc0c12510a
GuardMgr: Fix and improve comments based on review.
2022-11-02 08:07:32 -04:00
Nick Mathewson
6828178dec
guardmgr: fix rustdoc references.
2022-11-02 08:07:32 -04:00
Nick Mathewson
08473872ab
guardmgr: Refactor candidate info; add `full_dir_info`
...
Previously we always set `dir_info_missing` to `false` for new
guards, since new guards could only be taken from ones that were
present in the NetDir. But for bridges, we don't download their
info until _after_ we have chosen them as guards.
2022-11-02 08:07:11 -04:00
Nick Mathewson
5867318a35
guardmgr: Implement Universe for bridges.
...
Now we can use a group of bridges as the basis for a sample of
guards.
2022-11-02 08:06:43 -04:00
Nick Mathewson
79dade342a
guardmgr: Universe API should look up by ChanTarget
...
This will be necessary for bridges.
2022-11-02 08:06:43 -04:00
Nick Mathewson
82e9a57012
guardmgr: take sampled guards from Universe.
...
This is a trickier case, since we have to deal with weights.
2022-11-02 08:06:43 -04:00
Nick Mathewson
7733146c8c
guardmgr: Continue porting porting code to use Universe.
...
Two more simple cases that can use Universe instead of Netdir.
2022-11-02 08:06:20 -04:00
Nick Mathewson
fbcacea993
guardmgr: Begin to decouple guards from NetDir.
...
In this and the upcoming commits I'll be changing how guards related
to `NetDir` and to `Relay`. Previously, a guard could only come
from (or be updated from) a `Relay` in a `NetDir`. Soon it will be
able to be built from a bridge as well.
To do this, I'm defining a `Universe` trait (name negotiable) that
represents a set of things that may be guards. I'm going to
continue extending its functionality until there are no more
methods in guard.rs or sample.rs that take `NetDir`.
This commit removes most of the usage of `NetDir` and `Relay` in
`guard.rs`.
2022-11-02 08:05:51 -04:00
Nick Mathewson
b5f498021d
guardmgr: Rename microdescriptor_missing to dir_info_missing
2022-11-02 07:59:56 -04:00
Nick Mathewson
39ea0518ee
guardmgr: Allow guards to be constructed from any ChanTarget.
2022-11-02 07:59:56 -04:00
Nick Mathewson
1cb6ea1e77
guardmgr: Include PtTarget in guards.
...
Use a vector, since we may (someday) want to allow a Guard to have
multiple PtTargets.
2022-11-02 07:59:56 -04:00
Nick Mathewson
a962683222
Merge branch 'upgrade_20221028' into 'main'
...
Upgrade and update dependencies
See merge request tpo/core/arti!816
2022-10-28 19:22:26 +00:00
Nick Mathewson
0c7cdae8f9
Upgrade dependencies in preparation for upcoming release(s)
2022-10-28 14:51:01 -04:00
Nick Mathewson
0b167f1b1c
update to latest arti-corpora
2022-10-28 09:30:16 -04:00
Nick Mathewson
29c46d08b5
Merge branch 'guards_as_bridges_part2' into 'main'
...
Use ByRelayIds to hold guards in GuardSet
See merge request tpo/core/arti!808
2022-10-27 21:09:47 +00:00
Nick Mathewson
557a07677e
guardmgr: Rename and clarify of non-persistent-state copy fns
...
These will need a bigger overhaul: see #612 and #611 .
2022-10-27 16:40:35 -04:00
Ian Jackson
4f171acaf7
Clarify fix_consistency
2022-10-27 16:40:35 -04:00
Ian Jackson
7180079112
Clarify what it means to be "an identity" for a primary guard.
2022-10-27 16:40:35 -04:00
Ian Jackson
15d464a929
tor-guardmgr: Add big doc comment about guard id handling
2022-10-27 16:40:35 -04:00
Ian Jackson
fdbd213a6d
Merge branch 'bridge-api-yaks' into 'main'
...
Misc minor changes to BridgeDescProvider APIs
See merge request tpo/core/arti!812
2022-10-27 15:37:17 +00:00
Ian Jackson
4a59d384b6
tor-dirmgr: impl Default for FlagPublisher
2022-10-27 15:57:57 +01:00
Ian Jackson
94325cd456
tor-dirmgr: impl FlagEvent for BridgeDescEvent
2022-10-27 15:57:57 +01:00
Ian Jackson
26a7aa9aa6
BridgeDescProvider: Make BridgeDescEvent repr(u16) and derive traits
...
This will enable us to impl FlagEvent for it.
2022-10-27 15:57:54 +01:00
Ian Jackson
a56efbfdf0
impl Hash for BridgeConfig and various PT information
...
The bridge descriptor manager wants to index data structures by the
BridgeConfig.
2022-10-27 15:57:54 +01:00
Ian Jackson
a89daba1c8
tor-guardmgr: bridges: export BridgeDescError at toplevel
2022-10-27 15:57:54 +01:00
eta
84a2624401
Merge branch 'fuzz_ptmgr_ipc' into 'main'
...
ptmgr: Add a fuzzer for ptmessage.
See merge request tpo/core/arti!814
2022-10-27 14:51:35 +00:00
eta
b3d8f3b5ee
Merge branch 'simpler_quote_skipping' into 'main'
...
ptmgr::ipc: Try an alternate approach to initial quotes.
See merge request tpo/core/arti!813
2022-10-27 14:50:56 +00:00
Ian Jackson
38a940d5a9
Merge branch 'misc-yaks' into 'main'
...
Two misc minor changes, for descriptor downloading
See merge request tpo/core/arti!811
2022-10-27 10:16:59 +00:00
Ian Jackson
9796d615f8
tor-basic-utils: Provide an implementation of BinaryHeap::retain
...
This is currently nightly-only and is blocked on an unresolved API
question:
https://github.com/rust-lang/rust/issues/71503
2022-10-27 10:46:03 +01:00
Ian Jackson
a59fef00e9
tor-checkable: Make TimerangeBound::dangerously* non-experimental
...
I want one of these for the bridge descriptor downloader, and they
seem reasonable to me.
2022-10-27 10:46:03 +01:00
Nick Mathewson
9f73ddd440
Merge branch 'assert_maxlen' into 'main'
...
tor-cell: Assert data length in Data cells
See merge request tpo/core/arti!800
2022-10-27 01:46:21 +00:00
Nick Mathewson
42fefe021d
ptmgr: Add a fuzzer for ptmessage.
2022-10-26 16:59:48 -04:00
Nick Mathewson
cb7eb3b00d
ptmgr::ipc: Try an alternate approach to initial quotes.
...
This lets us use `chars()` rather than `char_indices()`.
2022-10-26 14:49:24 -04:00
Nick Mathewson
a8b96534be
Merge branch 'dirclient-yaks' into 'main'
...
Misc minor changes to tor-dirclient, for descriptor downloading
See merge request tpo/core/arti!810
2022-10-26 18:43:15 +00:00
eta
1ffb2856d9
Merge branch 'pt-ipc-v1' into 'main'
...
tor-ptmgr/ipc: First cut of pluggable transport spawning
Closes #394
See merge request tpo/core/arti!779
2022-10-26 15:31:59 +00:00
eta
a118a639ed
tor-ptmgr/ipc: First cut of pluggable transport spawning
...
The new `ipc` module inside `tor-ptmgr` implements the Pluggable
Transport Specification version 1 (`pt-spec.txt`,
https://gitlab.torproject.org/tpo/core/torspec/-/blob/main/pt-spec.txt ).
This enables module users to spawn pluggable transport binaries inside a
child process asynchronously, and receive structured information about
how to connect to the transports provided by said binaries.
Internally, this is structured as a pure set of serialisers and
deserialisers for the protocol in the specification (in the form of
environment variables, and the PT's stdout), a wrapper to run the PT
binary and enable accessing its output asynchronously, and a user-facing
wrapper that handles ensuring all the requested transports launched
properly.
The included `run-pt` example is an exceedingly minimal wrapper program
that was useful in testing. More tests can and should be added in a
further MR.
closes arti#394; part of arti#69
2022-10-26 16:07:30 +01:00
Ian Jackson
d0492ba189
Merge branch 'redundant_allocation' into 'main'
...
tor-bytes: Avoid redundant allocation
See merge request tpo/core/arti!806
2022-10-26 09:43:13 +00:00
Nick Mathewson
a9e74aa72a
Merge branch 's101-metrics-october-2022' into 'main'
...
Update heap and download size metrics for October
See merge request tpo/core/arti!809
2022-10-25 20:25:34 +00:00
Alexander Færøy
d092c7fa90
Add September values to heap_and_download_size.md.
2022-10-25 21:52:16 +02:00
Alexander Færøy
2cc1996bb6
Add Methodologies section to our Heap and Download Size document.
2022-10-25 21:51:56 +02:00
Alexander Færøy
7a99555e9d
Add missing data from October from Nick.
2022-10-25 21:51:37 +02:00
Ian Jackson
a04becf8b4
Merge branch 'flag-event' into 'main'
...
FlagEvent trait: Implement using macros
See merge request tpo/core/arti!804
2022-10-25 19:16:45 +00:00
Ian Jackson
79a6b4d94f
tor-dirclient: impl HasKind for RequestFailedError
2022-10-25 20:12:56 +01:00
Ian Jackson
0b046ad4fb
tor-dirclient: Promise that download only gives RequestFailed
2022-10-25 20:12:56 +01:00
Ian Jackson
b68f7af79b
tor-dirclient::DirResponse: provide output_string
...
This gives callers a nice error type with source and everything.
2022-10-25 20:12:56 +01:00
Ian Jackson
897e472e60
tor-dirclient: Provide RoutersOwnDescRequest
...
This will be used for bridges' descriptors.
2022-10-25 20:12:56 +01:00
Ian Jackson
9c9d82f6b8
Fix clippy false positive
2022-10-25 19:42:41 +01:00
Alexander Færøy
a8a2de747b
Update heap and download size metrics for October
...
This patch updates the heap_and_download_size.md file with numbers from
October 2022 for our Sponsor 101 deliverables.
2022-10-25 19:56:35 +02:00
Nick Mathewson
20016df6fa
guardmgr: Use new ambiguity-tolerant contains in state handling
...
This has subtleties; the comments try to explain them.
2022-10-25 11:15:53 -04:00
Nick Mathewson
d65c351b33
guard sample: Change semantics of `contains` to handle ambiguity.
...
This is necessary for the (somewhat undesirable) lookup_ids function
to return an ID that the dirmgr can actually use to report successes
and failures.
As noted, lookup_ids will create problems down the road when we
implement relays. We should refactor it out before then.
2022-10-25 11:15:53 -04:00