Skip to content

Commit 2e8e29f

Browse files
authored
cleaup rkyv and openvm-v13 stuffs (#232)
* cleaup rkyv and openvm-v13 stuffs * refactor sdk cycle counting (#222) * update deps * fmt * clippy
1 parent 9fb016f commit 2e8e29f

File tree

34 files changed

+394
-1053
lines changed

34 files changed

+394
-1053
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -27,48 +27,47 @@ version = "0.7.1"
2727

2828
[workspace.dependencies]
2929
# openvm guest libs
30-
openvm = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1" }
31-
openvm-algebra-complex-macros = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
32-
openvm-custom-insn = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
33-
openvm-sha2 = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1" }
34-
openvm-sha256-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
35-
openvm-p256 = { git = "https://github.com/openvm-org/openvm.git", package = "p256", tag = "v1.4.1", features = [
30+
openvm = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2" }
31+
openvm-algebra-complex-macros = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
32+
openvm-custom-insn = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
33+
openvm-sha2 = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2" }
34+
openvm-sha256-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
35+
openvm-p256 = { git = "https://github.com/openvm-org/openvm.git", package = "p256", tag = "v1.4.2", features = [
3636
"std",
3737
] }
38-
openvm-k256 = { git = "https://github.com/openvm-org/openvm.git", package = "k256", tag = "v1.4.1", features = [
38+
openvm-k256 = { git = "https://github.com/openvm-org/openvm.git", package = "k256", tag = "v1.4.2", features = [
3939
"std",
4040
] }
41-
openvm-pairing = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1" }
42-
openvm-keccak256-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
43-
openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
44-
openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
45-
openvm-bigint-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
46-
openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
47-
openvm-rv32im-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
41+
openvm-pairing = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2" }
42+
openvm-keccak256-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
43+
openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
44+
openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
45+
openvm-bigint-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
46+
openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
47+
openvm-rv32im-guest = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
4848

4949
# openvm host libs
50-
openvm-benchmarks-prove = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
51-
openvm-benchmarks-utils = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
52-
openvm-build = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
53-
openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
54-
openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
55-
openvm-instructions = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
56-
openvm-native-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
57-
openvm-native-compiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
58-
openvm-native-recursion = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
59-
openvm-native-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
60-
openvm-rv32im-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
61-
openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false, features = [
50+
openvm-benchmarks-prove = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
51+
openvm-benchmarks-utils = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
52+
openvm-build = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
53+
openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
54+
openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
55+
openvm-instructions = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
56+
openvm-native-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
57+
openvm-native-compiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
58+
openvm-native-recursion = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
59+
openvm-native-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
60+
openvm-rv32im-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
61+
openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false, features = [
6262
"parallel",
6363
"evm-prove",
64-
"legacy-v1-3-evm-verifier",
6564
"tco",
6665
"unprotected"
6766
] }
68-
openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.1", default-features = false }
67+
openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.4.2", default-features = false }
6968

7069
# more openvm related libs
71-
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1" }
70+
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.2" }
7271

7372
sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91.2" }
7473
sbv-helpers = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91.2", features = ["dev"] }
@@ -80,11 +79,10 @@ alloy-consensus = "1.0"
8079
alloy-provider = "1.0"
8180
alloy-rpc-client = "1.0"
8281
alloy-transport = "1.0"
83-
alloy-primitives = { version = "1.4.1", default-features = false, features = [
82+
alloy-primitives = { version = "1.4", default-features = false, features = [
8483
"std",
8584
"map-hashbrown",
8685
"map-fxhash",
87-
"rkyv",
8886
] }
8987
alloy-serde = { version = "1.0.13", default-features = false }
9088
alloy-sol-types = { version = "1.3", default-features = false }
@@ -103,15 +101,14 @@ ecies = { git = "https://github.com/scroll-tech/ecies-rs" }
103101
eyre = "0.6"
104102
color-eyre = "0.6"
105103
futures = "0.3"
106-
halo2curves-axiom = { version = "0.5.3" }
104+
halo2curves-axiom = { version = "0.7.2" }
107105
itertools = "0.14"
108106
hex-literal = { version = "0.4.1", default-features = false }
109107
hex = "0.4"
110108
metrics = "0.23.0"
111109
metrics-util = "0.17"
112110
metrics-tracing-context = "0.16.0"
113111
rayon = "1.10"
114-
rkyv = "0.8"
115112
revm = "29"
116113
serde = { version = "1", default-features = false, features = ["derive"] }
117114
serde_json = { version = "1.0" }
@@ -133,7 +130,7 @@ sysinfo = { version = "0.35", default-features = false }
133130
bytesize = "2.0.1"
134131
url = "2.5.4"
135132
tokio = "1"
136-
axiom-sdk = { git = "https://github.com/axiom-crypto/axiom-api-cli.git", rev = "a460528" }
133+
axiom-sdk = { git = "https://github.com/axiom-crypto/axiom-api-cli.git", branch = "develop" }
137134
dotenvy = "0.15"
138135
jiff = "0.2"
139136

@@ -161,23 +158,6 @@ revm-precompile = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v
161158
revm-primitives = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
162159
revm-state = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
163160

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

crates/integration/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ scroll-zkvm-types.workspace = true
1616
scroll-zkvm-prover.workspace = true
1717
scroll-zkvm-verifier.workspace = true
1818

19-
rkyv.workspace = true
2019
sbv-primitives = { workspace = true }
2120
sbv-utils = { workspace = true }
2221
sbv-core = { workspace = true, features = ["scroll"] }

crates/integration/src/axiom.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use axiom_sdk::build::BuildSdk;
33
use axiom_sdk::config::ConfigSdk;
44
use axiom_sdk::input::Input;
55
use axiom_sdk::prove::{ProveArgs, ProveSdk};
6-
use axiom_sdk::{AxiomConfig, AxiomSdk, ProgressCallback, ProofType, SaveOption};
6+
use axiom_sdk::{AxiomConfig, AxiomSdk, ProgressCallback, ProofType};
77
use chrono::DateTime;
88
use openvm_sdk::commit::CommitBytes;
99
use openvm_sdk::types::{EvmProof, VersionedVmStarkProof};
@@ -95,9 +95,9 @@ impl TaskProver for AxiomProver {
9595
let mhz = cycles as f64 / duration / 1e6f64;
9696
tracing::info!("Proof generated in {duration:.2} seconds: {mhz:.2} MHz");
9797

98-
let proof_bytes =
99-
self.sdk
100-
.get_generated_proof(&status.id, &proof_type, SaveOption::DoNotSave)?;
98+
let proof_bytes = self
99+
.sdk
100+
.get_generated_proof(&status.id, &proof_type, None)?;
101101

102102
match proof_type {
103103
ProofType::Stark => {

crates/integration/src/lib.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::axiom::AxiomProver;
22
use cargo_metadata::MetadataCommand;
33
use once_cell::sync::OnceCell;
4-
use openvm_sdk::StdIn;
4+
use openvm_sdk::{Sdk, StdIn};
55
use scroll_zkvm_prover::{
66
Prover,
77
setup::{read_app_config, read_app_exe},
@@ -121,18 +121,13 @@ pub trait PartialProvingTask: serde::Serialize {
121121
fn identifier(&self) -> String;
122122
fn fork_name(&self) -> ForkName;
123123

124-
fn legacy_rkyv_archive(&self) -> eyre::Result<Vec<u8>>;
125-
126124
fn archive(&self) -> eyre::Result<Vec<u8>>
127125
where
128126
Self: Sized,
129127
{
130-
let bytes: Vec<u8> = match GUEST_VERSION.as_ref() {
131-
"0.5.2" => self.legacy_rkyv_archive()?,
132-
_ => {
133-
let config = bincode::config::standard();
134-
bincode::serde::encode_to_vec(self, config)?
135-
}
128+
let bytes: Vec<u8> = {
129+
let config = bincode::config::standard();
130+
bincode::serde::encode_to_vec(self, config)?
136131
};
137132
Ok(bytes)
138133
}
@@ -211,7 +206,6 @@ pub trait ProverTester {
211206
let config = scroll_zkvm_prover::ProverConfig {
212207
path_app_exe,
213208
path_app_config,
214-
is_openvm_v13: *GUEST_VERSION == "0.5.2",
215209
..Default::default()
216210
};
217211
let prover = Prover::setup(config, Some(Self::NAME))?;
@@ -363,8 +357,8 @@ pub fn tester_execute<T: ProverTester>(
363357
.map(|p| p.as_stark_proof().expect("must be stark proof")),
364358
)?;
365359

366-
let ret =
367-
scroll_zkvm_prover::utils::vm::execute_guest(app_config.app_vm_config, &app_exe, &stdin)?;
360+
let sdk = Sdk::new(app_config)?;
361+
let ret = scroll_zkvm_prover::utils::vm::execute_guest(&sdk, app_exe, &stdin)?;
368362
Ok(ret)
369363
}
370364

crates/integration/src/testers/batch.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use scroll_zkvm_types::{
2-
batch::{BatchHeader, BatchInfo, BatchWitness, LegacyBatchWitness, ReferenceHeader},
2+
batch::{BatchHeader, BatchInfo, BatchWitness, ReferenceHeader},
33
chunk::ChunkInfo,
44
proof::ProofEnum,
55
public_inputs::{ForkName, Version},
@@ -23,12 +23,6 @@ impl PartialProvingTask for BatchWitness {
2323
header_hash.to_string()
2424
}
2525

26-
fn legacy_rkyv_archive(&self) -> eyre::Result<Vec<u8>> {
27-
let witness_legacy = LegacyBatchWitness::from(self.clone());
28-
let bytes = rkyv::to_bytes::<rkyv::rancor::Error>(&witness_legacy)?;
29-
Ok(bytes.to_vec())
30-
}
31-
3226
fn fork_name(&self) -> ForkName {
3327
ForkName::from(self.fork_name.as_str())
3428
}

crates/integration/src/testers/bundle.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use scroll_zkvm_types::{
22
batch::BatchInfo,
3-
bundle::{BundleInfo, BundleWitness, LegacyBundleWitness},
3+
bundle::{BundleInfo, BundleWitness},
44
proof::ProofEnum,
55
public_inputs::ForkName,
66
};
@@ -21,12 +21,6 @@ impl PartialProvingTask for BundleWitness {
2121
format!("{first}-{last}")
2222
}
2323

24-
fn legacy_rkyv_archive(&self) -> eyre::Result<Vec<u8>> {
25-
let witness_legacy = LegacyBundleWitness::from(self.clone());
26-
let bytes = rkyv::to_bytes::<rkyv::rancor::Error>(&witness_legacy)?;
27-
Ok(bytes.to_vec())
28-
}
29-
3024
fn fork_name(&self) -> ForkName {
3125
ForkName::from(self.fork_name.as_str())
3226
}

crates/integration/src/testers/chunk.rs

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
use crate::{
2-
GUEST_VERSION, PartialProvingTask, ProverTester, TaskProver, prove_verify,
3-
testdata_fork_directory, tester_execute, testers::PATH_TESTDATA, testing_hardfork,
4-
testing_version, utils::metadata_from_chunk_witnesses,
2+
PartialProvingTask, ProverTester, TaskProver, prove_verify, testdata_fork_directory,
3+
tester_execute, testers::PATH_TESTDATA, testing_hardfork, testing_version,
4+
utils::metadata_from_chunk_witnesses,
55
};
66
use rayon::iter::{IntoParallelIterator, ParallelIterator};
77
use sbv_core::BlockWitness;
88
use sbv_primitives::{B256, types::consensus::TxL1Message};
99
use scroll_zkvm_prover::utils::read_json;
1010
use scroll_zkvm_prover::utils::vm::ExecutionResult;
11-
use scroll_zkvm_types::chunk::ChunkWitnessUpgradeCompact;
1211
use scroll_zkvm_types::{
13-
chunk::{ChunkInfo, ChunkWitness, LegacyChunkWitness, SecretKey},
12+
chunk::{ChunkInfo, ChunkWitness, SecretKey},
1413
proof::ProofEnum,
1514
public_inputs::{ForkName, Version},
1615
};
@@ -61,29 +60,13 @@ impl PartialProvingTask for ChunkWitness {
6160
format!("{first}-{last}")
6261
}
6362

64-
fn legacy_rkyv_archive(&self) -> eyre::Result<Vec<u8>> {
65-
let witness_legacy = LegacyChunkWitness::from(self.clone());
66-
let bytes = rkyv::to_bytes::<rkyv::rancor::Error>(&witness_legacy)?;
67-
Ok(bytes.to_vec())
68-
}
69-
7063
fn archive(&self) -> eyre::Result<Vec<u8>>
7164
where
7265
Self: Sized,
7366
{
74-
let bytes: Vec<u8> = match GUEST_VERSION.as_ref() {
75-
"0.5.2" => self.legacy_rkyv_archive()?,
76-
"0.6.0-rc.6" => {
77-
let config = bincode::config::standard();
78-
bincode::serde::encode_to_vec(
79-
ChunkWitnessUpgradeCompact::from(self.clone()),
80-
config,
81-
)?
82-
}
83-
_ => {
84-
let config = bincode::config::standard();
85-
bincode::serde::encode_to_vec(self, config)?
86-
}
67+
let bytes: Vec<u8> = {
68+
let config = bincode::config::standard();
69+
bincode::serde::encode_to_vec(self, config)?
8770
};
8871
Ok(bytes)
8972
}

crates/prover/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ version.workspace = true
99
scroll-zkvm-types.workspace = true
1010
scroll-zkvm-verifier.workspace = true
1111

12-
rkyv.workspace = true
1312
bincode_v1.workspace = true
1413
tracing.workspace = true
1514
openvm-circuit = { workspace = true }

crates/prover/src/prover/mod.rs

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ use openvm_native_circuit::NativeGpuBuilder as NativeBuilder;
1111
use openvm_circuit::arch::instructions::exe::VmExe;
1212
use openvm_sdk::{DefaultStarkEngine, config::SdkVmBuilder};
1313
use openvm_sdk::{F, Sdk, StdIn, prover::StarkProver};
14-
use scroll_zkvm_types::{
15-
proof::OpenVmEvmProof, types_agg::ProgramCommitment, utils::serialize_vk,
16-
zkvm::AGG_STARK_PROVING_KEY_V13,
17-
};
14+
use scroll_zkvm_types::{proof::OpenVmEvmProof, types_agg::ProgramCommitment, utils::serialize_vk};
1815
use scroll_zkvm_verifier::verifier::{AGG_STARK_PROVING_KEY, UniversalVerifier};
1916
use tracing::instrument;
2017

@@ -49,8 +46,6 @@ pub struct ProverConfig {
4946
pub path_app_config: PathBuf,
5047
/// The maximum length for a single OpenVM segment.
5148
pub segment_len: Option<usize>,
52-
/// Use v1.3 openvm
53-
pub is_openvm_v13: bool,
5449
}
5550

5651
const DEFAULT_SEGMENT_SIZE: usize = (1 << 22) - 1000;
@@ -86,22 +81,10 @@ impl Prover {
8681
segmentation_limits.max_trace_height = segment_len as u32;
8782
segmentation_limits.max_cells = 1_200_000_000_usize; // For 24G vram
8883

89-
let mut sdk = Sdk::new(app_config).expect("sdk init failed");
90-
91-
let verifier_k = if self.config.is_openvm_v13 { 24 } else { 23 };
92-
tracing::info!(
93-
"changing openvm_sdk.halo2_config.verifier_k from {} to {}",
94-
sdk.halo2_config().verifier_k,
95-
verifier_k
96-
);
97-
sdk.halo2_config_mut().verifier_k = verifier_k;
84+
let sdk = Sdk::new(app_config).expect("sdk init failed");
9885

9986
// 45s for first time
100-
let sdk = sdk.with_agg_pk(if self.config.is_openvm_v13 {
101-
AGG_STARK_PROVING_KEY_V13.clone()
102-
} else {
103-
AGG_STARK_PROVING_KEY.clone()
104-
});
87+
let sdk = sdk.with_agg_pk(AGG_STARK_PROVING_KEY.clone());
10588
Ok(sdk)
10689
})
10790
}
@@ -173,10 +156,8 @@ impl Prover {
173156
stdin: &StdIn,
174157
) -> Result<crate::utils::vm::ExecutionResult, Error> {
175158
let sdk = self.get_sdk()?;
176-
let config = sdk.app_config();
177159
let t = std::time::Instant::now();
178-
let exec_result =
179-
crate::utils::vm::execute_guest(config.app_vm_config.clone(), &self.app_exe, stdin)?;
160+
let exec_result = crate::utils::vm::execute_guest(sdk, self.app_exe.clone(), stdin)?;
180161
let execution_time_mills = t.elapsed().as_millis() as u64;
181162
let execution_time_s = execution_time_mills as f32 / 1000.0f32;
182163
let exec_speed = (exec_result.total_cycle as f32 / 1_000_000.0f32) / execution_time_s; // MHz

0 commit comments

Comments
 (0)