Skip to content

Commit c48a4bc

Browse files
lightsinglispcroynalnarutoVelacielanoel2004
authored
Support for L3 Validium (Cloak) (#164)
* cargo check * fix * fix * x * exchange code * fix rebase * fmt * actually Infallible * fmt * add validium * mark todo * add test data * add test * upgrade * update openvm guest * fmt & check * update batch program * build * build * fix: remove tiny-keccak (#168) * fix merge * fix build * remove generic as no need for rkyv * fmt * make ecies openvm irrelevant * add makefile * fix download-release.sh * proving 0.5.2 * fix tx data len * feat: update sbv bincode (#169) * update ref * revert chunk_exe_commit.rs * rewrite vk in testing * sync * add script * add script * cleanup * clean much old codes * lint * clippy * update sbv * 0.6.0 * docker ignore * build * add exe_commit.rs * update * validium batch-bundle (#175) * preliminary work * chore: clippy fix * update versioned public inputs * fix: compilation for crate/integration * fix: further changes to support integration tests * fix: dir name for validium * test: with euclid-v2 for older testdata * commitment * fix: update due to upstream --------- Co-authored-by: Zhuo Zhang <mycinbrin@gmail.com> * clean * unify openvm to v1.4.0 * add old feynman witness structs * fix gpu * fix * move blob_consistency/types.rs * fix * minor improvements * clean * fmt * better logging * commits * add feature=host for types crate * fix merge * sanity check for blob * test: more data (feynman) for validium * fix: path to witnesses * feat: update public for validium * make ValidiumInputs public * chore: export version module * chore: serde for version types * chore: commitments * release: update release name to validium * fix: script syntax ? * chore: restore changes * fix building scripts * swtich back to non-force mode in gen verifier.bin * it is 1.3.. a bit tricky.. will explain later. * update guest commits * [Fix] Issues for validium mode (#194) * fix issues in e2e test with coordinator * add debug fields * update commits * Soundness issues in Validium (#196) * fix: soundness issues in validium mode * chore: rename method validium pi_hash * chore: rename another pi_hash validium * update commit --------- Co-authored-by: Zhuo Zhang <mycinbrin@gmail.com> Co-authored-by: Rohit Narurkar <rohit.narurkar@proton.me> * update sbv and reth * Merge remote-tracking branch 'origin/master' into feat/validium * release.sh be compatible with sh * resume features removed by mistake allow chunk can be built in host * fix soundness issue update commit * fix batch gen. in integration * hack some test stuff to fit the integration tests --------- Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com> Co-authored-by: Rohit Narurkar <rohit.narurkar@proton.me> Co-authored-by: Velaciela <git.rover@outlook.com> Co-authored-by: Ho <fan@scroll.io> Co-authored-by: Ho <noelwei@gmail.com>
1 parent 558fdc5 commit c48a4bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3047
-2020
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
/.output
44

5+
!/releases/dev/verifier/verifier.bin
6+
!/releases/dev/verifier/verifier.sol
57
/releases
68

79
*.log

Cargo.lock

Lines changed: 153 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ alloy-primitives = { version = "1.3", default-features = false, features = [
8686
"rkyv",
8787
] }
8888
alloy-serde = { version = "1.0.13", default-features = false }
89+
alloy-sol-types = { version = "1.3", default-features = false }
8990
bitcode = { version = "0.6.5", default-features = false, features = [
9091
"serde",
9192
"derive",
@@ -97,6 +98,7 @@ clap = "4.5"
9798
c-kzg = { version = "2.0" }
9899
csv = "1.3.1"
99100
derivative = "2.2.0"
101+
ecies = { git = "https://github.com/scroll-tech/ecies-rs" }
100102
eyre = "0.6"
101103
futures = "0.3"
102104
halo2curves-axiom = { version = "0.5.3" }
@@ -156,6 +158,23 @@ revm-state = { git = "https://github.com/scroll-tech/revm" }
156158

157159
alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "feat/rkyv" }
158160

161+
## FIXME: when openvm fixes https://github.com/openvm-org/openvm/pull/1937
162+
#[patch.'https://github.com/openvm-org/openvm.git']
163+
#openvm = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
164+
#openvm-algebra-complex-macros = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
165+
#openvm-custom-insn = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
166+
#openvm-sha2 = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
167+
#openvm-sha256-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
168+
#openvm-p256 = { git = "https://github.com/lightsing/openvm.git", package = "p256", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
169+
#openvm-k256 = { git = "https://github.com/lightsing/openvm.git", package = "k256", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
170+
#openvm-pairing = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
171+
#openvm-keccak256-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
172+
#openvm-algebra-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
173+
#openvm-ecc-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
174+
#openvm-bigint-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
175+
#openvm-pairing-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
176+
#openvm-rv32im-guest = { git = "https://github.com/lightsing/openvm.git", rev = "f834efa186784cfdb0401c8596e1264cc9030f97" }
177+
159178
[profile.maxperf]
160179
inherits = "release"
161180
lto = "fat"

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ else
1717
CARGO_CONFIG_FLAG =
1818
endif
1919

20+
SRS_PARAMS_DIR := $(HOME)/.openvm/params
21+
SRS_PARAMS_URL := https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/params
22+
SRS_PARAMS := $(SRS_PARAMS_DIR)/kzg_bn254_22.srs $(SRS_PARAMS_DIR)/kzg_bn254_24.srs
23+
24+
# Download params if missing
25+
$(SRS_PARAMS_DIR)/%.srs:
26+
@mkdir -p $(SRS_PARAMS_DIR)
27+
@if [ ! -f "$@" ]; then \
28+
echo "Fetching $(@F) from $(SRS_PARAMS_URL)"; \
29+
wget -q -O "$@" "$(SRS_PARAMS_URL)/$(@F)"; \
30+
fi
31+
2032
download-release:
2133
sh download-release.sh
2234

@@ -54,6 +66,9 @@ test-execute-chunk:
5466
test-execute-chunk-multi:
5567
@cargo test $(CARGO_CONFIG_FLAG) --release -p scroll-zkvm-integration --test chunk_circuit test_execute_multi -- --exact --nocapture
5668

69+
test-execute-validium-chunk:
70+
@cargo test --release -p scroll-zkvm-integration --test chunk_circuit test_execute_validium -- --exact --nocapture
71+
5772
test-cycle:
5873
@cargo test $(CARGO_CONFIG_FLAG) --release -p scroll-zkvm-integration --test chunk_circuit test_cycle -- --exact --nocapture
5974

@@ -66,6 +81,9 @@ test-execute-batch-fast:
6681
test-execute-bundle:
6782
@cargo test $(CARGO_CONFIG_FLAG) --release -p scroll-zkvm-integration --test bundle_circuit test_execute -- --exact --nocapture
6883

84+
test-execute-validium-e2e:
85+
@cargo test --release -p scroll-zkvm-integration --test bundle_circuit test_execute_validium -- --exact --nocapture
86+
6987
test-single-chunk:
7088
@cargo test $(CARGO_CONFIG_FLAG) --release -p scroll-zkvm-integration --test chunk_circuit setup_prove_verify_single -- --exact --nocapture
7189

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#![cfg_attr(rustfmt, rustfmt_skip)]
22
//! Generated by crates/build-guest. DO NOT EDIT!
33
4-
pub const COMMIT: [u32; 8] = [775328021, 994686220, 311977693, 1767703568, 225895022, 1451295799, 448321152, 1883850545];
4+
pub const COMMIT: [u32; 8] = [895296330, 1148458384, 132512161, 428973880, 1840310420, 1233162636, 1450429136, 1332854351];

0 commit comments

Comments
 (0)