fix: correctly initialize ZkTrieTracer for ccc (#440)

* fix issue for zktrieTracer not inited

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
This commit is contained in:
Ho 2023-08-04 13:54:55 +08:00 committed by GitHub
parent 53963e6171
commit 6b20ce624f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -337,10 +337,12 @@ func (env *TraceEnv) getTxResult(state *state.StateDB, index int, block *types.B
if !existed {
m = make(map[string][]hexutil.Bytes)
env.StorageProofs[addrStr] = m
if zktrieTracer.Available() {
}
if zktrieTracer.Available() && !env.ZkTrieTracer[addrStr].Available() {
env.ZkTrieTracer[addrStr] = state.NewProofTracer(trie)
}
} else if proof, existed := m[keyStr]; existed {
if proof, existed := m[keyStr]; existed {
txm[keyStr] = proof
// still need to touch tracer for deletion
if isDelete && zktrieTracer.Available() {

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 4 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 19 // Patch version component of the current release
VersionPatch = 20 // Patch version component of the current release
VersionMeta = "sepolia" // Version metadata to append to the version string
)