Commit Graph

209 Commits

Author SHA1 Message Date
Cecylia Bocovich c92a14d612
Use more descriptive error for lox proto functions
Request functions for protocols in the Lox library previously returned a
ProofError error type, which is not verbose enough to allow for accurate
debugging.

This commit introduces a new error enum, CredentialError, with several
types that allow for descriptive error messages.
2024-03-12 16:16:04 -04:00
Renovate Bot bd58409762 Update Rust crate serde_with to 3.7.0 2024-03-11 22:09:04 +00:00
Cecylia Bocovich 12deeddeb0
Further condense search for replacement spares 2024-03-09 20:55:40 -05:00
Cecylia Bocovich 762fef432f
Remove unecessary res variable 2024-03-09 20:55:40 -05:00
Cecylia Bocovich a6c98b8f43
De-duplicate bridge replacement code 2024-03-09 20:55:40 -05:00
Cecylia Bocovich e6b0cf842a
Pass available_bridge by value rather than reference
Allows us to pop() from extra_bridges, which is less prone to errors than
calling both last() and then remove().
2024-03-09 20:55:40 -05:00
Cecylia Bocovich 2c396f63fa
Factor out a dissolve_spare_bucket fn
This function takes a spare bucket, specified by the given key, and
repurposes the bridges as unallocated.
2024-03-09 20:15:03 -05:00
Cecylia Bocovich 41402209f5
Delay recycling bridge table keys until we're done with them 2024-03-09 20:14:34 -05:00
Cecylia Bocovich 6462027b7f
Simplify selection of spare replacement bucket 2024-03-09 20:14:29 -05:00
Cecylia Bocovich 203b949d43
Use let-else to return early and reduce indentation 2024-03-09 16:25:41 -05:00
Renovate Bot bbfdd08ca1
Update Rust crate serde to 1.0.197
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-03-08 13:13:20 -05:00
onyinyang 420d3be4bd Fixes last open invite bucket distribution 2024-02-12 23:11:55 +00:00
Renovate Bot 906577f6a8
Update Rust crate time to 0.3.34
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:17:30 -05:00
Renovate Bot 9175f636d5
Update Rust crate serde to 1.0.196
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:15:08 -05:00
Renovate Bot 10067f6be6 Update Rust crate thiserror to 1.0.57 2024-02-11 19:40:16 +00:00
Renovate Bot f72c7ed4fa Update Rust crate serde_with to 3.6.1 2024-02-09 00:36:36 +00:00
Renovate Bot 4e64c8b144 Update Rust crate serde_with to 3.6.0 2024-01-31 23:42:01 +00:00
Renovate Bot 6a10e4e748 Update Rust crate serde_with to 3.5.1 2024-01-23 20:53:03 +00:00
Renovate Bot 60a47c962f Update Rust crate serde_with to 3.5.0 2024-01-22 16:23:32 +00:00
onyinyang 33e24ef5b6 Fix bug in bridge_replace fn, test 2024-01-18 03:34:22 +00:00
onyinyang 6afc557ad5 Fix length of bridge bytes and rdsys request interval 2024-01-17 16:43:39 +00:00
Renovate Bot fb8a5e89a2 Update Rust crate serde to 1.0.195 2024-01-08 16:12:22 +00:00
Renovate Bot 46ba68e1b5 Update Rust crate thiserror to 1.0.56 2024-01-08 16:04:30 +00:00
onyinyang 075d51b088 Add better serde error handling to wasm functions 2023-12-21 17:00:49 +00:00
Cecylia Bocovich 39449cabe8
Respond with error when open invitation buckets are empty
Expand the error type returns by invite() to include a new error for
when there are no available bridges for open invitation users. This
fixes a bug that previously caused a panic when we have no bridges to
distribute.

See https://gitlab.torproject.org/tpo/anti-censorship/lox/-/issues/43
2023-12-20 13:52:42 -05:00
onyinyang c8b6bb9fdd Formatting and clippy changes 2023-12-19 20:02:12 +00:00
Renovate Bot 918a5555b8 Update Rust crate time to 0.3.31 2023-12-19 10:06:55 +00:00
onyinyang 9294fb9fd1
Fixup keywords in all Cargo.toml files 2023-11-23 12:04:00 -05:00
onyinyang 472445a9a5
Add README for rdsys-backend-api, lox-utils and switch to lox-zkp crate 2023-11-23 11:44:05 -05:00
onyinyang a27df0b6c6
Update Cargo.tomls to point to correct README location 2023-11-22 14:49:09 -05:00
onyinyang fdde186c92
Add lox-wasm and lox-utils READMEs and other fmt fixes 2023-11-21 12:57:00 -05:00
Renovate Bot 02df29a249 Update Rust crate serde to 1.0.193 2023-11-21 02:07:04 +00:00
Renovate Bot ec15d0f229 Update Rust crate thiserror to 1.0.50 2023-11-20 16:06:32 +00:00
onyinyang 66f560eb08 Remove unneeded fields from bridgeline and reduce BRIDGE_BYTES 2023-11-14 17:30:45 +00:00
onyinyang cb159405a3 Add watched_blockages to config file and improve naming 2023-11-14 17:30:45 +00:00
Renovate Bot 517faf7576 Update Rust crate serde to 1.0.192 2023-11-09 03:35:30 +00:00
onyinyang e356034dae
Fixup and add comments, README to Lox Library 2023-11-07 18:44:25 -05:00
onyinyang ea37984da6
Update Cargo.toml for each crate for crates.io 2023-11-07 00:12:18 -05:00
onyinyang ba70b1b4d4
Add a MAX_DAILY_BRIDGES to limit invites per day 2023-10-30 15:17:08 -04:00
Renovate Bot 683595abbc Update Rust crate serde to 1.0.190 2023-10-26 04:06:18 +00:00
onyinyang 96a03f1a27
Remove non-implicit invremain attribute fields 2023-10-23 17:11:15 -04:00
onyinyang 3b2ee73bab
Remove backend options 2023-10-23 15:22:14 -04:00
onyinyang ed72b05347
Add changes for bug fix in zkp crate 2023-10-23 15:22:11 -04:00
onyinyang 794f80ab11
Fix bug in DupFilter that breaks serialize/deserialize 2023-10-23 13:55:19 -04:00
onyinyang 2d9febaf14
Update zkp crate dependency address 2023-10-23 13:44:45 -04:00
Renovate Bot 4e436e006b Update Rust crate time to 0.3.30 2023-10-19 15:35:04 +00:00
onyinyang f7f7a36812
Change address of zkp library 2023-10-19 10:58:52 -04:00
onyinyang 8bf938c81b
Update Cargo to point to public github zkp for now 2023-10-19 10:58:32 -04:00
onyinyang 68b5a9c18e
Upgrading several dalek dependencies and rand 2023-10-19 10:58:09 -04:00
onyinyang 4f7b96a603
Fix up some minor issues + fix bug in context sync 2023-10-18 12:09:46 -04:00