Skip to content

Commit

Permalink
fix(miner): fix trace for empty block (ethereum#434)
Browse files Browse the repository at this point in the history
* fix(miner): fix trace for empty block

* update version

* try fix

* improve docs
  • Loading branch information
0xmountaintop authored Aug 3, 2023
1 parent 37ef8ca commit 5b0b08b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,10 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
if err != nil {
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)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 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
)

Expand Down

0 comments on commit 5b0b08b

Please sign in to comment.