| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
This warning complains when we say `where T: SomeTrait + ?Sized`
when `SomeTrait` is inherently Sized.
|
| |
|
|
| |
This commit is automatically generated.
|
| |
|
|
|
|
| |
The old code produced a warning from clippy nightly; we may as well
update to use the new associated consts. (They've been there since
Rust 1.4x.)
|
| |\
| |
| |
| |
| |
| |
| | |
tor-guardmgr: Make lite vanguards work
Closes #1275 and #1340
See merge request tpo/core/arti!2075
|
| | |
| |
| |
| |
| | |
`TestNetDirProvider::set_netidr_and_notify` blocks if the
channel is full, so let's give it a non-zero size.
|
| | | |
|
| | |
| |
| |
| |
| | |
Previously they were a bit confusing, and the public function
explained its behavior in terms of the private one.
|
| |/
|
|
|
|
|
| |
Explain that `by_ids` isn't what you want if you need to know
whether a relay _definitely_ doesn't exist.
Closes #1365
|
| | |
|
| |
|
|
| |
This was an open-coded specialisation. Remove the one call site.
|
| | |
|
| | |
|
| |
|
|
|
| |
Everybody outside of tor-netdir should use
HasRelayIds::same_relay_ids, whose intent is clearer.
|
| |
|
|
| |
These were only used for testing.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
In *RelayDetails, this is just a matter of changing a bunch of
`self`s to `self.0`.
Additionally, I've added temporary stub functions to delegate to the
new functions.
|
| |
|
|
| |
This is 99% code movement.
|
| |
|
|
|
|
|
|
|
|
| |
I'm going to use this wrapper type to hide checks
that should mostly not be used without careful thinking.
There are also comments here explaining when you'd want to use these
types, and when you shouldn't.
Part of #504.
|
| |
|
|
| |
Spotted in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2053#note_3012632
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
See also torspec!258
Part of #1272
|
| | |
|
| |
|
|
| |
We'll need this to implement restrictions more reasonably.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This matches the behavior of C tor. Part of #1100.
|
| |
|
|
|
|
| |
This matches the behavior of C tor.
Part of #1100.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
(Also, correct the comments that describe them.)
We may as well match the spec names when they aren't completely
bogus.
We are already renaming these parameters for this release, so it
isn't an additional breaking change.
|
| |
|
|
|
|
| |
The old names were somewhat inaccurate. (I would have considered
keeping and deprecating the old names, but we already have breaking
changes in tor-netdir.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
newer periods.
This fixes a bug where `offset_within_srv_period()` returns `None`,
instead of the offset of `when` from the start of the SRV of the
previous time period:
```
2024-01-24T15:24:46Z ERROR tor_hsservice::svc::publish::reactor: descriptor upload failed for HS service
allium-cepa2 and time period TimePeriod { interval_num: 19745, length: IntegerMinutes { value: 1440 },
epoch_offset_in_sec: 43200 }: error: Programming error: internal error (bug) at
/../arti/crates/tor-hsservice/src/svc/publish/reactor.rs:218:13: current wallclock time not within
SRV range?! (now=SystemTime { tv_sec: 1706109886, tv_nsec: 246572852 },
SRV_start=SystemTime { tv_sec: 1705968000, tv_nsec: 0 })
```
We need to be able to calculate this offset even if `now` is not within
the SRV range (because we upload the descriptor to the HsDirs of the
*previous* time period too).
Note a similar bug exited in `offset_within_period()` (which no longer
exists) too! That one was fixed in !1744:
```
Hidden services can have multiple "active" time periods for which they
generate descriptors. We need to be able to compute the offset of a
timestamp from the start of a given time period, even if that timestamp
falls within the "next" time period (for example, when publishing
descriptors for the "previous" time period, the `when` timestamp will
fall outside the `(start, end)` range of the "previous" time period).
```
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
|
| |
|
|
| |
Part of #1166
|
| |
|
|
|
|
|
|
| |
The publisher is the only user of `hs_dirs_upload`. It turns out it
never actually uses the first element of the yielded `Item`s, so we can
simplify `hs_dir_upload` to only return the HsDir `Relay`s.
Part of #1166
|
| |
|
|
|
|
|
|
|
| |
The descriptor publisher uses this function to obtain the list of
relevant time periods. It will soon also need to know the `srv_lifespan`
associated with each time period, so we change this function to return
`HsDirParams`.
Part of #1166
|
| |
|
|
| |
Closes #1254.
|
| | |
|
| |
|
|
| |
This is part of #1254.
|
| |
|
|
|
|
| |
This implements Relay::is_hs_intro_point.
Close #1240.
|
| |
|
|
|
| |
As we enforce these flags in more places, it will be handy for our
default network to have them for its relays.
|
| | |
|
| | |
|
| |
|
|
| |
These are not release-blockers.
|