aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hspow
Commit message (Collapse)AuthorAgeFilesLines
* Update patchlevel for crates with nontrivial changes.Nick Mathewson2023-09-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are: ``` hashx equix tor-async-utils tor-error tor-config tor-rtmock tor-llcrypto tor-bytes tor-hscrypto tor-hspow tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-netdir tor-chanmgr tor-guardmgr tor-dirmgr tor-keymgr tor-hsclient tor-hsservice arti-client arti ```
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* tor-hspow: Shorten the solve_effort1k_aa_41_01 testMicah Elizabeth Scott2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | The solve tests are all tunable so that we can balance execution time with test coverage. A longer solve will test more random programs and it will test more of the nonce increment function, minor benefits at the cost of much more CPU. The starting nonce in solve_effort1k_aa_41_01 was set so that we would exercise a rollover in bit 7 of the nonce increment before the full width rollover, but this wasn't a particularly helpful place to test and certainly not worth the 13+ seconds it takes on my machine. This patch bumps the starting nonce to a value much closer to the target, and still including the full-width rollover. Brings solve_effort1k_aa_41_01 down from 13.2 seconds to 0.5 sec for me. For ticket #991 Signed-off-by: Micah Elizabeth Scott <[email protected]>
* tor-hspow: Split up hspow_vectors testsMicah Elizabeth Scott2023-08-011-8/+106
| | | | | | | | | | | This test had one large function for all the verifies and one for all the solves. The solve test was slow enough to be a bottleneck, documented in ticket #991. This patch splits the existing tests up in to one labeled function per solve or verify configuration. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* Run "fixup features" in preparation for a release.Nick Mathewson2023-08-011-1/+1
|
* tor-hspow, equix, hashx: Comment tweaksMicah Elizabeth Scott2023-07-275-29/+63
| | | | | | Making a few comment tweaks suggested in review feedback. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* tor-hspow: Simplify and optimize Challenge::newMicah Elizabeth Scott2023-07-271-10/+17
| | | | | | | | | Challenges are now built using try_extend_from_slice instead of iterators. There's no CPU benchmark in this crate yet, but I can confirm that the resulting code is shorter. With this patch, the entirety of Challenge:new() is automatically inlined at call sites. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* tor-hspow, equix, hashx: Make all error types CloneMicah Elizabeth Scott2023-07-272-5/+5
| | | | | | | This uses an Arc to hold std::io::Error for low-level HashX runtime errors. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* Update equix, hashx, tor-hspow for new clippy defaultsMicah Elizabeth Scott2023-07-271-1/+1
| | | | Just running maint/add_warning after the rebase
* Start implementing Proposal 327Micah Elizabeth Scott2023-07-2711-0/+1055
This adds a new tor-hspow crate with the first layers of support in place for onion service client puzzles as described in Proposal 327. The API here is experimental, and it's currently only implementing the self-contained parts of the client puzzle. So, it can verify and solve puzzles, but it has no event loop integration or nonce replay tracking or prioritization code yet. These things seem like they would eventually live in the same crate. Signed-off-by: Micah Elizabeth Scott <[email protected]>