Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trie: parallel insert trie when root node is a full node #597

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Oct 10, 2024

  1. trie: parallel insert trie when root node is a full node

    This creates a new TryBatchInsert function in trie. All key-value insertion
    pairs are passed together. If the resolved root node is a full node, the
    insertion pairs are partitioned by the first byte in their keys. Children
    subtries of the full node are inserted in parallel. If the resolved root node is
    not a full node, the insertion pairs are inserted sequentially.
    
    Result comparing BenchmarkNormalInsert to BenchmarkBatchInsert
    
    goos: linux
    goarch: amd64
    pkg: github.com/ethereum/go-ethereum/trie
    cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
                   │ normal.txt  │              batch.txt               │
                   │   sec/op    │    sec/op     vs base                │
    NormalInsert-8   6.823m ± 7%   3.716m ± 18%  -45.54% (p=0.000 n=10)
    minh-bq committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    ea23006 View commit details
    Browse the repository at this point in the history
  2. core/state: use parallel trie insert to update storage trie

    When there are more than parallelInsertThreshold (currently set to 500) pending
    storages update to storage trie, we will use the new TryBatchInsert to parallel
    insert these storages if possible.
    minh-bq committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    6896d7c View commit details
    Browse the repository at this point in the history
  3. core: add many storage updates benchmark

    This benchmark is intended to be used with mainnet data. The benchmark includes
    many storage updates to Axie contract's storage.
    minh-bq committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    a795205 View commit details
    Browse the repository at this point in the history