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

all: upgrade golang from 1.20 to 1.22 #611

Open
wants to merge 28 commits into
base: path-base-implementing
Choose a base branch
from

Commits on Sep 17, 2024

  1. core,trie,eth,cmd: rework preimage store (#533)

    * core,trie,eth,cmd: rework preimage store
    
    * ci: trigger unittest path-base-implementing
    huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    f83cfea View commit details
    Browse the repository at this point in the history
  2. trie, les, tests, core: implement trie tracer: Trie tracer is an auxi…

    …liary tool to capture all deleted node wwhich can't be captured by trie.Committer. The deleted nodes (#552)
    
    can be removed from the disk later. Implement traverse and rework init Trie
    huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    a230f8d View commit details
    Browse the repository at this point in the history
  3. all: introduce trie owner notion (#24750) (#553)

    * cmd, core/state, light, trie, eth: add trie owner notion
    
    * all: refactor
    
    * tests: fix goimports
    
    * core/state/snapshot: fix ineffasigns
    
    Co-authored-by: rjl493456442 <[email protected]>
    Co-authored-by: Martin Holst Swende <[email protected]>
    3 people authored and huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    7fdc964 View commit details
    Browse the repository at this point in the history
  4. core, trie: rework trie commiter (#560)

    * core, trie: rework trie commiter
    
    changed the commit procedure, introduce new struct called nodeSet for
    returning including all dirty nodes of a trie. Multiple nodeset will be
    merged to MergedNodeSet struct. then be submitted to in-memory database
    from block to block
    
    * trie,core: fix comments
    huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    5551e70 View commit details
    Browse the repository at this point in the history
  5. all: rework genesis api (#567)

    * core: store genesis allocation and recommit them if necessary (#24460)
    
    * core: store genesis allocation and recommit them if necessary
    
    * core: recover predefined genesis allocation if possible
    
    * all: cleanup the APIs for initializing genesis (#25473)
    
    * all: polish tests
    
    * core: apply feedback from Guillaume
    
    * core: fix comment
    
    ---------
    
    Co-authored-by: rjl493456442 <[email protected]>
    2 people authored and huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    300f75a View commit details
    Browse the repository at this point in the history
  6. core, eth: port snap sync changes (#564)

    core, eth, les, trie: rework snap sync
    
    Co-authored-by: rjl493456442 <[email protected]>
    2 people authored and huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    5467a36 View commit details
    Browse the repository at this point in the history
  7. core/rawdb: the ancient store implementing is now exported in package…

    … ethdb, can be used independently of the chain database, reference by commit 1941c5e (#571)
    huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    59cbb40 View commit details
    Browse the repository at this point in the history
  8. Change ancient chain segments from root ancient to sub folders (#572)

    * cmd, core, ethdb, node: rework ancient store folder reference by ethereum/go-ethereum@e44d655
    huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    0deff47 View commit details
    Browse the repository at this point in the history
  9. all: move genesis init to blockchain (#570)

    * all: move genesis initialization to blockchain
    
    * all: fix test
    Francesco4203 authored and huyngopt1994 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    ca1f046 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. Make db inspector for extending multiple ancient stores (#574)

    * core: add blockchain test for failing create/destroy-case
    
    * core,state: some refactors
    
    * core/rawdb: refactor db inspector for extending multiple ancient store
    huyngopt1994 authored Sep 18, 2024
    Configuration menu
    Copy the full SHA
    a16a5d0 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    ca6e07f View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. core,eth,tests,trie: abstract node scheme, and contruct database (#578)

    * core,eth,tests,trie: abstract node scheme, and contruct database
    interface instead of keyvalue for supporting storing diff reverse data
    in ancient
    
    * stacktrie,core,eth: port the changes in stacktries, track the path prefix of nodes when commits,  use ethdb.Database for constructing trie.Database, it's not necessary right now, but it's required for path-based used to open reverse diff freezer
    
    * core,trie: add scheme and resolvepath logic
    huyngopt1994 authored Sep 25, 2024
    Configuration menu
    Copy the full SHA
    5e601cf View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. cmd, core, eth, trie: track deleted nodes (#576)

    * trie: track deleted nodes
    
    * core: track deleted nodes
    Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    0425ed6 View commit details
    Browse the repository at this point in the history
  2. all: prep for path-based trie storage (#582)

    * all: prep for path-based trie storage
    
    * all: use rawdb.HasLegacyNode() to check for node existance instead of check for length
    Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    85a2478 View commit details
    Browse the repository at this point in the history
  3. trie: implement NodeBlob api for trie iterator (#584)

    * trie: implement NodeBlob API for trie iterator
    
    This functionality is needed in new path-based storage scheme, but
    can be implemented in a seperate PR though.
    
    When an account is deleted, then all the storage slots should be
    nuked out from the disk as well. In hash-based storage scheme they
    are still left in the disk but in new scheme, they will be iterated
    and marked as deleted.
    
    But why the NodeBlob API is needed in this scenario? Because when
    the node is marked deleted, the previous value is also required to
    be recorded to construct the reverse diff.
    
    * fuzzers/stacktrie: enable test
    
    ---------
    
    Co-authored-by: Gary Rong <[email protected]>
    Francesco4203 and rjl493456442 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    ea86791 View commit details
    Browse the repository at this point in the history
  4. trie: refactor tracer (#581)

    * trie: refactor tracer
    
    * fix: add description
    Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    0698ab0 View commit details
    Browse the repository at this point in the history
  5. eth/protocols/snap: fix batch writer when resuming an aborted sync (#…

    …27842) (#587)
    
    Co-authored-by: Péter Szilágyi <[email protected]>
    2 people authored and Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    6c75343 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c01ed5d View commit details
    Browse the repository at this point in the history
  7. trie: add trie db wrapper; refactor trienode (#588)

    * trie: add wrapper for database
    
    * trie: refactor trie node
    
    * all: fix test
    
    * rawdb, trie: fix comment
    
    trie: change name WithPrev => NodeWithPrev
    rawdb: add schema_test
    Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    98d4d75 View commit details
    Browse the repository at this point in the history
  8. trie, core: track state changes in statedb (#589)

    * trie: triestate/Set to track changes
    
    * core/state: track state changes
    
    journal.go: in resetObjectChange
    - add account in resetObjectChange (ref ethereum/go-ethereum#27339)
    - add prevAccount and prevStorage (ref ethereum/go-ethereum#27376)
    - add prevAccountOrigin and prevStorageOrigin to track changes
    state_object.go: add origin for tracking the original StateAccount before change
    statedb.go:
    - add accountsOrigin and storagesOrigin, same functions as above
    - stateObjectsDestruct now track the previous state before destruct
    - add functions for handle destructing old states
    
    * all: apply changes to tests
    Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    bbeb4e8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a51c7b3 View commit details
    Browse the repository at this point in the history
  10. core, trie: Expose block number to statedb (#593)

    * core/state: clean up: db already exist in stateObject
    
    * core, trie: statedb also commit the block number
    Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    e54d241 View commit details
    Browse the repository at this point in the history
  11. final implementing path base (#591)

    * all: clean up overall structure, preparing for path-based (#594)
    
    * trie/triedb/pathdb: init pathdb components
    
    * core, trie: track state change with address instead of hash
    
    Reference: ethereum/go-ethereum@817553c
    
    * trie: refactor
    
    * rawdb: implement freezer resettable & state freezer  (#596)
    
    * rawdb: implement freezer resettable
    
    * rawdb: implement state freezer
    
    * rawdb: update description
    
    * trie: path based scheme implementing (#598)
    
    * core/state: move account definition to core/types
    
    Reference: ethereum/go-ethereum#27323
    
    * trie: add path base utils
    
    * triedb: implement history and adding some test utils
    
    * trie/triedb/pathdb: implement difflayer and disklayer
    
    * Fix some issues related to history, and add logic checking maxbyte when is zero for retrieving ancient ranges with maxbyte is zero
    
    * trie/triedb/pathdb: implement database.go
    
    * freezer: Add unit test and docs for support freezer reading with no limit size
    
    * trie/triedb/pathdb: add database and difflayer tests
    
    * triedb/pathdb: implement journal and add more comments
    
    ---------
    
    Co-authored-by: Huy Ngo <[email protected]>
    
    ---------
    
    Co-authored-by: Francesco4203 <[email protected]>
    huyngopt1994 and Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    3cc69e7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1160193 View commit details
    Browse the repository at this point in the history
  13. all: reworkNodeResolver for working with multiple state schemes with …

    …calling ReadTrieNode underlying (#603)
    huyngopt1994 authored and Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    2dc7abe View commit details
    Browse the repository at this point in the history
  14. trie: fix issue insert wrong path in stack trie and remove the offset…

    … when inserting in stack trie reference by 86fe359 (#604)
    huyngopt1994 authored and Francesco4203 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    b78c647 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. all: enable pbss (#600)

    * trie: enable pathdb: add path config and enable tests
    
    * core/rawdb: now also inspect the state freezer in pathdb; rename
    
    * cmd: working on cmd ronin
    
    * core: refactor; add pathbase config; fix tests
    
    - all: fix and enable tests for pathbase
    - blockchain: open triedb explicitly in blockchain functions and close right after use, since diskLayer inside pathdb is a skeleton
    - blockchain: when writeBlockWithState, pathbase will skip the explicit garbage collector, which is only needed for hashbase
    - genesis.go: nit: change check genesis state, ref ethereum/go-ethereum@08bf8a6
    
    * tests: enable path tests
    
    * eth: enable path scheme
    
    - all: fix tests, enable path scheme tests
    - state_accessor: split function to retrieve statedb from block to hash scheme and path scheme
    
    * light, miner, les, ethclient: clean up tests
    
    * trie: refactor triereader, return err when state reader won't be created in hash and path
    
    * trie: fix failed test in iterator and sync test tie
    
    * trie,core: improve trie reader and add checking config nil when initing
    database
    
    * trie: statedb instance is committed, then it's not usable, a new instance must be created based on new root updated database, reference by commit 6d2aeb4
    
    * cmd,les,eth: fixed unittest and adding flag Parrallel correctly
    
    * core, eth: fix tests
    
    * core: refactor and fix sync_test logic
    
    * tmp: disable pathbase for TestIsPeriodBlock, TestIsTrippEffective
    
    ---------
    
    Co-authored-by: Huy Ngo <[email protected]>
    Francesco4203 and huyngopt1994 authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    9a82eae View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Configuration menu
    Copy the full SHA
    1d07433 View commit details
    Browse the repository at this point in the history