mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-11 23:18:07 -05:00
Compare commits
11 Commits
develop
...
feat/prove
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b833468d02 | ||
|
|
e852915843 | ||
|
|
b244fa8d28 | ||
|
|
98be0a0ca4 | ||
|
|
5ae31bc203 | ||
|
|
5c2803c9e3 | ||
|
|
af63bc005b | ||
|
|
dc29c8c796 | ||
|
|
d262a63564 | ||
|
|
9839bf72ca | ||
|
|
bdf782674f |
16
Cargo.lock
generated
16
Cargo.lock
generated
@@ -8737,7 +8737,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-proving-sdk"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?rev=05648db#05648db3a6bcc19bfe58ff493176714d6a0553db"
|
||||
source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?rev=22ad34e#22ad34ebdeb3d9a0ccb2993bb46d8d2522c1e667"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -8767,7 +8767,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-prover"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bincode 1.3.3",
|
||||
@@ -8794,7 +8794,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-types"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"base64 0.22.1",
|
||||
@@ -8818,7 +8818,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-types-base"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-serde 1.0.41",
|
||||
@@ -8831,7 +8831,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-types-batch"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"c-kzg",
|
||||
@@ -8853,7 +8853,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-types-bundle"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"rkyv",
|
||||
"scroll-zkvm-types-base",
|
||||
@@ -8863,7 +8863,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-types-chunk"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"alloy-consensus",
|
||||
"alloy-primitives",
|
||||
@@ -8888,7 +8888,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scroll-zkvm-verifier"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.7.1#85dc6bc56728b8eef22281fdb215c136d7b5bbda"
|
||||
source = "git+https://github.com/scroll-tech/zkvm-prover?rev=9fb016f#9fb016fd75dbda69ddeb34ecf53801e08c149dda"
|
||||
dependencies = [
|
||||
"bincode 1.3.3",
|
||||
"eyre",
|
||||
|
||||
@@ -17,9 +17,10 @@ repository = "https://github.com/scroll-tech/scroll"
|
||||
version = "4.7.1"
|
||||
|
||||
[workspace.dependencies]
|
||||
scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", tag = "v0.7.1" }
|
||||
scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", tag = "v0.7.1" }
|
||||
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", tag = "v0.7.1" }
|
||||
# v0.7.1 plus openvm feature for performance elevating
|
||||
scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "9fb016f" }
|
||||
scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "9fb016f" }
|
||||
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "9fb016f" }
|
||||
|
||||
sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91.2", features = ["scroll", "rkyv"] }
|
||||
sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91.2" }
|
||||
|
||||
@@ -9,7 +9,7 @@ edition.workspace = true
|
||||
scroll-zkvm-types.workspace = true
|
||||
scroll-zkvm-prover.workspace = true
|
||||
libzkp = { path = "../libzkp"}
|
||||
scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", rev = "05648db" }
|
||||
scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", rev = "22ad34e" }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
once_cell.workspace =true
|
||||
|
||||
@@ -30,6 +30,9 @@ pub struct AssetsLocationData {
|
||||
#[serde(default)]
|
||||
/// a altered url for specififed vk
|
||||
pub asset_detours: HashMap<String, url::Url>,
|
||||
/// when asset file existed, do not verify from network, help for debugging stuffs
|
||||
#[serde(default)]
|
||||
pub debug_mode: bool,
|
||||
}
|
||||
|
||||
impl AssetsLocationData {
|
||||
@@ -79,6 +82,13 @@ impl AssetsLocationData {
|
||||
// Get file metadata to check size
|
||||
if let Ok(metadata) = std::fs::metadata(&local_file_path) {
|
||||
// Make a HEAD request to get remote file size
|
||||
if self.debug_mode {
|
||||
println!(
|
||||
"File {} already exists, skipping download under debugmode",
|
||||
filename
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Ok(head_resp) = client.head(download_url.clone()).send().await {
|
||||
if let Some(content_length) = head_resp.headers().get("content-length") {
|
||||
@@ -201,12 +211,20 @@ impl ProvingService for LocalProver {
|
||||
error: Some(format!("proving task failed: {}", e)),
|
||||
..Default::default()
|
||||
},
|
||||
Err(e) => QueryTaskResponse {
|
||||
task_id: req.task_id,
|
||||
status: TaskStatus::Failed,
|
||||
error: Some(format!("proving task panicked: {}", e)),
|
||||
..Default::default()
|
||||
},
|
||||
Err(e) => {
|
||||
if e.is_panic() {
|
||||
// simply re-throw panic for any panicking in proving process,
|
||||
// cause worker loop and the whole prover exit
|
||||
std::panic::resume_unwind(e.into_panic());
|
||||
}
|
||||
|
||||
QueryTaskResponse {
|
||||
task_id: req.task_id,
|
||||
status: TaskStatus::Failed,
|
||||
error: Some(format!("proving task failed: {}", e)),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return QueryTaskResponse {
|
||||
|
||||
@@ -19,7 +19,7 @@ impl UniversalHandler {
|
||||
pub fn new(workspace_path: impl AsRef<Path>, is_openvm_v13: bool) -> Result<Self> {
|
||||
let path_app_exe = workspace_path.as_ref().join("app.vmexe");
|
||||
let path_app_config = workspace_path.as_ref().join("openvm.toml");
|
||||
let segment_len = Some((1 << 21) - 100);
|
||||
let segment_len = Some((1 << 22) - 100);
|
||||
let config = ProverConfig {
|
||||
path_app_config,
|
||||
path_app_exe,
|
||||
|
||||
Reference in New Issue
Block a user