Commit Graph

2818 Commits

Author SHA1 Message Date
Ian Jackson 40bede587c Merge branch 'config-partials-transparent' into 'main'
Absolish builders for CircMgrConfig and DirMgrConfig

See merge request tpo/core/arti!417
2022-03-17 12:30:46 +00:00
eta dd967e66b9 Merge branch 'always-ims' into 'main'
dirmgr: Always send if-modified-since on consensus documents.

Closes #403

See merge request tpo/core/arti!412
2022-03-16 21:32:48 +00:00
Ian Jackson a5ea3533c5 semver notes. 2022-03-16 19:38:12 +00:00
Ian Jackson a020f82de2 DirMgrConfig: abolish builder; make it transparent and exhaustive
See rationale in the comment.
2022-03-16 19:31:10 +00:00
Ian Jackson ab352881e3 Add rationale for CircMgrConfig transparency and trait 2022-03-16 19:31:08 +00:00
Ian Jackson 82aa4b902a Provide define_accessor_trait and use it to generate CircMgrConfig 2022-03-16 19:31:05 +00:00
Ian Jackson 8bde40fdd3 Make CircMgrConfig transparent (and make it a trait)
See commentary for the rationale.
2022-03-16 19:30:59 +00:00
Ian Jackson 8d54c0f073 Change type of TorClientConfig::override_net_params
Now we use NetParams.  That implies making its constructor public,
which I think it fine.

This is related to #413 but is far from completing that ticket.
2022-03-16 19:30:59 +00:00
Ian Jackson d0c71b3872 Actually honour preemptive circuits configuration
This handwritten conversion function omitted a field.  There was
nothing to spot this mistake.

IMO this shows why these particular types ought not to use builders,
but instead, should cause API breaks when things change.

Adding this line here to explicitly fix the bug, although we are about
to abolish this function completely almost right away.
2022-03-16 19:22:13 +00:00
Nick Mathewson e6fe205be3 Merge branch 'typos' into 'main'
Fix typo

See merge request tpo/core/arti!416
2022-03-16 19:11:50 +00:00
Dimitris Apostolou 7353fd4397
Fix typo 2022-03-16 20:25:46 +02:00
Ian Jackson fb4111f524 Merge branch 'derive-builder' into 'main'
derive_builder: Switch to upstream 0.11

See merge request tpo/core/arti!414
2022-03-16 17:54:53 +00:00
Ian Jackson da787d074a derive_builder: Switch to upstream 0.11
This has the different syntax for builder field attributes than what I
originally proposed in my MR, and which therefore is in the pinned
branch.

My upstream MR for the field attributes feature was morged:
  https://github.com/colin-kiegel/rust-derive-builder/issues/239
2022-03-16 16:34:44 +00:00
Ian Jackson 8a5d98f716 downgrade_dependencies: Upgrade darling
The new version of derive_builder requires a newer darling.
Ooops.  Upstream MR here:
  https://github.com/colin-kiegel/rust-derive-builder/pull/242

For now, upgrade darling.  When there's a new upstream derive_builder,
we can use it and drop this.
2022-03-16 16:34:44 +00:00
Ian Jackson 644f962cfd Merge branch 'move-retry-delay' into 'main'
Move RetryDelay into tor-basic-utils

See merge request tpo/core/arti!411
2022-03-16 15:37:44 +00:00
Nick Mathewson 3e12cf2688 Merge branch 'clippy' into 'main'
Replace a match with some as_ref and as

See merge request tpo/core/arti!413
2022-03-16 15:16:42 +00:00
Nick Mathewson 09f750c2c8 RetryDelay: remove accessors.
Instead, check initial_delay in dirmgr directly.
2022-03-16 10:50:13 -04:00
Ian Jackson 7564fabd68 Replace a match with some as_ref and as
The match was doing a deref coercion.

Found by current nightly's needless_match (whose suggestion doesn't
compile, https://github.com/rust-lang/rust-clippy/issues/8551 )
2022-03-16 14:41:04 +00:00
Nick Mathewson 4ccc3af423 dirmgr: Always send if-modified-since on consensus documents.
We never want a consensus document that's super-old, since we would
reject it immediately for being too old.

Also, never send an if-modified-since that's so old that we'd reject
the response.

Closes #403
2022-03-16 09:48:37 -04:00
Nick Mathewson 11883b9e8d Remove re-export of retry-schedule in tor-dirmgr.
It wasn't necessary.
2022-03-16 08:47:02 -04:00
Nick Mathewson 90c48dc1b0 Fix up documentation on RetryDelay.
It's no longer about downloads; it's about whatever you need to
retry.
2022-03-16 08:42:46 -04:00
Nick Mathewson 67645473d5 Move RetryDelay from dirmgr to basic-utils.
This (almost) a pure code-movement commit: it also makes one public
function private in order to suppress a warning.
2022-03-16 08:31:54 -04:00
Nick Mathewson ef619ba70a RetryDelay: add accessors for state
We'll need these for our unit tests in tor-dirmgr once we move
RetryDelay into tor-basic-utils.
2022-03-16 08:26:14 -04:00
Nick Mathewson e8c63fe3e8 tor-basic-utils/Cargo.toml: reformat.
This is a separate commit to avoid putting format changes in the
next commit.
2022-03-16 08:21:44 -04:00
Ian Jackson 9593cf637a Merge branch 'testing_dns_port' into 'main'
Use port 35353 for testing, not 5353.

See merge request tpo/core/arti!408
2022-03-16 10:32:04 +00:00
Nick Mathewson 00212ed025 Merge branch 'dns' into 'main'
fix rust-nightly CI job

See merge request tpo/core/arti!409
2022-03-15 14:12:52 +00:00
trinity-1686a 60431ade4f make run_dns_resolver public and fix typo 2022-03-15 14:11:42 +01:00
Nick Mathewson c16c4c3845 Use port 35353 for testing, not 5353.
Apparently 5353 is commonly used for mDNS, and so counts as "already in
use" on many consumer machines.
2022-03-15 08:26:45 -04:00
Nick Mathewson 841f813a7c Merge branch 'dns' into 'main'
Add DNS resolver support to arti

See merge request tpo/core/arti!390
2022-03-14 23:56:55 +00:00
trinity-1686a 3a6eac1367 comment AAAA test and explain why it's disabled 2022-03-14 21:19:20 +01:00
trinity-1686a f4581ffd04 add simple unit test on UDP 2022-03-14 21:19:20 +01:00
trinity-1686a b7daa9ff12 add integration test and fill semver_status 2022-03-14 21:19:19 +01:00
trinity-1686a fa29925689 fix typos and minor issues 2022-03-14 21:16:56 +01:00
trinity-1686a 604362bf80 actually add DNS support 2022-03-14 21:04:38 +01:00
trinity-1686a 9b3be0ad47 add skeleton for DNS handling 2022-03-14 20:59:35 +01:00
trinity-1686a 4a44ef56c0 add udp to runtime 2022-03-14 20:59:33 +01:00
Nick Mathewson f23fca5e93 Merge branch 'testing-docs' into 'main'
New documents to checkpoint my work on #329 and #87

See merge request tpo/core/arti!407
2022-03-14 17:27:42 +00:00
eta 331da62712 Apply 1 suggestion(s) to 1 file(s) 2022-03-14 17:11:49 +00:00
Nick Mathewson 6f9094e2d6 Merge branch 'intern-more' into 'main'
tor-netdoc: use InternCache to save memory for families and protover lists

Closes #384 and #385

See merge request tpo/core/arti!398
2022-03-14 15:03:39 +00:00
Nick Mathewson 8f430fd58d Merge branch 'main' into 'intern-more'
# Conflicts:
#   doc/semver_status.md
2022-03-14 14:19:44 +00:00
Nick Mathewson 34c209c20e New documents to checkpoint my work on #329 and #87
These documents explain how to profile arti for CPU and memory, and
how to simulate different kinds of breakage and misconfiguration.

They aren't at all in their final form, but I figure it's useful to
check them in so that more people can look at them, and make
suggestions.
2022-03-14 10:14:34 -04:00
eta c0baf86e52 Merge branch 'missing_shrink_to_fit' into 'main'
dirmgr: Call shrink_to_fit on missing-microdesc hashtable

Closes #388

See merge request tpo/core/arti!399
2022-03-14 13:20:57 +00:00
eta 258e42ad3e Merge branch 'slice-from-ref' into 'main'
Simpify tor-netdoc TokVal

See merge request tpo/core/arti!404
2022-03-14 13:14:05 +00:00
eta ff489ffde7 Merge branch 'humantime' into 'main'
Replace humantime_serde_option with upstream code

Closes #396

See merge request tpo/core/arti!406
2022-03-14 13:11:12 +00:00
Ian Jackson dbd7388991 humantime_serde_option: Add note about semver 2022-03-14 10:34:28 +00:00
Ian Jackson 8f5d089f53 Revert "humantime_serde_option: New module in tor-basic-utils"
We have upstreamed this code.

This reverts commit 6193c9d974.
2022-03-14 10:33:59 +00:00
Ian Jackson 409c5dd6d2 Use new upstream humantime_serde_option feature
Replace all uses of our copy of this code.
2022-03-14 10:33:59 +00:00
Ian Jackson 8b8c2a426e humantime: Update to humantime-serde 1.1.1
This has the humantime_serde::option module, which we have upstreamed
and are about to switch to.

The remaining dependency with  version = "1"  is going to be removed
in a moment.
2022-03-14 10:33:59 +00:00
Nick Mathewson a98ae2a1f0 Canonicalize and intern protover lines on descriptors
This should save around 1MB per consensus, since every relay has a
'protocols' lines, but there are only a few distinct possibilities
for such a line.

Closes #385.
2022-03-11 16:56:12 -05:00
Nick Mathewson 16f1bda324 Canonicalize and intern family representations to save memory.
This should save 1-3 MB of ram on each running arti client.

Closes #384. See also tor#27359 and proposal 298.
2022-03-11 16:54:33 -05:00