Commit graph

31 commits

Author SHA1 Message Date
Jerry
d9daacad17
Address goroutine leak 2024-09-12 15:56:33 -07:00
anshalshukla
a66305dae3
fix: lint, add: milestone related tests in downloader 2024-09-05 14:03:10 +05:30
Anshal Shukla
dbf55ce6cc
Merge tag 'v1.14.6' into upstream_merge_1.14.6 2024-08-05 16:29:10 +05:30
Anshal Shukla
f4c41e2e70
Merge branch 'release/1.13' into upstream_merge_1.13 2024-07-10 11:19:34 +05:30
Pratik Patil
f1e0b1d926
Changed parallel universe HF to Cancun HF and some important fixes (#1132)
* changed parallel universe HF to napoli HF

* integration-tests: update ipc path on ci tests (#1127)

* integration-tests: update ipc path on ci tests

* added devnetBorFlags in matic-cli-config.yml

---------

Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>

* Revert "integration-tests: update ipc path on ci tests (#1127)"

This reverts commit 0660fac39b.

* using cancun for block-stm metadata instead of napoli

* added a check to verify tx dependencies and test cases

* fix in snapshot.chainConfig

* removed snapshot.*params.BorConfig using snapshot.chainConfig.Bor instead

* removed unnecessary if statement in ParallelStateProcessor.Process

* addressed comment

* small fix in commitTransactions

* dependency calculation bug fix in miner/worker.go

---------

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
2024-01-23 10:52:00 +05:30
Pratik Patil
e3192cae8b
hot fix: block stm ParallelSpeculativeProcesses flag 2023-11-24 12:50:04 +05:30
Arpit Temani
d3c5bc9b45 fix build 2023-08-21 17:48:09 +05:30
Shivam Sharma
750437b93e fix : TxDependency 2023-07-28 18:02:53 +05:30
Shivam Sharma
811c90f549 Merge branch 'develop' into mardizzone/upstream-merge 2023-07-24 14:19:30 +05:30
marcello33
b5571e97fb dev: chg: further fixes merging develop into upstream-merge 2023-06-13 13:01:18 +02:00
Jerry
f2c48fed0b
Remove dependency when a transaction is reverted
If a transaction is reverted, its write records should be excluded from
dependency calculation.
2023-05-11 09:09:33 -07:00
Pratik Patil
c39c66fb9c
Added check for circular and out-of-range dependency problem (#841)
* added check for circular and out-of-range dependency problem

* addressed comment

* addressed comments
2023-05-11 12:20:58 +05:30
Jerry
193aee0063
Make block context sharable in parallel state processor 2023-05-04 11:36:55 -07:00
Jerry
82390264bc
Remove recover from settle 2023-05-01 15:32:20 -07:00
Jerry
a093c4e7df
Merge remote-tracking branch 'upstream/develop' into block-stm 2023-05-01 11:16:05 -07:00
Jerry
01fc7e3a53
Run serial and parallel processor at the same time 2023-04-24 21:48:41 -07:00
Jerry
5860b8e89c Create new block context for each parallel task 2023-04-19 12:22:59 -07:00
Jerry
48c1f9078d Allow parallel state processor to be interrupted by caller 2023-04-19 12:22:59 -07:00
Jerry
650e1413f3
Allow process in state processor to be interrupted by caller 2023-04-11 15:30:08 -07:00
Pratik Patil
480ccf2aa8
Optimized the dependency metadata structure (#804)
* removed the first 2 element in TxDependency[i]

* addressed comments
2023-04-05 11:12:57 +05:30
Pratik Patil
9795a287d0
added 2 flags to enable parallel EVM and set the number of speculative processes (#727) 2023-02-09 13:34:06 +05:30
Pratik Patil
d53c2e7902
Block stm miner dependency (#561)
* added support for dependencies (executor_tests)

* added a function to get dependency map

* getting all dependencies in the GetDep function

* updated GetDep function

* changed the type of AllDeps

* added a function to get dependency map

* updated GetDep function

* generate and get dependencies from block producer

* optimized getDep function

* bug fix regarding txn index and dep structure

* fixed gas bug

* optimized getDep function

* tests updated/added

* few updates regarding dependencies

* added channel to calculate the dependencies in a separate go routine

* minor changes in the executor which uses latest changes of dependecies + removed metadata flag/argument

* Use channel when metadata is available

* small bug fix

* getting reads and writes only when the transaction succeeds

* fixed bug in adding dependencies

* updated logic for delay/not delay

* bug fix (shouldDelayFeeCal) in parallel state processor

* lint fix

* using EnableMVHashMap flag

* fixed worker and stateProcessor and removed SetMVHashMapNil fumction from stateDB

* addredded few comments and fixed bug in executor tests

* commented executor tests with metadata (panic: test timed out after 5m0s)

* added a check to check len(mvReadMapList) > 0 in miner

* addressed comments, minor refactoring in dag.go

* moved blockContext out of Execute and adding it in execution task

* removed Author() from Settle() and added  in execution task

* not calling block.Header() again and again, using  instead

* removed EnableMVHashMap flag, and updated applyTransaction function

* addressed comments

* added unit test to check dependencies in the block header

Co-authored-by: Jerry <jerrycgh@gmail.com>
2022-12-23 09:14:09 +05:30
Jerry
6f0d16fbeb Add ability to calculate the longest execution path in a block 2022-10-05 11:37:46 -07:00
Jerry
e63e390ec7 Recognize bad transactions and break loop in blockstm executor 2022-09-29 23:05:09 -07:00
Jerry
471afc8da2 Refactor blockstm executor 2022-09-29 23:05:09 -07:00
Jerry
c36ad88aec 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.
2022-09-28 16:12:20 -07:00
Pratik Patil
4507b2e057 added getReadMap and getWriteMap (#473) 2022-09-28 16:12:20 -07:00
Pratik Patil
f7bd7ca66b 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>
2022-09-28 16:12:20 -07:00
Jerry
ab3ebebcca Re-execute parallel tasks when there is a read in coinbase or burn address 2022-09-28 16:12:20 -07:00
Jerry
61accb021a Move fee burning and tipping out of state transition to reduce read/write dependencies between transactions 2022-09-28 16:12:20 -07:00
Jerry
bbcc6dd0ad Parallel state processor 2022-09-28 16:12:20 -07:00