summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-hsservice: Add more context to the publisher logs.Gabriela Moldovan2023-12-081-10/+20
| |
| * tor-hsservice: Remove a publisher TODO that has been addressed.Gabriela Moldovan2023-12-081-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The publisher doesn't reupload unless explicitly asked to do so by the `IptManager` (via `await_update()`). Also, when the consensus changes, we always trigger a reupload, but only to those HsDirs that don't already have the descriptor (the HsDirs marked as "clean" stay "clean", and any new HsDirs are marked "dirty" until they get a copy of the descriptor. See !1806). Similarly, a config change only triggers a reupload if the change means we need to generate a new descriptor (e.g. if the `anonymity` of the service changes). Note, however, that this logic is currently commented out (it depends on #1028). Closes #1131
* | tor-hsservice: Add functions to update the IPT mgr/publisher states.Gabriela Moldovan2023-12-111-7/+21
| | | | | | | | Part of #1083
* | tor-hsservice: Derive service state from the state of its components.Gabriela Moldovan2023-12-111-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to know the status of each component to be able to report the overall status of the service. Without this change, the service (and its components) have no way of knowing if a given transition is valid: if the state of a component (say, the IPT manager) is `Bootstrapping`, `Recovering` or `Broken`, a transition out of the current state is only valid if it is initiated by the same component that caused the current state (for example, if the publisher sets the state to `Recovering`, the IPT manager should not be allowed to trigger an overall state transition to `Running`). Part of #1083
* | tor-hsservice: Trim trailing whitespace.Gabriela Moldovan2023-12-111-1/+1
|/
* tor-hsservice: Remove unused lifetime.Gabriela Moldovan2023-12-071-1/+1
| | | | Fixes a clippy lint.
* tor-hsservice: Remove unused function.Gabriela Moldovan2023-12-071-16/+0
|
* tor-hsservice: Fix publisher bug causing unnecessary uploads.Gabriela Moldovan2023-12-071-27/+31
| | | | | | | This fixes a bug where the publisher wasn't preserving the `DescriptorStatus` of its `HsDirs` when handling consensus changes. The bug is described in more detailed in the TODO removed by this commit.
* tor-hsservice: Add a TODO about a publlisher bugGabriela Moldovan2023-12-071-0/+17
|
* tor-hsservice: Rename period to ctx for clarity.Gabriela Moldovan2023-12-071-2/+2
| | | | This is actually a `TimePeriodContext`.
* Merge branch 'persist-macro' into 'main'Ian Jackson2023-12-076-96/+78
|\ | | | | | | | | | | | | Improve KeySpecifier, errors, IptKeySpecifier impl, etc. Closes #1116 and #1148 See merge request tpo/core/arti!1796
| * tor-hsservice: keys: Remove unused imports (and a blocking todo)Ian Jackson2023-12-071-2/+0
| |
| * tor-hsservice: tests: IptKeySpecifier: Do round trip testIan Jackson2023-12-071-8/+8
| |
| * tor-hsservice: IptKeySpecifier: impl KeySpecifier via macroIan Jackson2023-12-071-14/+8
| |
| * tor-hsservice: IptKeySpecifier: make it ownedIan Jackson2023-12-072-5/+5
| | | | | | | | | | The macro is going to want to be able to do a back-conversion from an ArtiPath, so there has to be an owned version.
| * tor-hsservice: IptKeySpecifier: reorder fieldsIan Jackson2023-12-071-2/+2
| | | | | | | | | | Now they are in the order they appear in the ArtiPath, which is a bit clearer.
| * tor-hsservice: IptKeyRole: impl FromStr and KeySpecifierComponentIan Jackson2023-12-071-1/+4
| |
| * tor-hsservice: IptLocalId: impl KeySpecifierComponentIan Jackson2023-12-071-0/+3
| |
| * tor-hsservice: IptLocalId: impl FromStr (fmt)Ian Jackson2023-12-071-4/+2
| |
| * tor-hsservice: IptLocalId: impl FromStrIan Jackson2023-12-072-27/+18
| | | | | | | | And implement serde that way, using SerdeStringOrTransparent.
| * tor-hsservice: Expose SerdeStringOrTransparent to crateIan Jackson2023-12-072-2/+4
| | | | | | | | | | And make it useable elsewhere by not expecting the particular error type.
| * tor-keymgr: Make KeySpecifierComponent::as_component fallibleIan Jackson2023-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | This allows a principled implentation via Display. The alternative would be to have runtime panics whenever someone uses KeySpecifierComponentViaDisplayFromStr but the Display impl can produce wrong syntax (that doesn't fit in an ArtiPathComponent). Bug seems like the right error since implemnting KeySpecifierComponent implies that every value is representable in an ArtiPathComponent.
| * tor-keymgr: Introduce InvalidKeyPathComponentValue errors (fmt)Ian Jackson2023-12-071-9/+8
| |
| * tor-keymgr: Introduce InvalidKeyPathComponentValue errorsIan Jackson2023-12-071-1/+7
| | | | | | | | | | | | | | | | This is a variant in KeyPathError, which contains the actual wrong value, and the key name. But it is also a unit struct to return from the trait impl. This replaces ArtiPathError::InvalidDenotator.
| * tor-hsservice: Prepare for different denotator error handlingIan Jackson2023-12-071-5/+6
| | | | | | | | | | Save the ArtiPathComponent in a variable and separate out the Ok(tp) for clarity. No functional change.
| * tor-keymgr: Have KeySpecifierComponent::from_component take a refIan Jackson2023-12-071-1/+1
| | | | | | | | | | Call sites are shortly going to need the component on the error path, so this function ought probably not to consume it.
| * tor-keymgr: Replace assert_key_specifier_rountrip macro with function (fmt)Ian Jackson2023-12-071-12/+3
| | | | | | | | Formatting churn at call sites.
| * tor-keymgr: Replace assert_key_specifier_rountrip macro with functionIan Jackson2023-12-071-13/+8
| | | | | | | | The new function checks both directions. The (misspelled) macro didn't.
| * tor-keymgr: provide KeySpecifierComponentViaDisplayFromStr and use itIan Jackson2023-12-071-13/+2
| | | | | | | | Now the only manual impl is TimePeriod, which is indeed special.
| * ArtiPaths: derive FromStr for ArtiPath ArtiPathComponent HsNickname (fmt)Ian Jackson2023-12-071-2/+13
| | | | | | | | Mandatory horrible formatting.
| * ArtiPaths: derive FromStr for ArtiPath ArtiPathComponent HsNicknameIan Jackson2023-12-071-0/+1
| |
* | Add a "Shutdown" status, and clarify places where status should change.Nick Mathewson2023-12-074-5/+19
| |
* | Add a status API to OnionService.Nick Mathewson2023-12-073-11/+168
|/ | | | | | (This doesn't yet send any status events.) Begins work on arti#1083.
* tor-hsservice: Add more info to an internal error (fmt).Gabriela Moldovan2023-12-051-6/+7
|
* tor-hsservice: Add more info to an internal error.Gabriela Moldovan2023-12-051-1/+9
| | | | | Logging the current time and the start of the time period might help us debug #1143 (we'll at least know how far off `now` is from `start`).
* tor-hsservice: Fix clippy warning.Gabriela Moldovan2023-12-051-1/+1
|
* tor-hsservice: Wrap some long lines in a helper macro.Gabriela Moldovan2023-12-051-4/+11
|
* tor-hsservice: Add a cross-reference to KeystoreSweeper.Gabriela Moldovan2023-12-051-0/+7
|
* tor-keymgr: Abolish the KeyDenotator trait in favour of KeyPathComponent (fmt).Gabriela Moldovan2023-12-051-2/+6
|
* tor-keymgr: Abolish the KeyDenotator trait in favour of KeyPathComponent.Gabriela Moldovan2023-12-051-2/+4
|
* tor-hsservice: Stop the KeystoreSweeper task when the service exits (fmt).Gabriela Moldovan2023-12-053-57/+62
|
* tor-hsservice: Stop the KeystoreSweeper task when the service exits.Gabriela Moldovan2023-12-052-7/+30
|
* tor-hsservice: Make shutdown a broadcast channel.Gabriela Moldovan2023-12-052-11/+13
| | | | | We will soon need another component to be able to subscribe to the shutdown signal.
* tor-hsservice: Move remove_if_expired macro inside task (fmt).Gabriela Moldovan2023-12-051-9/+3
|
* tor-hsservice: Move remove_if_expired macro inside task.Gabriela Moldovan2023-12-051-37/+22
|
* tor-keymgr: Update key summary strings to be less verbose.Gabriela Moldovan2023-12-051-5/+5
|
* tor-hsservice: Test the TryFrom<&KeyPath> KeySpecifier impl.Gabriela Moldovan2023-12-052-1/+8
|
* tor-hsservice: Add some useful derives for the key specifiers.Gabriela Moldovan2023-12-051-5/+5
|
* tor-hsservice: Add a helper for removing expired keys.Gabriela Moldovan2023-12-052-3/+154
| | | | Closes #1043
* tor-hsservice: Make the KeySpecifier fields crate-public.Gabriela Moldovan2023-12-051-7/+7
| | | | We're about to use them.