| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |/
|
|
|
| |
This is a separate class of errors that deserves its own error type. We
will soon use `KeyPathError` in other contexts as well.
|
| |\
| |
| |
| |
| | |
Followups from MSRV 1.70 upgrade
See merge request tpo/core/arti!1785
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
HSS: Store IPTs and their keys to disk, and reload on restart
Closes #967
See merge request tpo/core/arti!1782
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This function became non-dead in some earlier commit.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Mandatory formatting degradation.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Store the IptParameters in the MockEstabState, and provide a function
to list what the IPTs are. Then we can check the IPTs are reloaded
and restored after restart.
|
| | | |
| | |
| | |
| | |
| | | |
This is supposed to reload the state. In the next commit we'll check
at least some of the things.
|
| | | |
| | |
| | |
| | | |
We're going to add another call site in a moment.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously IPT creation could only fail due to key generation failures
or other kinds of internal error, which were very unlikely and treated
as fatal.
But with key persistence, IPT creation will be able to fail due to eg
disk full.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Store the IPT manager's data structure to the provided storage
manager.
Keys are not persistent yet! And we must save the publication IPT set
since it can have the only record of IPT publication times.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Actually, a SleepProvider.
We will need this for timestamp conversion during loading and saving.
channel() needs it to load. note_publication_attempt needs it for
saving, as does borrow_for_update.
|
| | | |
| | |
| | |
| | | |
Whitespace changes that make the next commit less noisy.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're about to make borrow_for_update() take a runtime parameter,
which will be a bit annoying. borrow_for_read() doesn't need one.
Call sites will come on a moment.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
We're going to want to reuse this.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
And therefore, break out the IPT manager startup, into a
MockedIptManager::start.
We can have it borrow the TempDir, legitimising the _untracked call.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
IPT persistence tests will need to actually save things.
We'll fix up the `.into_untracked()` wrinkle shortly.
|
| | | |
| | |
| | |
| | |
| | | |
We're about to need to arrange to have the same runtime earlier, so
run_test needs to accept one from the caller.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This is going to load the state from disk.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Introduce type aliases for the Arc<dyn >. Add Send and Sync bounds.
* Pass the storage manager to ipt_mgr and the per-key handle to ipt_set.
* Store the handles in ipt_mgr::Immutable and IptPublishSet.
* Change the ipt mgr storage key to "hs_ipts_{nickname}". This avoids use
of "_" as a non-separator, and allows the possibility of other
submodules using other storage keys too - and, here, we introduce one.
* Provide a dummy struct for the IPT set state, which is needed to
define the type alias etc. We'll populate that struct later.
|
| | | | |
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we can't store IPT details, we mustn't publish the corresponding
IPT. But that's not fatal; maybe we can store later. So introduce a
new IptStoreError type, and change the return value from some
functions that are going to be able to fail that way.
This introduces a new TODO HSS: we need the publisher to be able to
retry after such a failure.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
tor-hsservice: Measure last_uploaded from when the upload was initiated.
Closes #1142, #1130, and #1132
See merge request tpo/core/arti!1787
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Fixes #1132
|
| | | |
| | |
| | |
| | | |
This promotes some logs to `debug!` and adds some new trace-level logs.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
I don't think we need to do this (rate-limiting/debouncing the uploads
in upload_all should be sufficient).
Closes #1130
|
| | | |
| | |
| | |
| | |
| | | |
We're about to use this for retrying failed uploads too (so let's give
it a more generic name).
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This also fixes an incorrect duration calculation (it should be
`now.duration_since(last_uploaded)` rather than
`last_uploaded.duration_since(now)`).
Fixes #1142
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Cleanup and clarification re cache_dir and state_dir (rename in tor_dirmgr)
See merge request tpo/core/arti!1789
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently some components do this one way, and some the other. This
is confusing. We should do it one way. This way is slightly better
because it makes navigation with `grep` easier.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This variable contains precisely the value of cache_dir from
arti_client::config::StorageConfig and it should therefore have the
same name.
|
| | | | | |
|
| | | | | |
|
| | |/ /
| | |
| | |
| | | |
tor-ptmgr uses it, and the key manager too.
|