mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
feat (libzkp-v0.9.8): recordStorageDetail even when LogConfig.DisableStorage == true (#564)
* trace: recordStorageDetail even when LogConfig.DisableStorage == true * Set `DisableStorage` to true. * Update libzkp to zkevm-circuits `feat/remove-step-storage-from-trace` branch. * Add `strict-ccc` feature to libzkp. * Upgrade libzkp to use prover `v0.9.8`. * Update params version. * Update params version. --------- Co-authored-by: Steven Gu <asongala@163.com>
This commit is contained in:
parent
f4b247da15
commit
9f143b47b2
5 changed files with 25 additions and 24 deletions
|
|
@ -119,6 +119,7 @@ func CreateTraceEnv(chainConfig *params.ChainConfig, chainContext ChainContext,
|
|||
env := CreateTraceEnvHelper(
|
||||
chainConfig,
|
||||
&vm.LogConfig{
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
EnableReturnData: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -234,16 +234,14 @@ func (l *StructLogger) CaptureState(pc uint64, op OpCode, gas, cost uint64, scop
|
|||
storageKey common.Hash
|
||||
storageValue common.Hash
|
||||
)
|
||||
if !l.cfg.DisableStorage {
|
||||
if op == SLOAD && stack.len() >= 1 {
|
||||
recordStorageDetail = true
|
||||
storageKey = stack.data[stack.len()-1].Bytes32()
|
||||
storageValue = l.env.StateDB.GetState(contract.Address(), storageKey)
|
||||
} else if op == SSTORE && stack.len() >= 2 {
|
||||
recordStorageDetail = true
|
||||
storageKey = stack.data[stack.len()-1].Bytes32()
|
||||
storageValue = stack.data[stack.len()-2].Bytes32()
|
||||
}
|
||||
if op == SLOAD && stack.len() >= 1 {
|
||||
recordStorageDetail = true
|
||||
storageKey = stack.data[stack.len()-1].Bytes32()
|
||||
storageValue = l.env.StateDB.GetState(contract.Address(), storageKey)
|
||||
} else if op == SSTORE && stack.len() >= 2 {
|
||||
recordStorageDetail = true
|
||||
storageKey = stack.data[stack.len()-1].Bytes32()
|
||||
storageValue = stack.data[stack.len()-2].Bytes32()
|
||||
}
|
||||
if recordStorageDetail {
|
||||
contractAddress := contract.Address()
|
||||
|
|
@ -251,7 +249,9 @@ func (l *StructLogger) CaptureState(pc uint64, op OpCode, gas, cost uint64, scop
|
|||
l.storage[contractAddress] = make(Storage)
|
||||
}
|
||||
l.storage[contractAddress][storageKey] = storageValue
|
||||
structLog.Storage = l.storage[contractAddress].Copy()
|
||||
if !l.cfg.DisableStorage {
|
||||
structLog.Storage = l.storage[contractAddress].Copy()
|
||||
}
|
||||
|
||||
if err := traceStorage(l, scope, structLog.getOrInitExtraData()); err != nil {
|
||||
log.Error("Failed to trace data", "opcode", op.String(), "err", err)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 5 // Major version component of the current release
|
||||
VersionMinor = 1 // Minor version component of the current release
|
||||
VersionPatch = 4 // Patch version component of the current release
|
||||
VersionPatch = 5 // Patch version component of the current release
|
||||
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
22
rollup/circuitcapacitychecker/libzkp/Cargo.lock
generated
22
rollup/circuitcapacitychecker/libzkp/Cargo.lock
generated
|
|
@ -16,7 +16,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "aggregator"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"ark-std",
|
||||
"env_logger 0.10.0",
|
||||
|
|
@ -297,7 +297,7 @@ checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b"
|
|||
[[package]]
|
||||
name = "bus-mapping"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"eth-types",
|
||||
"ethers-core",
|
||||
|
|
@ -971,7 +971,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "eth-types"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"ethers-core",
|
||||
"ethers-signers",
|
||||
|
|
@ -1128,7 +1128,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "external-tracer"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"eth-types",
|
||||
"geth-utils",
|
||||
|
|
@ -1308,7 +1308,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gadgets"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"digest 0.7.6",
|
||||
"eth-types",
|
||||
|
|
@ -1340,7 +1340,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "geth-utils"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"env_logger 0.9.3",
|
||||
"gobuild 0.1.0-alpha.2 (git+https://github.com/scroll-tech/gobuild.git)",
|
||||
|
|
@ -1949,7 +1949,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "keccak256"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"env_logger 0.9.3",
|
||||
"eth-types",
|
||||
|
|
@ -2157,7 +2157,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "mock"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"eth-types",
|
||||
"ethers-core",
|
||||
|
|
@ -2173,7 +2173,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "mpt-zktrie"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"eth-types",
|
||||
"halo2-mpt-circuits",
|
||||
|
|
@ -2595,7 +2595,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "prover"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"aggregator",
|
||||
"anyhow",
|
||||
|
|
@ -4212,7 +4212,7 @@ checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
|
|||
[[package]]
|
||||
name = "zkevm-circuits"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862"
|
||||
source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.8#8f17df87ba70f5a8fcaa23f4fcb7fb112f5a815a"
|
||||
dependencies = [
|
||||
"array-init",
|
||||
"bus-mapping",
|
||||
|
|
|
|||
|
|
@ -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" }
|
||||
|
||||
[dependencies]
|
||||
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.9.7", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] }
|
||||
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.9.8", default-features = false, features = ["parallel_syn", "scroll", "shanghai", "strict-ccc"] }
|
||||
|
||||
anyhow = "1.0"
|
||||
log = "0.4"
|
||||
|
|
|
|||
Loading…
Reference in a new issue