summaryrefslogtreecommitdiff
path: root/crates/tor-dirserver/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-dirserver: Add SaturatingSystemTimeClara Engler2025-10-301-27/+0
| | | | | | This commit changes various things in the dirmirror operation, namely the use of a SystemTime wrapper type that provides saturation on both ends.
* tor-dirserver: Make database full syncClara Engler2025-10-301-20/+7
| | | | | | | | | | This commit makes the entire database operations synchronous, thereby replacing deadpool with r2d2. The full motivation is outlined in a rustdoc comment at the top of the `database` module, but it can be summarized to the fact that SQLite is by design inherently synchronous due to directly interfacing with the file system.
* tor-dirserver: Outline the dirmirror operationClara Engler2025-10-301-0/+16
| | | | | | | | | | This commit creates a function named `mirror::operation::serve`, that will serve as the primary entry point for the dirmirror operation. While the function itself already contains some logic, such as querying the timeout to wait for the next consensus, it is largely a rustdoc design document that adds lots of comment to the `mirror::operation` module.
* tor-dirserver: Implement download timeoutClara Engler2025-10-301-0/+27
| | | | | | | | | | This commit starts work in the `mirror::operation` module by implementing the functions for calculating the `Duration` to wait from a given `SystemTime` until the point in time when the dirmirror should download new documents from the authorities again. Also, this commit introduces new error types and internal helper functions in order to fulfill this purpose better.
* tor-dirserver: Don't expose rusqlite::Error in PoolClara Engler2025-10-151-9/+16
|
* tor-dirserver: Some clippy fixesClara Engler2025-10-151-1/+4
|
* tor-dirserver: Improve the error situationClara Engler2025-10-151-28/+27
|
* tor-dirserver: Remove unused importsClara Engler2025-10-151-5/+0
|
* tor-dirserver: Get rid of the poor buildersClara Engler2025-10-151-10/+0
|
* tor-dirserver: Remove unused error membersClara Engler2025-09-041-12/+0
|
* tor-dirserver Use `tor_error::Bug`Clara Engler2025-09-041-4/+3
| | | | This commit uses `tor_error::Bug` for indicating thread poisoning.
* tor-dirmirror: Add several "TODO DIRMIRROR" linesClara Engler2025-09-041-0/+2
|
* tor-dirserver: `Unrecognized` to `Incompatible`Clara Engler2025-09-041-1/+1
|
* tor-dirserver: Make more err fields `pub(crate)`Clara Engler2025-09-041-2/+2
|
* tor-dirserver: Use transactions in endpointsClara Engler2025-09-041-0/+15
| | | | | | | | | | | | | | | | | | This commit refactors a large part of the HTTP module, namely it refactors the `Callback` type to a new type called `EndpointFn` which now works in a transaction based approach and no longer gives access to the `StoreCache`. The type itself is also no longer a trait but a concrete type using `fn`. Another very notable change that became necessary during this commit was to make large parts of the codebase synchronous instead of async, namely because it is non-trivial to `Send` a `Transaction` created inside an async context to a synchronous function. Besides, this change has been deemed necessary for other reasons to. The refactoring to more synchronous code has lead to some interesting changes in `StoreCache` too, namely that in no longer uses async mutex, but a synchronous mutex instead.
* tor-dirserver: Add clippy checks and fix themClara Engler2025-09-041-0/+3
|
* tor-dirserver: Add http moduleClara Engler2025-09-041-0/+24
| | | | | | | This commit implements the initial draft for the HTTP module. It is fairly complicated but well documented within the source code, please refer to that instead.
* tor-dirserver: Add schema moduleClara Engler2025-09-041-0/+21
| | | | | | This commit adds the `schema.rs` module, which implements the database schema alongside some functions for initializing the database and obtaining the database schema version.
* tor-dirserver: Initial commitClara Engler2025-09-041-0/+12
This commit lays the initial groundwork for the `tor-dirserver` crate, a crate that shall implement functionality for dirmirros and dirauths. For now, the current crate consists of three bare bone modules: * lib.rs * err.rs * mirror.rs All of which contain mostly boilerplate code for now