forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing OptimizedStack based on uint256 integers (#170)
* Introducing OptimizedStack based on uint256 integers (#156) * Introducing OptimizedStack based on uint256 integers. * Replacing big.int with uint256 for jump instruction. * Update state/runtime/evm/instructions.go Co-authored-by: Goran Rojovic <100121253+goran-ethernal@users.noreply.github.com> * Code review fixes. * opMStore is changed to use newly introduced WriteToSlice() function with unrolled loop. This allows CPU to execute multiple instructions in parallel providing >200% increased speed compared to uint256.WriteToSlice() implementation. If needed, can be additionally implemented for different array lengths. * Fixing linter errors. * setBytes to use uint256 instead of big.int. * Fixing linter errors. * Go mod tidy * Lint fix * Revert go version * Address comments * Remove pointer dereferencing and use value type reference --------- Co-authored-by: Goran Rojovic <100121253+goran-ethernal@users.noreply.github.com> Co-authored-by: Stefan Negovanović <stefan@ethernal.tech> * Updating tracer to use optimized stack directly, instead of big.int. * Removing remaining big.int references from instructions.go and state.go where possible. Removing unused functions and constants. * Adding error handling for invalid balance and invalid message value. * Adding benchmark tests for OptimizedStack. * Group dependencies * Fixing state error code name for errInvalidBalanceValue. --------- Co-authored-by: cokicm <mita.cokic@gmail.com> Co-authored-by: Goran Rojovic <100121253+goran-ethernal@users.noreply.github.com>
- Loading branch information
1 parent
0a412e3
commit f20097c
Showing
20 changed files
with
1,188 additions
and
833 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.