diff --git a/core/state/statedb.go b/core/state/statedb.go index 14e4456830..8bec4f675c 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -847,6 +847,14 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash { start = time.Now() workers errgroup.Group ) + if s.db.TrieDB().IsVerkle() { + // Whilst MPT storage tries are independent, Verkle has one single trie + // for all the accounts and all the storage slots merged together. The + // former can thus be simply parallelized, but updating the latter will + // need concurrency support within the trie itself. That's a TODO for a + // later time. + workers.SetLimit(1) + } for addr, op := range s.mutations { if op.applied || op.isDelete() { continue diff --git a/core/state/trie_prefetcher.go b/core/state/trie_prefetcher.go index 63816ceecc..12e29a3551 100644 --- a/core/state/trie_prefetcher.go +++ b/core/state/trie_prefetcher.go @@ -32,10 +32,6 @@ var ( // errTerminated is returned if a fetcher is attempted to be operated after it // has already terminated. errTerminated = errors.New("fetcher is already terminated") - - // errNotTerminated is returned if a fetchers data is attempted to be retrieved - // before it terminates. - errNotTerminated = errors.New("fetcher is not yet terminated") ) // triePrefetcher is an active prefetcher, which receives accounts or storage