fix(traces): deletion proof apply wrong storage value from structLogger (#838)

* fix issue caused by unmatching storage value

* lint

* chore: auto version bump [bot]

---------

Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
This commit is contained in:
Ho 2024-06-20 20:52:37 +09:00 committed by GitHub
parent f2efa44e11
commit 4e3bf2f58e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 4 // 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
)

View file

@ -428,10 +428,11 @@ func (env *TraceEnv) getTxResult(state *state.StateDB, index int, block *types.B
zktrieTracer := state.NewProofTracer(trie)
env.sMu.Unlock()
for key, values := range keys {
for key := range keys {
addrStr := addr.String()
keyStr := key.String()
isDelete := bytes.Equal(values.Bytes(), common.Hash{}.Bytes())
value := state.GetState(addr, key)
isDelete := bytes.Equal(value.Bytes(), common.Hash{}.Bytes())
txm := txStorageTrace.StorageProofs[addrStr]
env.sMu.Lock()