Skip to content

Commit

Permalink
e3: native map instead of btree where can (because e2 experience sho…
Browse files Browse the repository at this point in the history
…ws - it's faster) (#7010)
  • Loading branch information
AskAlexSharov committed Mar 7, 2023
1 parent c5acfd0 commit 78aa865
Show file tree
Hide file tree
Showing 9 changed files with 343 additions and 133 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ lintci:
## lintci-deps: (re)installs golangci-lint to build/bin/golangci-lint
lintci-deps:
rm -f ./build/bin/golangci-lint
curl -sSfL https://github.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.51.1
curl -sSfL https://github.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.51.2

## clean: cleans the go cache, build dir, libmdbx db dir
clean:
Expand Down
2 changes: 2 additions & 0 deletions cmd/state/exec3/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ func (rw *Worker) RunTxTaskNoLock(txTask *exec22.TxTask) {
//fmt.Printf("error=%v\n", err)
txTask.Error = err
} else {
//rw.callTracer.AddCoinbase(txTask.Coinbase, txTask.Uncles)
//txTask.TraceTos = rw.callTracer.Tos()
txTask.TraceTos = map[libcommon.Address]struct{}{}
txTask.TraceTos[txTask.Coinbase] = struct{}{}
for _, uncle := range txTask.Uncles {
Expand Down
6 changes: 6 additions & 0 deletions core/state/intra_block_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ func (sdb *IntraBlockState) Error() error {
// Reset clears out all ephemeral state objects from the state db, but keeps
// the underlying state trie to avoid reloading data for the next operations.
func (sdb *IntraBlockState) Reset() {
//if len(sdb.nilAccounts) == 0 || len(sdb.stateObjects) == 0 || len(sdb.stateObjectsDirty) == 0 || len(sdb.balanceInc) == 0 {
// log.Warn("zero", "len(sdb.nilAccounts)", len(sdb.nilAccounts),
// "len(sdb.stateObjects)", len(sdb.stateObjects),
// "len(sdb.stateObjectsDirty)", len(sdb.stateObjectsDirty),
// "len(sdb.balanceInc)", len(sdb.balanceInc))
//}
sdb.nilAccounts = make(map[libcommon.Address]struct{})
sdb.stateObjects = make(map[libcommon.Address]*stateObject)
sdb.stateObjectsDirty = make(map[libcommon.Address]struct{})
Expand Down
Loading

0 comments on commit 78aa865

Please sign in to comment.