fix(miner): fix trace for empty block (#434)

* fix(miner): fix trace for empty block

* update version

* try fix

* improve docs
This commit is contained in:
HAOYUatHZ 2023-08-03 22:19:52 +08:00 committed by GitHub
parent 37ef8cad30
commit 5b0b08b104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -1231,6 +1231,10 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
if err != nil { if err != nil {
return err return err
} }
// truncate ExecutionResults&TxStorageTraces, because we declare their lengths with a dummy tx before;
// however, we need to clean it up for an empty block
traces.ExecutionResults = traces.ExecutionResults[:0]
traces.TxStorageTraces = traces.TxStorageTraces[:0]
accRows, err := w.circuitCapacityChecker.ApplyBlock(traces) accRows, err := w.circuitCapacityChecker.ApplyBlock(traces)
if err != nil { if err != nil {
return err return err

View file

@ -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 = 3 // Minor version component of the current release VersionMinor = 3 // Minor version component of the current release
VersionPatch = 14 // Patch version component of the current release VersionPatch = 15 // 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
) )