Commit Graph

3000 Commits

Author SHA1 Message Date
Nick Mathewson a044d4bcfe Reformat tor-error/Cargo.toml 2022-04-04 11:09:25 -04:00
Nick Mathewson e6c6628adb Update rlimit to 0.8.1
This is necessary to fix build for M1 apples.
2022-04-02 08:10:18 -04:00
Nick Mathewson 52783f9ed1 Cargo.toml: Edit crate list to reflect dependencies 2022-04-01 11:19:32 -04:00
Nick Mathewson 4a3df6a26f Clean out semver_status.md 2022-04-01 11:18:35 -04:00
Nick Mathewson b03bf29259 Merge branch '020_versions' into 'main'
Bump versions in preparation for 0.2.0 release.

See merge request tpo/core/arti!445
2022-04-01 14:34:49 +00:00
Nick Mathewson 5b2fc118df Bump all arti*, tor* crates to 0.2.0
Not all of these strictly need to be bumped to 0.2.0; many could go
to 0.1.1 instead.  But since everything at the tor-rtcompat and
higher layers has had breaking API changes, it seems not so useful
to distinguish.  (It seems unlikely that anybody at this stage is
depending on e.g. tor-protover but not arti-client.)
2022-04-01 09:15:18 -04:00
Nick Mathewson aae242af22 Bump caret, retry-error to 0.1.1
Unlike the rest of the crates, these don't have a "tor-" or "arti-"
prefix, and are potentially used by code outside arti.  With that in
mind, it's probably for the best not to bump them to 0.2.0 along
with the rest of our crates.

They have had no changes since 0.1.0 other than refactoring and
changing of clippy lints.  Therefore, I'm not bumping the
dependencies from other crates onto these: it's fine whether our
other crates use caret/retry-error 0.1.0 or 0.1.1.
2022-04-01 09:14:46 -04:00
Nick Mathewson a7cf65ca0d Update Cargo.lock based on build. 2022-04-01 09:03:25 -04:00
Nick Mathewson 392a176b00 CHANGELOG: Fix another sentence 2022-04-01 09:02:35 -04:00
Nick Mathewson 91982fa123 CHANGELOG: rephrase a sentence. 2022-04-01 08:58:18 -04:00
Nick Mathewson ae387f5eeb Merge branch 'upgrade_pre_020' into 'main'
Run cargo upgrade/update in preparation for 0.2.0

See merge request tpo/core/arti!444
2022-04-01 12:48:50 +00:00
Nick Mathewson 6a1dc1d053 CHANGELOG: spelling fixes 2022-04-01 08:47:21 -04:00
Nick Mathewson 7ce92230eb First attempt at a changelog for 0.2.0 2022-04-01 08:36:59 -04:00
Nick Mathewson 95237e63ce Upgrade async-broadcast => 0.4.0 2022-04-01 08:10:38 -04:00
Nick Mathewson 8393a341e7 Final "cargo update" before 0.2.0 2022-04-01 08:05:38 -04:00
Nick Mathewson 9190dfea77 Upgrade rlimit -> 0.8.0 2022-04-01 08:03:30 -04:00
Nick Mathewson 259622bc3a Merge branch 'dir-munger-v2' into 'main'
Implement a directory munger to simulate pathological cases in arti-testing (v2)

Closes #397

See merge request tpo/core/arti!442
2022-03-31 15:43:28 +00:00
Nick Mathewson 0725e388a5 Re-order attributes so that we can build with Rust 1.53. 2022-03-31 11:11:02 -04:00
Ian Jackson 68b614ade1 Typo fix. 2022-03-31 14:34:11 +00:00
Nick Mathewson e98aa50e72 Directory filtering in arti-testing.
This feature allows us to detect different failing cases for
arti#329 that would otherwise be hard to induce.  It works by
filtering consensus directory objects and/or microdescriptor objects
before introducing them to the directory manager.

Closes #397.
2022-03-31 09:27:27 -04:00
Nick Mathewson b1b7ef00a0 tor-netdoc: Conditionally expose document fields.
This commit uses the `visibility` and `visible` crates to
conditionally make certain structs and their fields public
(respectively).  This is incredibly dangerous to use for anything
besides testing, and I've tried to write the documentation for the
feature accordingly.
2022-03-31 09:27:27 -04:00
Nick Mathewson a461ddc916 Merge branch 'retry_tuning_1' into 'main'
Minor retry tuning to improve behavior under failing conditions.

See merge request tpo/core/arti!439
2022-03-31 12:37:33 +00:00
Nick Mathewson 8a7833dc7e tor-checkable: add experimental api for exposing wrapped objects. 2022-03-31 08:33:27 -04:00
Nick Mathewson 63e366cc8f Reformat tor-checkable/Cargo.toml 2022-03-31 08:33:18 -04:00
Nick Mathewson c5e5fc1553 dirmgr: Use a different idiom in retry loop
Replace the next delay field immediately rather than taking it and
_then_ setting it.  This way, it's never in an incorrect state.
2022-03-31 08:07:50 -04:00
Ian Jackson e6cfbf582e Merge branch 'typos' into 'main'
Fix typo

See merge request tpo/core/arti!441
2022-03-31 10:02:27 +00:00
Dimitris Apostolou ff53886b61
Fix typo 2022-03-30 22:47:33 +03:00
Nick Mathewson 432bb5ce62 Use a lower default for max_retries.
The older default seems (experimentally) to be ridiculously high.
Generally, if we can't build a circuit within a handful attempts,
that circuit has already timed out... unless there is a fast-failure
condition, in which case we're just hammering the network (or our
view of it.)

Found with `arti-testing` for #329.
2022-03-30 14:22:28 -04:00
Nick Mathewson bd798764a4 circmgr: limit circuit attempts when launch_parallelism > 1.
Previously, if we had launch_parallelism > 1, and we were willing to
retry building a circuit max_retries times, then we'd launch up to
max_retries * launch_parallelism circuits before giving up.  Ouch!

With this patch, we try to keep the total number of circuits
planned and attempted to the actual max_retries limit.

Part of #329; found with arti-testing.
2022-03-30 14:14:52 -04:00
Nick Mathewson 6e8c982ab5 dirmgr: fix bugs in algorithm for retrying downloads
The previous algorithm had two flaws:

  * It would wait even after the final attempt, when there were no
    more retries to do.
  * It would fail to wait between attempts if an error occurred.

This refactoring fixes both of these issues, and adds some comments.
2022-03-30 13:56:36 -04:00
Nick Mathewson 849371c1d3 README.md for arti-testing. 2022-03-30 13:41:04 -04:00
Ian Jackson c8d9ae4535 Merge branch 'fallback_status_v2' into 'main'
Refactor FallbackDir handling and implement a retry-after-delay mechanism.

Closes #406 and #220

See merge request tpo/core/arti!433
2022-03-30 16:25:37 +00:00
Ian Jackson 33399bed8b Merge branch 'fallback_status_v2' into main
Manual merge for just this branch as per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/433#note_2791982
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/433#note_2791993
2022-03-30 16:34:01 +01:00
Nick Mathewson 2bb3ba7886 Run cargo fmt one more time for good measure. 2022-03-30 10:41:57 -04:00
Nick Mathewson df3c51c8a0 Use derive_more to derive AsRef. 2022-03-30 10:41:40 -04:00
Nick Mathewson 5233d35223 Reformat tor-guardmgr/Cargo.toml. 2022-03-30 10:41:40 -04:00
Nick Mathewson 1feb7eecac Reformat several Cargo.toml files with 100-char-wide lines. 2022-03-30 10:41:40 -04:00
Nick Mathewson 3e92d30e49 Fix some Rustdoc links. 2022-03-30 10:41:40 -04:00
Nick Mathewson 6282df34fb Refactor FirstHopId into type-differentiated form
The FirstHopId type now records an enum that stores whether the hop
is a guard or a fallback.  This change addresses concerns about
remembering to check the type or source of an Id before passing it
down to the FallbackState or GuardSet.

Making this change required an API change, so that dirmgr can
report success/failure status without actually knowing whether it's
using a fallback or a guard.
2022-03-30 10:41:39 -04:00
Nick Mathewson 13af6134f6 Rename Guard=>FirstHop, GuardId=>FirstHopId
This is preparation for having separate GuardId and FirstHopId types
that distinguish which back-end they index.
2022-03-30 10:40:59 -04:00
Nick Mathewson 9803b645c0 FallbackState: Use itertools::merge_join_by.
This replaces a hand-coded replacement that was probably a little
less efficient.
2022-03-30 10:40:14 -04:00
Nick Mathewson b752c6c771 Fold fallback::Status::reset() into its (only) caller. 2022-03-30 10:40:14 -04:00
Nick Mathewson 9bf2fe3aca Rename FallbackState::lookup_mut => get_mut. 2022-03-30 10:40:14 -04:00
Nick Mathewson b1ccd3c7dc Rename FallbackSet => FallbackState. 2022-03-30 10:40:14 -04:00
Nick Mathewson 951b800988 DirPathBuilder::pick_path: re-order match cases for clarity. 2022-03-30 10:40:14 -04:00
Nick Mathewson 2cf00e63de Refactor select_guard_with_expand to use match and log errors. 2022-03-30 10:40:14 -04:00
Nick Mathewson 578f2925d9 ListKind: Use an exhaustive match to future-proof. 2022-03-30 10:40:14 -04:00
Nick Mathewson c721c8ee53 Clarify documentation about GuardUsable constructors 2022-03-30 10:40:14 -04:00
Nick Mathewson 16ce29ef59 Add a TODO about an unslightly type. 2022-03-30 10:40:14 -04:00
Ian Jackson 82ea251f3c Clean up a rustdoc link 2022-03-30 10:40:14 -04:00