mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 15:33:47 +00:00
fix(libzkp): upgrade to use prover v0.9.0 (#513)
This commit is contained in:
parent
530830a01c
commit
2b22bf9138
4 changed files with 537 additions and 792 deletions
|
|
@ -24,7 +24,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 4 // Major version component of the current release
|
VersionMajor = 4 // Major version component of the current release
|
||||||
VersionMinor = 4 // Minor version component of the current release
|
VersionMinor = 4 // Minor version component of the current release
|
||||||
VersionPatch = 7 // Patch version component of the current release
|
VersionPatch = 8 // Patch version component of the current release
|
||||||
VersionMeta = "sepolia" // Version metadata to append to the version string
|
VersionMeta = "sepolia" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
1295
rollup/circuitcapacitychecker/libzkp/Cargo.lock
generated
1295
rollup/circuitcapacitychecker/libzkp/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -8,7 +8,7 @@ edition = "2021"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v0.17.0" }
|
ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" }
|
||||||
[patch."https://github.com/privacy-scaling-explorations/halo2.git"]
|
[patch."https://github.com/privacy-scaling-explorations/halo2.git"]
|
||||||
halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "develop" }
|
halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "develop" }
|
||||||
[patch."https://github.com/privacy-scaling-explorations/poseidon.git"]
|
[patch."https://github.com/privacy-scaling-explorations/poseidon.git"]
|
||||||
|
|
@ -20,7 +20,7 @@ maingate = { git = "https://github.com/scroll-tech/halo2wrong", branch = "halo2-
|
||||||
halo2curves = { git = "https://github.com/scroll-tech/halo2curves.git", branch = "0.3.1-derive-serde" }
|
halo2curves = { git = "https://github.com/scroll-tech/halo2curves.git", branch = "0.3.1-derive-serde" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
prover = { git = "https://github.com/scroll-tech/scroll-prover", tag = "v0.8.2" }
|
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.9.0", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] }
|
||||||
|
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
pub mod checker {
|
pub mod checker {
|
||||||
use crate::utils::{c_char_to_str, c_char_to_vec, vec_to_c_char};
|
use crate::utils::{c_char_to_str, c_char_to_vec, vec_to_c_char};
|
||||||
use anyhow::{anyhow, Error};
|
use anyhow::{anyhow, bail, Error};
|
||||||
use libc::c_char;
|
use libc::c_char;
|
||||||
use prover::{
|
use prover::{
|
||||||
types::eth::BlockTrace,
|
|
||||||
zkevm::{CircuitCapacityChecker, RowUsage},
|
zkevm::{CircuitCapacityChecker, RowUsage},
|
||||||
|
BlockTrace,
|
||||||
};
|
};
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use std::cell::OnceCell;
|
use std::cell::OnceCell;
|
||||||
|
|
@ -97,13 +97,13 @@ pub mod checker {
|
||||||
let traces = serde_json::from_slice::<BlockTrace>(&tx_traces_vec)?;
|
let traces = serde_json::from_slice::<BlockTrace>(&tx_traces_vec)?;
|
||||||
|
|
||||||
if traces.transactions.len() != 1 {
|
if traces.transactions.len() != 1 {
|
||||||
return Err(anyhow!("traces.transactions.len() != 1"));
|
bail!("traces.transactions.len() != 1");
|
||||||
}
|
}
|
||||||
if traces.execution_results.len() != 1 {
|
if traces.execution_results.len() != 1 {
|
||||||
return Err(anyhow!("traces.execution_results.len() != 1"));
|
bail!("traces.execution_results.len() != 1");
|
||||||
}
|
}
|
||||||
if traces.tx_storage_trace.len() != 1 {
|
if traces.tx_storage_trace.len() != 1 {
|
||||||
return Err(anyhow!("traces.tx_storage_trace.len() != 1"));
|
bail!("traces.tx_storage_trace.len() != 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
let r = panic::catch_unwind(|| {
|
let r = panic::catch_unwind(|| {
|
||||||
|
|
@ -120,10 +120,8 @@ pub mod checker {
|
||||||
});
|
});
|
||||||
match r {
|
match r {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(_) => {
|
Err(e) => {
|
||||||
return Err(anyhow!(
|
bail!("estimate_circuit_capacity (id: {id:?}) error in apply_tx, error: {e:?}")
|
||||||
"estimate_circuit_capacity (id: {id:?}) error in apply_tx"
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -175,10 +173,8 @@ pub mod checker {
|
||||||
});
|
});
|
||||||
match r {
|
match r {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(_) => {
|
Err(e) => {
|
||||||
return Err(anyhow!(
|
bail!("estimate_circuit_capacity (id: {id:?}) error in apply_block, error: {e:?}")
|
||||||
"estimate_circuit_capacity (id: {id:?}) error in apply_block"
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -218,11 +214,7 @@ pub mod checker {
|
||||||
.get_tx_num() as u64)
|
.get_tx_num() as u64)
|
||||||
})
|
})
|
||||||
.map_or_else(
|
.map_or_else(
|
||||||
|e| {
|
|e| bail!("circuit capacity checker (id: {id}) error in get_tx_num: {e:?}"),
|
||||||
Err(anyhow!(
|
|
||||||
"circuit capacity checker (id: {id}) error in get_tx_num: {e:?}"
|
|
||||||
))
|
|
||||||
},
|
|
||||||
|result| result,
|
|result| result,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue