summaryrefslogtreecommitdiff
path: root/tor-dirmgr/src/storage
Commit message (Collapse)AuthorAgeFilesLines
* Fix some warnings about needless & from nightly clippyNick Mathewson2021-06-181-2/+2
|
* Add the "unreachable_pub" lint.Nick Mathewson2021-05-181-19/+29
| | | | | | This is a somewhat obnoxious change in its scope and requirements, but it makes it easier to understand what the real public and private parts of our APIs are.
* Always capitalize as RouterDesc, Microdesc.Nick Mathewson2021-05-181-4/+4
|
* Improved tests for sqlite storage.Nick Mathewson2021-05-141-2/+77
|
* Remove untested legacy.rs code. Add a comment about where to find it.Nick Mathewson2021-05-101-168/+0
|
* Repair multiprocess collaborative directory download.Nick Mathewson2021-05-031-1/+1
|
* Major revision on DirMgr logic -- almost a complete rewrite.Nick Mathewson2021-04-131-9/+14
| | | | | | | | The big idea of this revision is to separate the code that knows about doing downloads from the code that decides what to download. Later, we can make a similar change for database access. With these changes together, we can make our code much more testable, and eventually enable more download types in parallel.
* Start moving responsibility for building requests into dirmgrNick Mathewson2021-04-091-22/+46
| | | | This will help with my planned "directory state" refactoring.
* Upgrade rusqlite; remove needless usage.Nick Mathewson2021-04-051-21/+15
|
* DirMgr: add text() and texts() functions to ask for document textNick Mathewson2021-03-311-22/+25
| | | | | Also, start on a larger refactoring where we ask for documents by their ID.
* Refactor sqlite.rs to know about consensus flavors.Nick Mathewson2021-03-311-23/+52
| | | | | These were stored in the database before, but they were hardwired in the API.
* Look for RdDigest in the right locationNick Mathewson2021-03-301-1/+2
|
* small tweaks to routerdesc storage code.Nick Mathewson2021-03-301-48/+20
|
* dirmgr: Add functions to store/read/update router descriptorsDavid Goulet2021-03-301-3/+131
| | | | Signed-off-by: David Goulet <[email protected]>
* dirmgr: Add SQLite schema for router descriptorsDavid Goulet2021-03-301-9/+21
| | | | Signed-off-by: David Goulet <[email protected]>
* Fix Rust-1.51 clippy warnings about acronyms in camel case.Nick Mathewson2021-03-292-9/+9
| | | | This is painful, but we shouldn't have to do it again.
* DirMgr: cooperative multiprocess support.Nick Mathewson2021-03-291-24/+13
| | | | | | | | | | | | | | A directory manager can now launch or run in read-only or read-write mode, depending on whether it manages to acquire a lock on the filesystem. In read-write mode, it bootstraps and stores data into the database as usual. In read-only mode, it assumes that another process will be updating the database, and so it only loads it periodically, looking for new information. However, it also tries to acquire the lock itself, so it can enter read-write mode.
* Add support for a lockfile to control concurrent access to a dirmgr.Nick Mathewson2021-03-291-11/+89
|
* Add support to override network parameters in the configuration.Nick Mathewson2021-02-161-1/+1
|
* Remove some not-necessary XXX-A1s in sqlite.rsNick Mathewson2021-01-251-3/+0
|
* dirmgr: fix usage and meaning of `pending`.Nick Mathewson2021-01-251-11/+31
| | | | | The documentation and implementation diverged; the documentation was correct.
* Detect consensuses that are signed by the wrong authorities.Nick Mathewson2021-01-251-13/+21
| | | | | | | | | | | | With this patch we don't consider a consensus to be even potentially well-signed if the authorities that are listed as signing it don't contain enough authorities we believe in. Otherwise, we'd just try fetching certs for them and failing forever. (I found this by switching from a chutney network to the main network without cleaning out my cache.) Closes #44
* Fix a few clippy warningsNick Mathewson2020-12-171-2/+5
|
* Download and use consensus diffs.Nick Mathewson2020-12-171-11/+67
| | | | | Had to refactor a few methods for database access, and fix a bug where we were storing valid_until times with the wrong information.
* Document a problem on network transitionNick Mathewson2020-12-081-0/+11
|
* Mark some XXXX issues as XXXX-A1.Nick Mathewson2020-12-071-3/+3
|
* Enforce that the periods in a consensus lifetime are nonempty.Nick Mathewson2020-12-041-1/+2
| | | | | To be valid, a lifetime must have valid_after < fresh_until < valid_until.
* only expire dorectory info on a successful bootstrap.Nick Mathewson2020-11-301-2/+1
|
* Add tests for blob_fname failing casesNick Mathewson2020-11-301-0/+17
|
* More tests for sqlite.rsNick Mathewson2020-11-301-3/+46
|
* Initial tests for authcert storageNick Mathewson2020-11-301-4/+30
|
* tor-dirmgr: Refactor storage not to take AuthCert type.Nick Mathewson2020-11-301-8/+9
| | | | Add a new AuthCertMeta type to make it easier to test.
* tor-dirmgr: Refactor storage not to take Microdesc type.Nick Mathewson2020-11-301-4/+4
| | | | | Since all it needs is an MDDigest, that's what it should take. This will make it easier to test.
* A little better logging on bootstrap.Nick Mathewson2020-11-241-3/+9
|
* When a consensus has enough descriptors, mark it non-pending.Nick Mathewson2020-11-241-3/+33
|
* When storing consensuses, index them by the sha3 of the whole file.Nick Mathewson2020-11-232-8/+9
|
* Document and de-warning the rest of tor-dirmgrNick Mathewson2020-11-232-40/+139
|
* Move a few more responsibilities into NetDirConfig.Nick Mathewson2020-11-201-0/+17
| | | | Also start a DirMgr type.
* Move storage and config logic from netdir to dirmgr.Nick Mathewson2020-11-202-0/+785