Skip to content

Commit

Permalink
feat(sp1): hashchain signature verification in sp1 circuit (#125)
Browse files Browse the repository at this point in the history
* feat: start impl hashchain verification

progress

* sequencer tests

* start implementing signature verification for add and revoke

* fix: imports

* fixing

* fixing sequencer

* maybe worst code of my life, but signature verification works, two test still to fix tho

* use treestate in all tests, start splitting up signature verification logic

* fix nova tests, refactor test utils to use accounts directly

* wrong account :(

* test still fails

* fixing signatures

* broken but better

* deadlock? uwu

* friendship cancelled with mutex, rwlock is my new best friend

* TREMENDOUS

* further cleanups

---------

Co-authored-by: sebasti810 <[email protected]>
  • Loading branch information
distractedm1nd and sebasti810 authored Sep 22, 2024
1 parent 7482345 commit 9bfcaf6
Show file tree
Hide file tree
Showing 26 changed files with 1,231 additions and 986 deletions.
87 changes: 75 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ members = [
"crates/errors",
"crates/sp1",
]
default-members = [
"crates/prism",
"crates/common",
"crates/nova",
"crates/groth16",
"crates/errors",
]
default-members = ["crates/prism", "crates/common", "crates/errors"]
resolver = "2"

[workspace.dependencies]
Expand All @@ -41,8 +35,6 @@ async-trait = "0.1.68"
serde = { version = "1.0.151", features = ["derive"] }
serde_json = "1.0.79"
redis = "0.24.0"
ed25519-dalek = "2.1.0"
ed25519 = "2.2.0"
base64 = "0.22.0"
tokio = { version = "1.16.1", features = ["full"] }
num = "0.4.0"
Expand Down Expand Up @@ -75,6 +67,8 @@ arecibo = { git = "https://github.com/deltadevsde/arecibo" }
sha2 = "0.10.8"
auto_impl = "1.2.0"
bincode = "1.3.3"
ed25519-dalek = "2.1.1"
secp256k1 = "0.29.0"
sp1-zkvm = { version = "1.2.0" }
sp1-sdk = { version = "1.2.0" }
prism-common = { path = "crates/common" }
Expand All @@ -85,6 +79,12 @@ prism-groth16 = { path = "crates/groth16" }

[patch.crates-io]
sha2-v0-10-8 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", branch = "patch-sha2-v0.10.8" }
curve25519-dalek = { git = "https://github.com/sp1-patches/curve25519-dalek", branch = "patch-curve25519-v4.1.3", package = "ed25519-dalek" }
secp256k1 = { git = "https://github.com/sp1-patches/rust-secp256k1", branch = "patch-secp256k1-v0.29.0" }

[workspace.features]
default = []
test_utils = []

# [workspace.dev-dependencies]
# serial_test = "3.1.1"
Expand Down
8 changes: 8 additions & 0 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ homepage.workspace = true
repository.workspace = true

[dependencies]
prism-errors.workspace = true
anyhow.workspace = true
bls12_381.workspace = true
borsh.workspace = true
Expand All @@ -16,3 +17,10 @@ hex.workspace = true
sha2.workspace = true
celestia-types.workspace = true
bincode.workspace = true
log.workspace = true
ed25519-dalek.workspace = true
rand.workspace = true

[features]
default = []
test_utils = []
Loading

0 comments on commit 9bfcaf6

Please sign in to comment.