Skip to content

Commit

Permalink
chore: typos and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Nov 21, 2024
1 parent 33c4201 commit e092b55
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions mpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This project contains the client and coordinator to conduct Groth16 multi-party computation for the circuit SRS.
Three components are in play:

- Supabase : host the state machine in postgresql and exposes api and storage services to upload contributions.
- Supabase: host the state machine in postgresql and exposes api and storage services to upload contributions.
- Coordinator: contact Supabase and verify contribution to step the state machine.
- Client: pure function that accepts the current contributor id and generate then upload a contribution payload.

Expand All @@ -20,10 +20,10 @@ The coordinator is in charge of verifying contributions. When a contribution is
Exposes an API to contribute at `localhost:4919`:

- `OPTIONS /contribute`
- `POST /contribute` a `Contribute` object in body. Returns :
- `POST /contribute` a `Contribute` object in body. Returns:
- a `202 Accepted` if the contribution started.
- a `503 Unavailable` if the client is busy (likely already contributing).
- `GET /contribute` returns :
- `GET /contribute` returns:
- a `200 Ok` if everything is ok with the body containing an encoded `Status` representing the client status (idle, contributing etc...).
- a `500 InternalServerError` if the contribution failed unexpectedly, the body contains the error message.

Expand Down
2 changes: 1 addition & 1 deletion mpc/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
[dependencies]
async-sqlite = "0.2.2"
base64 = { workspace = true }
clap = { version = "4.5", features = ["derive"] }
clap = { workspace = true, features = ["derive"] }
crossterm = "0.27.0"
futures-util = "0.3"
hex = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion mpc/coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "0.1.0"

[dependencies]
async-sqlite = "0.2.2"
clap = { version = "4.5", features = ["derive"] }
clap = { workspace = true, features = ["derive"] }
futures.workspace = true
hex = { workspace = true }
mpc-shared = { workspace = true }
Expand Down
10 changes: 5 additions & 5 deletions mpc/coordinator/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ BEGIN;
-----------
-- Erase --
-----------
TRUNCATE TABLE public.log;
TRUNCATE TABLE auth.users CASCADE;
DELETE FROM storage.objects o
WHERE o.bucket_id = 'contributions'
AND o.name <> '00000000-0000-0000-0000-000000000000';
-- TRUNCATE TABLE public.log;
-- TRUNCATE TABLE auth.users CASCADE;
-- DELETE FROM storage.objects o
-- WHERE o.bucket_id = 'contributions'
-- AND o.name <> '00000000-0000-0000-0000-000000000000';

-- Default bucket for contributions upload
INSERT INTO storage.buckets(id, name, public) VALUES('contributions', 'contributions', false);
Expand Down
4 changes: 1 addition & 3 deletions mpc/mpc.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ self, ... }:
{
_: {
perSystem =
{
self',
Expand Down Expand Up @@ -46,6 +45,5 @@
};
};
};
checks = mpc-coordinator.checks // mpc-client.checks;
};
}
1 change: 1 addition & 0 deletions typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,7 @@ files.extend-exclude = [
"rabby" = "rabby"
"randao" = "randao"
"rapide" = "rapide"
"ratatui" = "ratatui"
"ratelimit" = "ratelimit"
"ratelimited" = "ratelimited"
"rawfile" = "rawfile"
Expand Down

0 comments on commit e092b55

Please sign in to comment.