-
Notifications
You must be signed in to change notification settings - Fork 268
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
RSKIP 351 + RSKIP 144 #1930
RSKIP 351 + RSKIP 144 #1930
Conversation
Versioned header + block header compression + body response message with header extension
Instead of paying to the REMASC contract…every transaction, the fees are accumulated into a variable and once all of the transactions are processed, the fees are added to the Remasc's balance in the MutableRepository. If the rREMASCFee is greater than 0 the payment is made. Some tests had to be changed since they replicate the behavior of the block executor and the REMASC payment is actually made in the block executor so the tests were modified as well
* Added the execution plan for the transaction to the block header as a transactionEdgeList. * Added ParallelizeTransactionHandler that builds the different buckets that are going to be executed by different threads. If the sequential bucket doesn't have enough gas for the new transaction, the transaction isn't added to the block. In addition, once all the transactions are processed, the order of the transactions in the buckets is added to the receipt. The REMASC transaction is always added to the SequentialBucket. When a transaction is properly added to a bucket, it returns the gas used in that bucket. * Added a tracker to the MutableRepository (MR). If the MR is used for any reason but builds the block, the tracker used is a DummyTracker one. * Review processed * Handler's been refactorized (#1760) * Added tests. * Research/parallel-tx/splitting executions (#1799) * changed method names, deleted executeInternal from blockExecutor, and changed execute for executeParallel in some places. fixed BlockExecutorTest since from now on when the block is executed with executeAndFill and its blockNumber is over the rskip144 then the transactionEdgeList is built by the miner * Three changes so test pass (i) Changed the block hash in Web3ImplLogsTest due to the new field in the header for txEdges, (ii) Many tests used a really high gas, then we decided not to split the gas limit by two for parallel and sequential bucket, and (iii) addRemascFee wasn't present in the oldSequentialExecute and now is added.
* Added thread logic in the Tracker so it controls whether there is a key collision between threads * Clear tracker between parallel and sequential execution within the parallel block execution * Tracker is now atomic * Added tests to test for race conditions * Tracker returns a copy of the maps.
* store and return a copy of txEdges * merged two ifs in the BlockHeaderBuilder * DummyTracker updated so it returns a copy of the maps * Unused hashmap import deleted from ProgramTraceProcessor * BlockResult returns and stores a copy of txEdges * big refactor in BlockExecutor * Refactor ParallelizeTransactionHandler * renaming Bucket to Sublist * renaming txExecutionListsEdges to txExecutionSublistEdges * simplification of Handler's code * InterruptedException solved properly in the BlockExecutor
* Avoid tracking write for add balance 0 * Avoid tracking when writing the same value * Rename assertion * Remove condition for add balance zero It is considered in "write the same value" * Revert breaks
* Remove same written value check Ignored repository tracking tests * Add tests for addBalance * Avoid writing on addBalance(0)
* Refactor repeated code * Refactor repeated edges mocking * Modify test for too many edges - it was also hitting out of bounds * Refactor out of bounds validation If edges are in order, last edge decides if any was out of bounds * Rename test * Add case where first edge is zero First changed to prev = -1, then added test that failed, then set back prev = 0 * Refactor order verification * Research/refactoring code (#1817) * store and return a copy of txEdges * merged two ifs in the BlockHeaderBuilder * DummyTracker updated so it returns a copy of the maps * Unused hashmap import deleted from ProgramTraceProcessor * BlockResult returns and stores a copy of txEdges * big refactor in BlockExecutor * Refactor ParallelizeTransactionHandler * renaming Bucket to Sublist * renaming txExecutionListsEdges to txExecutionSublistEdges * simplification of Handler's code * InterruptedException solved properly in the BlockExecutor * Research/parallel-tx/optimize writes (#1811) * Avoid tracking write for add balance 0 * Avoid tracking when writing the same value * Rename assertion * Remove condition for add balance zero It is considered in "write the same value" * Revert breaks * Add test refactor back * Make remasc transaction not be in a parallelized sublist * Research/parallel-tx/Fix isRemascTransaction validation and pass correct index (#1822) * Fix isRemascTransaction validation and pass correct index * Remove -1 * Rename local data * Add tests for isRemascTransaction * Add tests for remasc transaction * Fix txindex Added test for block with rejected tx * Add missing txindex++ * Fix merge error Co-authored-by: julianlen <[email protected]>
* B1. Confusing Naming of conflict sets - Solved * B3. Incorrect use of LongAccumulator * B4. Truncated BigInteger Pays Incorrect Fees * B5. Setup of new Precompiles is not correctly tracked * B7. Determinism even on conflict (#1873) * 2X performance improvement, and better tests (#1884) Co-authored-by: Sergio Demian Lerner <[email protected]>
* it checks if remasc is enabled before performing the payment to the remasc address * modified remasc payment so it is paid just before the remasc transaction is processed
fb96716
to
06d0b0e
Compare
pipeline:run |
pipeline:run |
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
pipeline:run |
…p351+rskip144-merge
…44-merge master -> rskip351+rskip144 merge
pipeline:run |
…sonar fix(pte): fixing sonar complaints
…ress-sonar fix(pte): suppress sonar warnings
pipeline:run |
…p351+rskip144-merge
…44-merge master -> rskip351+rskip144 merge
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Merge from #1793 into #1925
fed:rskip351+rskip144