| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This disentangles the ReplyLog from the IptManager.
This will allow us to make the InternalPowError type more public (in
order to use it in the OnionServiceStatus code) without also having to
make the CreateIptError type more public.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We no longer do replay log locking in IptManager::new. Instead, we
rely on the acquire_instance call in OnionService::launch, which ends
up with ipt_mgr getting an InstanceHandle (which contains a lock
guard).
OnionServiceStateMgr is abolished; it existed to deal with the
generics in the tor_persist::StateMgr API. state_dir has no
generics (other than the T being loaded/stored).
Many places (structs and argument lists) now have state_dir types
which embody a path (or a CheckeDir) along with a lock, rather than
separate path+lock+mistrust.
The creation/startup code uses the new calls from state_dir.
Other more minor changes:
- StartupError::StateDirectoryInaccessible contains tor_persist::Error
- test::create_storage_handles_from_state_dir changed and renamed,
from _from_state_mgr.
- replay::PersistFile's (separate) file lock is now fslock_guard's
|
| |
|
|
|
|
| |
We're going to change the payload of StateDirectoryInaccessible to
tor_persist::Error, since that's what tor_persist::state_dir gives us,
but then we can't use it here.
|
| |
|
|
|
| |
The new state_dir types require &mut for storing, which is correct,
but that means we can't have it in Immutable.
|
| |
|
|
|
|
|
| |
These are here because that's what you get from the tor_persist
singleton StageMgr API (for type erasure reasons). We're going to
change these to tor_persist::state_dir types and those don't involve
Arcs.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
Let's avoid cluttering the core algorithm file with this, which is
going to expand.
|