Skip to content

Commit

Permalink
chore: spelling & fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Sep 18, 2024
1 parent 4c2bb07 commit 9e20456
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ ics23 = { path = "lib/ics23", default-features = false
linea-verifier = { path = "lib/linea-verifier", default-features = false }
linea-zktrie = { path = "lib/linea-zktrie", default-features = false }
macros = { path = "lib/macros", default-features = false }
mpc-shared = { path = "mpc/shared", default-features = false }
move-bindgen = { path = "tools/move-bindgen", default-features = false }
move-bindgen-derive = { path = "lib/move-bindgen-derive", default-features = false }
mpc-shared = { path = "mpc/shared", default-features = false }
pg-queue = { path = "lib/pg-queue", default-features = false }
poseidon-rs = { path = "lib/poseidon-rs", default-features = false }
protos = { path = "generated/rust/protos", default-features = false }
Expand Down
34 changes: 34 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Celestia
Celestine
Certus
Chainer
Cleartext
Cleper
Codehash
Coeff
Expand All @@ -46,6 +47,7 @@ Counterparty
Cpath
Cpolygon
Creds
Crossterm
Cryptopunkssvg
Csvg
Cypherpunk
Expand All @@ -62,7 +64,9 @@ ECTO
Edgi
EigenLayer
Embedder
Evals
F1bonacc1
FFLONK
FLUSHCOMPLETE
Fatalf
Feegrant
Expand All @@ -76,6 +80,7 @@ Fsvg
Fuga
Fwww
GOARCH
GOBIN
GOPATH
GOPRIVATE
Getenv
Expand Down Expand Up @@ -148,6 +153,7 @@ PINGPONG
PRECOMMIT
PREVOTE
PROTOC
PTAU
Parameterizable
Paramspace
Partset
Expand All @@ -156,13 +162,16 @@ Pedersen
Phasellus
PoisonPhang
Polkadot
Postgrest
Prefixer
Protobuf
Proxiable
Pruijs
Ptau
QUMGLDJ
Quickstart
Qyby
ROWTYPE
RUSTFLAGS
Recvs
Redelegate
Expand Down Expand Up @@ -197,6 +206,7 @@ Subdemom
Sublist
Subo
Subtrie
TIMSTAMPTZ
TOCTOU
Tada
Tempdirs
Expand Down Expand Up @@ -239,7 +249,9 @@ YMSB
Yair
ZFTB
ZKACCOUNT
ZKEY
ZKTRIE
Zkey
aarch
abci
abidump
Expand Down Expand Up @@ -269,6 +281,7 @@ ankr
antialised
anypb
anys
apikey
appchain
appchains
appetito
Expand Down Expand Up @@ -302,6 +315,7 @@ autocapitalize
autocli
autocliv
autocorrect
autoresize
autotests
awkroot
axelar
Expand Down Expand Up @@ -329,6 +343,7 @@ binaryen
bindgen
bindingstypes
bindir
binutils
biomejs
bitarray
bitcanna
Expand Down Expand Up @@ -357,6 +372,7 @@ bools
bootnode
borsh
brainer
buildmode
builtins
bumpp
bunx
Expand Down Expand Up @@ -385,6 +401,7 @@ chevdor
chrono
circom
clazz
cleartext
cliclack
clientkeeper
clienttx
Expand All @@ -403,6 +420,7 @@ codespace
coeff
cofactor
coinbases
combinators
comdex
cometbft
cometbls
Expand Down Expand Up @@ -452,6 +470,7 @@ cratedir
crisiskeeper
crisistypes
crossorigin
crossterm
cryptocom
cryptware
ctfassets
Expand Down Expand Up @@ -528,6 +547,7 @@ ethcall
etherbase
ethevent
ethkey
evals
evidencekeeper
evidencetypes
evmincosmos
Expand Down Expand Up @@ -632,6 +652,7 @@ hlist
hmac
holiman
horcrux
httpdate
httpie
httptemplate
hubblestatus
Expand Down Expand Up @@ -673,6 +694,7 @@ icahostkeeper
icahosttypes
icatypes
iconify
iden
identifer
identifing
idents
Expand Down Expand Up @@ -750,6 +772,7 @@ libcxx
libdir
libexec
libfuzzer
libgalois
libgit
libiconv
libmuslc
Expand Down Expand Up @@ -809,6 +832,7 @@ monitonically
monniker
moreutils
mosmo
mpcsetup
msgservice
msvc
muldefs
Expand Down Expand Up @@ -927,7 +951,9 @@ popd
porttypes
postcss
postgrespassword
postgrest
posthandler
powersoftau
precommit
precommits
prehash
Expand Down Expand Up @@ -958,6 +984,7 @@ prysm
prysmaticlabs
prysmctl
psim
ptau
pubkey
pubkey's
pubkeys
Expand All @@ -980,6 +1007,7 @@ qxrx
qypy
rabby
randao
ratatui
ratelimit
ratelimited
rawfile
Expand Down Expand Up @@ -1083,6 +1111,7 @@ slurpfile
smallvec
snapshotter
snapshottypes
snarkjs
soketto
solomachine
sonner
Expand Down Expand Up @@ -1117,6 +1146,7 @@ statesync
staticcheck
staticlib
stdenv
stdlib
storemetrics
storetypes
storyblok
Expand Down Expand Up @@ -1149,6 +1179,7 @@ substituters
substores
subtrie
sumbitter
supa
supabase
superforms
supermajority
Expand Down Expand Up @@ -1269,6 +1300,7 @@ unionvaloper
unionvaloperpub
unionvisor
unittests
unixepoch
unjail
unjailed
unloadable
Expand Down Expand Up @@ -1371,7 +1403,9 @@ zerion
zeroize
zerolog
zetachain
zket
zkevm
zkey
zkgm
zkps
zktrie
Expand Down
6 changes: 5 additions & 1 deletion mpc/client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ async fn contribute(
// Gnark phase2 contribution appends the sha256 hash at the end
let phase2_contribution_hash = &phase2_contribution[phase2_contribution.len() - 32..];
let signature = CleartextSignedMessage::sign(
&signed_message(&current_payload.id, &payload_id, &hex::encode(phase2_contribution_hash)),
&signed_message(
&current_payload.id,
&payload_id,
&hex::encode(phase2_contribution_hash),
),
&mut secret_key,
|| String::new(),
)
Expand Down
24 changes: 12 additions & 12 deletions mpc/coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ name = "mpc-coordinator"
version = "0.1.0"

[dependencies]
async-sqlite = "0.2.2"
clap = { version = "4.5", features = ["derive"] }
futures.workspace = true
hex = { workspace = true }
mpc-shared = { workspace = true }
pgp = "0.13"
postgrest = "1.0"
reqwest = { workspace = true, features = ["json"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
async-sqlite = "0.2.2"
clap = { version = "4.5", features = ["derive"] }
futures.workspace = true
hex = { workspace = true }
mpc-shared = { workspace = true }
pgp = "0.13"
postgrest = "1.0"
reqwest = { workspace = true, features = ["json"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "json", "tracing-log"] }
tracing-subscriber = { workspace = true, features = ["env-filter", "json", "tracing-log"] }
4 changes: 2 additions & 2 deletions mpc/coordinator/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ CREATE POLICY view_all
true
);

-- The next contributor is the one with the higest score that didn't contribute yet.
-- The next contributor is the one with the highest score that didn't contribute yet.
CREATE OR REPLACE FUNCTION set_next_contributor_trigger() RETURNS TRIGGER AS $$
BEGIN
CALL public.set_next_contributor();
Expand Down Expand Up @@ -302,7 +302,7 @@ CREATE OR REPLACE VIEW current_queue_position AS

ALTER VIEW current_queue_position SET (security_invoker = on);

-- The current payload is from the latest successfull contribution
-- The current payload is from the latest successful contribution
CREATE OR REPLACE VIEW current_payload_id AS
SELECT COALESCE(
(SELECT q.payload_id
Expand Down
7 changes: 1 addition & 6 deletions mpc/coordinator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ use tracing_subscriber::EnvFilter;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
#[arg(
global = true,
short = 'f',
long,
default_value = "json"
)]
#[arg(global = true, short = 'f', long, default_value = "json")]
log_format: LogFormat,
#[command(subcommand)]
command: Command,
Expand Down
11 changes: 9 additions & 2 deletions mpc/shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ pub fn phase2_verify(
}
}

pub fn signed_message(previous_payload_id: &str, next_payload_id: &str, payload_hash: &str) -> String {
format!("0______0 - {} - {} - {}", previous_payload_id, next_payload_id, payload_hash)
pub fn signed_message(
previous_payload_id: &str,
next_payload_id: &str,
payload_hash: &str,
) -> String {
format!(
"0______0 - {} - {} - {}",
previous_payload_id, next_payload_id, payload_hash
)
}

0 comments on commit 9e20456

Please sign in to comment.