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

Merge develop (v0.4.0-beta-candidate) to master for v0.4.0 #904

Merged
merged 211 commits into from Jun 27, 2023

Conversation

pratikspatil024
Copy link
Member

No description provided.

cffls and others added 30 commits September 28, 2022 16:12
* basic txn prioritizer implemented using mutex map

* Re-execute parallel tasks when there is a read in coinbase or burn address

* Re-execute parallel tasks when there is a read in coinbase or burn address

* using *sync.RWMutex{} in mutexMap

Co-authored-by: Jerry <jerrycgh@gmail.com>
Added tests for executor and some improvements:

1. Add a dependency map during execution. This will prevent aborted tasks from being sent for execution immedaitely after failure.
2. Change the key of MVHashMap from string to a byte array. This will reduce time to convert byte slices to strings.
3. Use sync.Map to reduce the time spent in global mutex.
4. Skip applying intermediate states.
5. Estimate dependency when an execution fails without dependency information.
6. Divide execution task queue into two separate queues. One for relatively certain transactions, and the other for speculative future transactions.
7. Setting dependencies of Txs coming from the same sender before starting parallel execution.
8. Process results in their semantic order (transaction index) instead of the order when they arrive. Replace result channel with a priority queue.
* Create MVHashMap and use it StateDB

* Parallel state processor

* Move fee burning and tipping out of state transition to reduce read/write dependencies between transactions

* Re-execute parallel tasks when there is a read in coinbase or burn address

* Block-stm optimization

Added tests for executor and two major improvements:

1. Add a dependency map during execution. This will prevent aborted tasks from being sent for execution immedaitely after failure.
2. Change the key of MVHashMap from string to a byte array. This will reduce time to convert byte slices to strings.

* Remove cache from executor test

* added mvhashmap unit tests (with  as key)

* Shard mvhashmap to reduce the time spent in global mutex

* Skip applying intermediate states

* Dependency improvement

* added test for status

* Create MVHashMap and use it StateDB

* Parallel state processor

* Move fee burning and tipping out of state transition to reduce read/write dependencies between transactions

* Re-execute parallel tasks when there is a read in coinbase or burn address

* Txn prioritizer implemented using mutex map (#487)

* basic txn prioritizer implemented using mutex map

* Re-execute parallel tasks when there is a read in coinbase or burn address

* Re-execute parallel tasks when there is a read in coinbase or burn address

* using *sync.RWMutex{} in mutexMap

Co-authored-by: Jerry <jerrycgh@gmail.com>

* added getReadMap and getWriteMap (#473)

* Block-stm optimization

Added tests for executor and some improvements:

1. Add a dependency map during execution. This will prevent aborted tasks from being sent for execution immedaitely after failure.
2. Change the key of MVHashMap from string to a byte array. This will reduce time to convert byte slices to strings.
3. Use sync.Map to reduce the time spent in global mutex.
4. Skip applying intermediate states.
5. Estimate dependency when an execution fails without dependency information.
6. Divide execution task queue into two separate queues. One for relatively certain transactions, and the other for speculative future transactions.
7. Setting dependencies of Txs coming from the same sender before starting parallel execution.
8. Process results in their semantic order (transaction index) instead of the order when they arrive. Replace result channel with a priority queue.

* Do not write entire objects directly when applying write set in blockstm

* fixed a small bug in the Report function (#530)

* linters

Co-authored-by: Jerry <jerrycgh@gmail.com>
There seems to be an issue when hasher is used concurrently in parallel
execution. This change will ensure no hasher is used by multiple
executors at the same time.
* dev: add: pos-944 security ci and readme

* dev: add: pos-944 remove linters as this is included already in build ci

* dev: chg: pos-947 dependencies upgrade to solve snyk security issues

* dev: chg: update security-ci

* dev: chg: remove linter to allow replacements for security issues

* dev: add: pos-944 verify path when updating metrics from config

* dev: add: pos-944 fix linter

* dev: add: pos-944 add .snyk policy file / fix snyk code vulnerabilities

* dev: fix: pos-944 import common package / gitignore snyk dccache file

* dev: fix: pos-944 verify canonical path for crashers

* dev: fix: pos-944 linter

* dev: add: pos-976 add govuln check

* dev: add: pos-976 test upload with permissions

* dev: add: pos-976 remove duplicated upload

* dev: add: pos-976 report upload

* dev: add: pos-976 remove upload

* dev: fix: pos-944 fix govuln action

* dev: fix: pos-944 move govulncheck to security-ci

* dev: fix: pos-944 bump golvun action and golang versions

* dev: fix: pos-944 remove persmissions and fix conflicts

* dev: chg: restore err msg

* dev: chg: remove duplicated function

* dev: chg: sort import

* dev: chg: fix linter

* dev: add: use common VerifyCrasher function to avoid duplications / replace deprecated ioutils.ReadFile

* dev: fix: typo
marcello33 and others added 20 commits June 1, 2023 14:55
* dev: add: additional elements in PR checklist

* dev: chg: erigon task in the checklist
…cs-format

DEVOPS-829 format fix for prometheus metrics
…ted (#889)

An address's nonce and balance will get updated even if its transaction is reverted. Therefore, we need to keep balance and nonce in write list in order to check the transaction's validity in parallel execution.
* updated Indore HF related changes by adding stateSyncConfirmationDelay

* converted StateSyncConfirmationDelay to map[string]uint64 and cleanup

* calculate last state ID from incoming state object with eth call (#883)

* removed IndoreBlock from configs

* fix

* remove code duplication and refactor

---------

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
A reverted transaction, X, can incorrectly write to a slot, which might be read by another transaction, Y. If we skip checking states written by X, then Y might end up with reading the wrong value and we won't be able to detect this error.
Currently, we determine if MVHashMap should be enabled by checking the block number with parallelUniverse flag in genesis, which has a value of 0. Some headers' block number is 0, so MVHashMap was enabled, which led to a few errors. Disable this flag explicitly until we figure out a proper hardfork solution.
…e. This issue only is present due to difference in test versus primary
Addressing an issue with packager using any versus mumbai network nam…
@pratikspatil024 pratikspatil024 requested a review from a team June 22, 2023 09:50
@pratikspatil024 pratikspatil024 marked this pull request as draft June 22, 2023 09:51
@pratikspatil024 pratikspatil024 marked this pull request as ready for review June 27, 2023 03:58
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 61.13% and project coverage change: +0.02 🎉

Comparison is base (6de2a49) 56.78% compared to head (a055726) 56.80%.

❗ Current head a055726 differs from pull request most recent head d71c00d. Consider uploading reports for the commit d71c00d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #904      +/-   ##
==========================================
+ Coverage   56.78%   56.80%   +0.02%     
==========================================
  Files         611      617       +6     
  Lines       71390    73610    +2220     
==========================================
+ Hits        40539    41817    +1278     
- Misses      27394    28251     +857     
- Partials     3457     3542      +85     
Impacted Files Coverage Δ
common/path.go 0.00% <0.00%> (ø)
consensus/bor/api.go 0.00% <0.00%> (ø)
consensus/bor/bor.go 7.14% <0.00%> (-0.32%) ⬇️
consensus/bor/genesis_contract_mock.go 0.00% <0.00%> (ø)
consensus/bor/span_mock.go 0.00% <0.00%> (ø)
core/tx_pool.go 78.68% <0.00%> (+0.27%) ⬆️
core/types/gen_header_json.go 0.00% <0.00%> (ø)
core/types/transaction_signing.go 67.23% <0.00%> (-2.37%) ⬇️
core/vm/contracts.go 77.65% <ø> (ø)
core/vm/instructions.go 24.74% <0.00%> (ø)
... and 59 more

... and 19 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pratikspatil024 pratikspatil024 merged commit 16746a7 into master Jun 27, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet