mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core/state: remove update concurrency for Verkle tries
This commit is contained in:
parent
6d3c6a1963
commit
e9b599c6a1
2 changed files with 8 additions and 4 deletions
|
|
@ -847,6 +847,14 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash {
|
||||||
start = time.Now()
|
start = time.Now()
|
||||||
workers errgroup.Group
|
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 {
|
for addr, op := range s.mutations {
|
||||||
if op.applied || op.isDelete() {
|
if op.applied || op.isDelete() {
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,6 @@ var (
|
||||||
// errTerminated is returned if a fetcher is attempted to be operated after it
|
// errTerminated is returned if a fetcher is attempted to be operated after it
|
||||||
// has already terminated.
|
// has already terminated.
|
||||||
errTerminated = errors.New("fetcher is 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
|
// triePrefetcher is an active prefetcher, which receives accounts or storage
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue