Skip to content

Commit 762755d

Browse files
authored
refactor: use more openvm official APIs (#152)
* v1 * clippy * more clean * less deps * rewrite build guest * load exe from releases/dev * download sol code * path buf * try * try * update * loint * fix * fix * wget * done * merge * back to old format * keep old name * minor * minor * fix * unify openvm * clean
1 parent 75289ce commit 762755d

File tree

9 files changed

+363
-532
lines changed

9 files changed

+363
-532
lines changed

Cargo.lock

Lines changed: 160 additions & 326 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", rev =
4242
openvm-rv32im-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
4343

4444
# openvm host libs
45-
openvm-build = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
46-
openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
47-
openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
48-
openvm-instructions ={ git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
49-
openvm-native-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
50-
openvm-native-compiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
51-
openvm-native-recursion = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
52-
openvm-native-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
53-
openvm-rv32im-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
54-
openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
55-
openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1", default-features = false }
45+
openvm-build = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
46+
openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
47+
openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
48+
openvm-instructions ={ git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
49+
openvm-native-circuit = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
50+
openvm-native-compiler = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
51+
openvm-native-recursion = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
52+
openvm-native-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
53+
openvm-rv32im-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
54+
openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
55+
openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "5368d4756993fc1e51092499a816867cf4808de0", default-features = false }
5656

5757
# more openvm related libs
58-
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", rev = "f48090c9febd021f8ee0349bc929a775fb1fa3ad" }
58+
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.1.1" }
5959
p3-field = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
6060

6161
sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll"] }
@@ -126,11 +126,6 @@ revm-state = { git = "https://github.com/scroll-tech/revm", branch = "feat/reth-
126126
ruint = { git = "https://github.com/scroll-tech/uint.git", branch = "v1.15.0" }
127127
alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "v1.2.0" }
128128

129-
#alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "v0.8.18-euclid-upgrade" }
130-
#ruint = { git = "https://github.com/scroll-tech/uint.git", branch = "v1.12.3" }
131-
#tiny-keccak = { git = "https://github.com/scroll-tech/tiny-keccak", branch = "scroll-patch-v2.0.2-euclid-upgrade" }
132-
#ruint = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.1-rc.1" }
133-
134129
[profile.maxperf]
135130
inherits = "release"
136131
lto = "fat"

crates/circuits/bundle-circuit/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ fn main() {
3333
// Validate the witness for the current circuit layer.
3434
let public_inputs = C::validate(witness);
3535

36-
// Reveal the public-input values of the current circuit layer.
36+
// Reveal the public input values of the current circuit layer.
3737
C::reveal_pi(&public_inputs);
3838
}

crates/integration/tests/bundle_circuit.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,15 @@ fn e2e() -> eyre::Result<()> {
147147

148148
let evm_proof: OpenVmEvmProof = proof.into_evm_proof().unwrap().into();
149149

150-
let observed_instances = &evm_proof.instances;
150+
let observed_instances = &evm_proof.user_public_values;
151151

152152
for (i, (&expected, &observed)) in expected_pi_hash
153153
.iter()
154-
.zip(observed_instances.iter().skip(14).take(32))
154+
.zip(observed_instances.iter())
155155
.enumerate()
156156
{
157157
assert_eq!(
158-
halo2curves_axiom::bn256::Fr::from(u64::from(expected)),
159-
observed,
158+
expected, observed,
160159
"pi inconsistent at index {i}: expected={expected}, observed={observed:?}"
161160
);
162161
}

0 commit comments

Comments
 (0)