feat(libzkp): ccc v0.10.2 (enable sha256, remove StructLog.stack) (#691)

* upgrade zkevm version

* change Cargo.lock

* try fix

* update Cargo.lock

* fix

* upgrade rust-toolchain version

* update rust-toolchain

* fix build

* upgrade zkp

* fix ccc

* chore: auto version bump [bot]

* chore(libzkp): upgrade to v0.10.1

* clean poseidon-circuit deps

* chore: auto version bump [bot]

* chore: auto version bump [bot]

* fix patch version

* disable stack

* upgrade libzkp

* fix(rollup-verifier): update codecv1

* fix genesis batch codec check

* bump version

* use temporary version tag

---------

Co-authored-by: Zhuo Zhang <mycinbrin@gmail.com>
Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
Co-authored-by: lispc <lispc@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
This commit is contained in:
colin 2024-04-29 13:30:02 +08:00 committed by GitHub
parent c5836a42d3
commit 6d80f2898b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1013 additions and 783 deletions

View file

@ -85,6 +85,7 @@ func (api *API) createTraceEnvAndGetBlockTrace(ctx context.Context, config *Trac
config = &TraceConfig{
LogConfig: &vm.LogConfig{
DisableStorage: true,
DisableStack: true,
EnableMemory: false,
EnableReturnData: true,
},

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 3 // 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 = "mainnet" // Version metadata to append to the version string
)

File diff suppressed because it is too large Load diff

View file

@ -8,33 +8,35 @@ edition = "2021"
crate-type = ["cdylib"]
[patch.crates-io]
gobuild = { git = "https://github.com/scroll-tech/gobuild.git" }
halo2curves = { git = "https://github.com/scroll-tech/halo2curves", branch = "v0.1.0" }
ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" }
ethers-providers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" }
ethers-signers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" }
#ethers-etherscan = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" }
#ethers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" }
[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 = "v1.1" }
[patch."https://github.com/privacy-scaling-explorations/poseidon.git"]
poseidon = { git = "https://github.com/scroll-tech/poseidon.git", branch = "scroll-dev-0220" }
[patch."https://github.com/privacy-scaling-explorations/halo2wrong.git"]
halo2wrong = { git = "https://github.com/scroll-tech/halo2wrong.git", branch = "halo2-ecc-snark-verifier-0323" }
maingate = { git = "https://github.com/scroll-tech/halo2wrong", branch = "halo2-ecc-snark-verifier-0323" }
[patch."https://github.com/privacy-scaling-explorations/halo2curves.git"]
halo2curves = { git = "https://github.com/scroll-tech/halo2curves.git", branch = "0.3.1-derive-serde" }
poseidon = { git = "https://github.com/scroll-tech/poseidon.git", branch = "main" }
[patch."https://github.com/privacy-scaling-explorations/bls12_381"]
bls12_381 = { git = "https://github.com/scroll-tech/bls12_381", branch = "feat/impl_scalar_field" }
[dependencies]
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.9.13", default-features = false, features = ["parallel_syn", "scroll", "shanghai", "strict-ccc"] }
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.10.2", default-features = false, features = ["parallel_syn", "scroll", "shanghai", "strict-ccc"] }
anyhow = "1.0"
log = "0.4"
base64 = "0.13.0"
env_logger = "0.9.0"
libc = "0.2"
log = "0.4"
once_cell = "1.19"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0.66"
libc = "0.2"
once_cell = "1.8.0"
[profile.test]
opt-level = 3
debug-assertions = true
[profile.release]
opt-level = 3

View file

@ -1 +1 @@
nightly-2022-12-10
nightly-2023-12-03

View file

@ -1,5 +1,3 @@
#![feature(once_cell)]
pub mod checker {
use crate::utils::{c_char_to_str, c_char_to_vec, vec_to_c_char};
use anyhow::{anyhow, bail, Error};
@ -121,7 +119,7 @@ pub mod checker {
.ok_or(anyhow!(
"fail to get circuit capacity checker (id: {id:?}) in apply_tx"
))?
.estimate_circuit_capacity(&[traces])
.estimate_circuit_capacity(traces)
});
match r {
Ok(result) => result,
@ -174,7 +172,7 @@ pub mod checker {
.ok_or(anyhow!(
"fail to get circuit capacity checker (id: {id:?}) in apply_block"
))?
.estimate_circuit_capacity(&[traces])
.estimate_circuit_capacity(traces)
});
match r {
Ok(result) => result,

View file

@ -153,6 +153,7 @@ func CreateTraceEnv(chainConfig *params.ChainConfig, chainContext core.ChainCont
chainConfig,
&vm.LogConfig{
DisableStorage: true,
DisableStack: true,
EnableMemory: false,
EnableReturnData: true,
},