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

rebase #8

Draft
wants to merge 72 commits into
base: develop
Choose a base branch
from
Draft

rebase #8

wants to merge 72 commits into from

Commits on Sep 25, 2024

  1. Feat: Parallel Transaction Execution Implementation

    This PR implement the Parallel EVM engine
    
    Co-authored-by: setunapo
    Co-authored-by: sunny2022da
    Co-authored-by: galaio
    Co-authored-by: andyzhang2023
    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ecaef53 View commit details
    Browse the repository at this point in the history
  2. Fix: fix incorrectly set origin storage.

    Fix an issue of incorrectly set the origin storage at parallel stateDB's
    GetState(). Remove this code because it is already solved by lightCopy
    
    PR: #2
    DavidZangNR authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    247f63c View commit details
    Browse the repository at this point in the history
  3. Feat: TxDAG: support TxDAG

    rwset: support collect rwset from statedb;
    mvstates: support export DAG;
    dag: support travel all execution paths;
    dag: refactor versioned TxDAG;
    dag: support profile parallel execution path;
    protocol: support to transfer TxDAG in NewBLock msg;
    
    PR: #4
    galaio authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    dedf04e View commit details
    Browse the repository at this point in the history
  4. fix several UT with racing issues (#5)

    * fix several UT with racing issues
    
    * fix incorrect nonce balance codehash issue
    
    case: TestEIP1559 / TestDeleteThenCreate
    
    * Fix ExecutionSpec tests
    
    mainly root caused by balance not updated to dirty correctly.
    also fix similar issue with nonce and codehash.
    
    * fix TestBlockChain testcase issue
    
        TestBlockchain/ValidBlocks/bcStateTests/refundReset.json
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    0f9be14 View commit details
    Browse the repository at this point in the history
  5. TxDAG: support PEVM static dispatch; (#6)

    * dag: add merge execute path method;
    pevm: support dispatch with TxDAG;
    
    * dag: add merge execute path method;
    pevm: support dispatch with TxDAG;
    
    * dag: clean code;
    
    * statedb: fix some broken uts;
    
    * pevm: support disable slot steal;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    e2517b3 View commit details
    Browse the repository at this point in the history
  6. fix UT test and contention issue (#7)

    * fix several UT with racing issues
    
    * fix incorrect nonce balance codehash issue
    
    case: TestEIP1559 / TestDeleteThenCreate
    
    * Fix ExecutionSpec tests
    
    mainly root caused by balance not updated to dirty correctly.
    also fix similar issue with nonce and codehash.
    
    * fix TestBlockChain testcase issue
    
        TestBlockchain/ValidBlocks/bcStateTests/refundReset.json
    
    * fix concurrent racing issue of state.accounts.
    
    fix incorrect use of s.accountStorageParallelLock, it is designed
    to be used for dirty/pending/original storages, not the accounts and
    storages.
    
    Use statedb.AccountMux and statedb.StorageMux for accounts/storages
    lock.
    
    * fix issue of DAOTransactions
    
    handle the issue of updateObject of mainDB object touched by DAO transaction.
    
    ---------
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d3edc53 View commit details
    Browse the repository at this point in the history
  7. Fix: dead lock issue

    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    74e2c96 View commit details
    Browse the repository at this point in the history
  8. Fix: avoid update the stateObjects at conflict check phase

    There can be a issue that the object updated by mainDB.GetNonce etc is
    obseleted.
    
    The fix use statedb.getStateObjectNoUpdate to avoid touching the
    stateObjects of mainDB.
    
    Case: TestBlockchain/ValidBlocks/bcEIP1559/intrinsic.json
    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    1e09e32 View commit details
    Browse the repository at this point in the history
  9. TxDAG: support TxDAG transfer, it can be used in QA performance testi…

    …ng; (bnb-chain#10)
    
    * txdag: support txdag transfer in extra;
    
    * txdag: support txdag transfer in extra;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    2c9e42c View commit details
    Browse the repository at this point in the history
  10. txdag: support write & read TxDAG from file; (#9)

    txdag: record txdag metrics;
    
    txdag: opt txdag flag name;
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    732090a View commit details
    Browse the repository at this point in the history
  11. FIX: redundancy execution and incorrect merge of dirty object (bnb-ch…

    …ain#12)
    
    Fix 3 issues:
      - re-execution happens only to new version of baseDB to remove
        redundancy execution. And remove the retry with same baseIndex
        that is conflicted.
      - incorrect merge dirty objects in addrStateChangeInSlot, which
        cause incorrect data.root copied with obseleted stateDB, this
        fix handle the created, stateChanged and deleted object separately.
      - stateObject.GetCommitedState check mainDB of the object delete.
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ada5f62 View commit details
    Browse the repository at this point in the history
  12. pevm: support delay gas fee calculation & Uts; (bnb-chain#11)

    * pevm: support delay gas fee calculation;
    txdag: check gas fee receiver;
    tests: support PEVM+TxDAG UTs;
    
    * txdag: skip some cost time operation;
    tests: fix some broken UTs;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6b51dcc View commit details
    Browse the repository at this point in the history
  13. FIX: issue in fixUpOriginAndResetPendingStorage (bnb-chain#14)

    The originStorage will miss some loading in txn execution,do merge
    rather than simple copy
    
    This fix also use stateObject specific lock for storage update, rather
    than the one in stateDB.
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    23d66cc View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4f213c5 View commit details
    Browse the repository at this point in the history
  15. txdag: remove legacy TxDAG transfer logic; (bnb-chain#16)

    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    a48f502 View commit details
    Browse the repository at this point in the history
  16. txdag: opt txdag logic & clean todos; (bnb-chain#17)

    txdag: opt rw record flag;
    
    txdag: opt some logic;
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    947370f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5963131 View commit details
    Browse the repository at this point in the history
  18. txdag: opt TxDAG rwset collecting & generating; (bnb-chain#19)

    * txdag: opt some logic;
    
    txdag: opt rw set collect logic;
    
    * pevm: opt logs;
    
    * txdag: opt txdag encoding, reduce rlp size;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ea8d9ad View commit details
    Browse the repository at this point in the history
  19. contention issue fix (bnb-chain#21)

    * remove finalise
    
    * fix: update maindb txIndex after merge slotDB
    
    otherwise there can be issue that txIndex is load before the change in
    mergeSlotDB.
    
    * Fix: avoid update mainDB nonce in executeInSlot
    
    It should use slotDB, otherwise it cause the stateObjects change in
    mainDB, which cause racing issue.
    
    * Fix: remove stateDB update during conflict check
    
    stateDB.getState() will update the stateDB's stateObjects, which should
    not be updated for the purpose of state read for conflict check.
    
    ---------
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    eaf7405 View commit details
    Browse the repository at this point in the history
  20. txdag: support multi flags, and supported in pevm; (bnb-chain#22)

    * txdag: add excluded flag;
    mvstates: generate txdag with excluded flag;
    
    * pevm: support txdag with excluded tx;
    
    * blockchain: opt txdag file mode;
    
    * pevm: fix dispatch bugs;
    
    * pevm: opt txdag dispatch;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    92b02c9 View commit details
    Browse the repository at this point in the history
  21. pevm: opt slot trigger mechanism; (bnb-chain#24)

    * pevm: opt slot trigger mechanism;
    
    * txdag: opt execute stat;
    
    * pevm: opt slot trigger mechanism;
    
    * txdag: add txdag more validation logic;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    bfff8f8 View commit details
    Browse the repository at this point in the history
  22. fix addBalance for delayGasFee (bnb-chain#25)

    Make the change into the merged mainDB instead of slotDB to avoid
    the concurrency issue
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ec799b0 View commit details
    Browse the repository at this point in the history
  23. txdag: opt read txdag file and validation logic; (bnb-chain#26)

    * txdag: support new txdep resolve method;
    pevm: avoid read txdag file when generating;
    
    * pevm: support read txdag file in const size;
    
    * txdag: reduce mem alloc and async resolve tx dependency;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4c41ce4 View commit details
    Browse the repository at this point in the history
  24. pevm: opt read large txdag logic and add conflict metrics; (bnb-chain#29

    )
    
    * pevm: add some parallel tx metrics;
    
    * pevm: opt read large txdag logic;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    879bf45 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f111c50 View commit details
    Browse the repository at this point in the history
  26. feat: avoid parallel process for block with few txs

    This change enable parallel execution when txs count >
    parallelTxNum/2 + 2, with lower bound as 4, as the parallel execution
    is slower than serial execution with single thread.
    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6a205be View commit details
    Browse the repository at this point in the history
  27. fix: avoid rewrite readsCache in slotDB

    This change avoid the rewrite of reads cache in slotDB.
    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    2f99b82 View commit details
    Browse the repository at this point in the history
  28. Fix: incorrect GetState of obsoleted data caused by createObject

    This change fix the issue that prevDestruct is not recorded correctly
    and the stateObjectDestruct is not recorded in slotDB's createObject.
    The incorrect record causes the GetState get obsoleted state as the
    stateObjectDestruct is not correct.
    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6117f5e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    828901f View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    e774f15 View commit details
    Browse the repository at this point in the history
  31. fix log issue

    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    fcc558c View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    f38a91e View commit details
    Browse the repository at this point in the history
  33. txDAG transfer (bnb-chain#28)

    * txDAG transfer
    
    * set flag of txDAG transaction to 'no dependency'
    
    * encode/decode txDAG data with ABI
    
    * set enable flag for txdag
    
    * set txDAG receiver to a special address
    
    * remove invalid flags
    
    ---------
    
    Co-authored-by: andyzhang2023 <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    3b0cf58 View commit details
    Browse the repository at this point in the history
  34. txdag: using pending writes to accelerate txdag generation, add more …

    …bench tests; (bnb-chain#30)
    
    * mvstate: using pending writes to accelerate txdag generation;
    
    * txdag: test snappy compress ratio;
    
    * txdag: add more bench tests;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6c0427b View commit details
    Browse the repository at this point in the history
  35. feat: code cleanup (bnb-chain#23)

    This PR refine and clean up the code of PEVM
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f614341 View commit details
    Browse the repository at this point in the history
  36. recover test case

    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4b29585 View commit details
    Browse the repository at this point in the history
  37. fix ut of txDAG (bnb-chain#32)

    Co-authored-by: andyzhang2023 <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ecd5463 View commit details
    Browse the repository at this point in the history
  38. txdag: support reset txdag reader when SetHead; (bnb-chain#31)

    * txdag: support reset txdag reader when SetHead;
    
    * txdag: clean some useless logs;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    a6583c8 View commit details
    Browse the repository at this point in the history
  39. txdag: fix system tx finalise issue; (bnb-chain#33)

    * txdag: fix system tx finalise issue;
    
    * txdag: fix system tx finalise issue;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    0a1c2d6 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    79fdce7 View commit details
    Browse the repository at this point in the history
  41. mvstates: fix async dep gen deadlock issue & opt mining txdag generat…

    …ion; (bnb-chain#35)
    
    * mvstates: fix async dep gen deadlock issue;
    miner: support record sysytem tx rwset;
    
    * miner: opt txdag enable checking;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    52ce0e9 View commit details
    Browse the repository at this point in the history
  42. fix parallel Num (bnb-chain#36)

    * refine log to use debug for conflict detail
    
    * fix: adjust parallelNum to use CpuNum-1 by default
    
    ---------
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    737ed16 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    febc88e View commit details
    Browse the repository at this point in the history
  44. mvstates: opt async dep generation; (bnb-chain#38)

    mvstates: opt resolve dep logic;
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    34012e1 View commit details
    Browse the repository at this point in the history
  45. mvstates: fix oom issue when mining is enabled; (bnb-chain#40)

    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    1a40629 View commit details
    Browse the repository at this point in the history
  46. reduce overhead of slotDB initialize (bnb-chain#39)

    * fix: use slotdb pool
    
    * fix UT of parallel slotDB
    
    ---------
    
    Co-authored-by: Sunny <[email protected]>
    DavidZangNR and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f5cc9ca View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    fb8203e View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    9c9bdca View commit details
    Browse the repository at this point in the history
  49. worker: fix TxDAG generation issues when mining block; (bnb-chain#43)

    * blockchain: avoid enable txdag generation when pevm is enabled;
    mvstates: add timeout timer for async loop;
    
    worker: change append TxDAG position;
    
    worker: fix append TxDAG missing issue;
    
    * blockchain: opt mining txdag generation logic;
    
    ---------
    
    Co-authored-by: galaio <[email protected]>
    2 people authored and sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    c96af03 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    87987cc View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    061cd9b View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    2768aea View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    8571571 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    fb2630c View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    c97b6c1 View commit details
    Browse the repository at this point in the history
  56. async the merge phase

    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    94d3658 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    72b27f4 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    d300ab8 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    4d6273f View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    8ea1140 View commit details
    Browse the repository at this point in the history
  61. parallelDBManager global

    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    3c5eda5 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    fc50e31 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    db146bc View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    d03c218 View commit details
    Browse the repository at this point in the history
  65. fix issue after rebase

    sunny2022da committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f8f5dc4 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

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

Commits on Sep 29, 2024

  1. log

    sunny2022da committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    c8b6a41 View commit details
    Browse the repository at this point in the history
  2. fix createObject prev

    sunny2022da committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    e66ad25 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba207bc View commit details
    Browse the repository at this point in the history
  4. log setcode

    sunny2022da committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    54dd5ad View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. fix getcode with log

    sunny2022da committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    536d5d9 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

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