From fc775c24f73be1fabee9558da79f1c774a0fa4a3 Mon Sep 17 00:00:00 2001 From: Hussein Ait Lahcen Date: Thu, 21 Nov 2024 14:39:30 +0100 Subject: [PATCH] chore: typos and fmt --- mpc/README.md | 6 +++--- mpc/client/Cargo.toml | 2 +- mpc/coordinator/Cargo.toml | 2 +- mpc/coordinator/database.sql | 10 +++++----- mpc/mpc.nix | 4 +--- typos.toml | 1 + 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/mpc/README.md b/mpc/README.md index f7e5ee609c..b07aa95410 100644 --- a/mpc/README.md +++ b/mpc/README.md @@ -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. @@ -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. diff --git a/mpc/client/Cargo.toml b/mpc/client/Cargo.toml index b5c07cbc19..5bd69927b4 100644 --- a/mpc/client/Cargo.toml +++ b/mpc/client/Cargo.toml @@ -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 } diff --git a/mpc/coordinator/Cargo.toml b/mpc/coordinator/Cargo.toml index acbfa65c2b..08734c65a1 100644 --- a/mpc/coordinator/Cargo.toml +++ b/mpc/coordinator/Cargo.toml @@ -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 } diff --git a/mpc/coordinator/database.sql b/mpc/coordinator/database.sql index 08954e830c..7638ca7627 100644 --- a/mpc/coordinator/database.sql +++ b/mpc/coordinator/database.sql @@ -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); diff --git a/mpc/mpc.nix b/mpc/mpc.nix index b360b77251..c1f3802246 100644 --- a/mpc/mpc.nix +++ b/mpc/mpc.nix @@ -1,5 +1,4 @@ -{ self, ... }: -{ +_: { perSystem = { self', @@ -46,6 +45,5 @@ }; }; }; - checks = mpc-coordinator.checks // mpc-client.checks; }; } diff --git a/typos.toml b/typos.toml index 0493c094ea..4564a7efb5 100644 --- a/typos.toml +++ b/typos.toml @@ -1141,6 +1141,7 @@ files.extend-exclude = [ "rabby" = "rabby" "randao" = "randao" "rapide" = "rapide" +"ratatui" = "ratatui" "ratelimit" = "ratelimit" "ratelimited" = "ratelimited" "rawfile" = "rawfile"