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

chore: update to compatibility with latest version of vm2 #9

Merged
merged 8 commits into from
May 23, 2024

Conversation

joonazan
Copy link
Collaborator

Had to adjust the integration a bit because of vm2 interface changes. Adjusted the amount of gas passed to the VM.

With this version vm2 only fails TransientStorage tests. Those opcodes are unimplemented.

@joonazan joonazan changed the base branch from main to v1.5.0 April 10, 2024 12:17
@joonazan joonazan requested a review from hedgar2017 April 10, 2024 12:17
Copy link

github-actions bot commented Apr 10, 2024

Benchmark results:

╔═╡ Size (-%) ╞════════════════╡ All M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════════════╡ All M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════════════╡ All M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════════════╡ All MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════════════╡ All MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════════════╡ All MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                                 NaN ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs/gas ╞══════╡ EVMInterpreter M3B3 ╞═╣
║ ADD                                69.333 ║
║ MUL                                40.400 ║
║ SUB                                69.333 ║
║ DIV                                48.800 ║
║ SDIV                               65.600 ║
║ MOD                                47.600 ║
║ SMOD                               63.200 ║
║ ADDMOD                             39.625 ║
║ MULMOD                             36.625 ║
║ EXP                                 9.367 ║
║ SIGNEXTEND                         46.400 ║
║ LT                                 73.333 ║
║ GT                                 73.333 ║
║ SLT                                97.333 ║
║ SGT                                95.333 ║
║ EQ                                 73.333 ║
║ ISZERO                             65.000 ║
║ AND                                67.333 ║
║ OR                                 69.333 ║
║ XOR                                69.333 ║
║ NOT                                61.000 ║
║ BYTE                               77.333 ║
║ SHL                                75.333 ║
║ SHR                                73.333 ║
║ SAR                                91.333 ║
║ SGT                                95.333 ║
║ SHA3                               28.519 ║
║ ADDRESS                            93.781 ║
║ BALANCE                            73.230 ║
║ ORIGIN                           1389.969 ║
║ CALLER                             93.781 ║
║ CALLVALUE                          93.781 ║
║ CALLDATALOAD                       63.333 ║
║ CALLDATASIZE                       94.000 ║
║ CALLDATACOPY                       71.533 ║
║ CODESIZE                           91.000 ║
║ CODECOPY                          145.574 ║
║ GASPRICE                         1392.688 ║
║ EXTCODESIZE                         5.149 ║
║ EXTCODECOPY                         4.667 ║
║ RETURNDATASIZE                     89.000 ║
║ RETURNDATACOPY                     55.889 ║
║ EXTCODEHASH                         2.687 ║
║ BLOCKHASH                         244.700 ║
║ COINBASE                         1392.969 ║
║ TIMESTAMP                        1389.969 ║
║ NUMBER                           1389.969 ║
║ PREVRANDAO                       1389.969 ║
║ GASLIMIT                         1395.969 ║
║ CHAINID                          1389.969 ║
║ SELFBALANCE                       641.312 ║
║ BASEFEE                          1386.969 ║
║ POP                                81.500 ║
║ MLOAD                              80.186 ║
║ MSTORE                             82.069 ║
║ MSTORE8                            89.912 ║
║ SLOAD                              39.327 ║
║ SSTORE                              9.099 ║
║ JUMP                               37.333 ║
║ JUMPI                              32.818 ║
║ PC                                 94.281 ║
║ MSIZE                             103.781 ║
║ GAS                                88.281 ║
║ JUMPDEST                          127.562 ║
║ PUSH0                              91.281 ║
║ PUSH1                              78.854 ║
║ PUSH2                              96.854 ║
║ PUSH4                             158.854 ║
║ PUSH5                             180.854 ║
║ PUSH6                             202.854 ║
║ PUSH7                             224.854 ║
║ PUSH8                             246.854 ║
║ PUSH9                             268.854 ║
║ PUSH10                            290.854 ║
║ PUSH11                            310.854 ║
║ PUSH12                            334.854 ║
║ PUSH13                            356.854 ║
║ PUSH14                            378.854 ║
║ PUSH15                            400.854 ║
║ PUSH16                            422.854 ║
║ PUSH17                            444.854 ║
║ PUSH18                            466.854 ║
║ PUSH19                            488.854 ║
║ PUSH20                            510.854 ║
║ PUSH21                            532.854 ║
║ PUSH22                            554.854 ║
║ PUSH23                            576.854 ║
║ PUSH24                            598.854 ║
║ PUSH25                            620.854 ║
║ PUSH26                            642.854 ║
║ PUSH27                            664.854 ║
║ PUSH28                            686.854 ║
║ PUSH29                            708.854 ║
║ PUSH30                            730.854 ║
║ PUSH31                            752.854 ║
║ PUSH32                            774.854 ║
║ DUP1                               63.000 ║
║ DUP2                               67.000 ║
║ DUP3                               67.000 ║
║ DUP4                               67.000 ║
║ DUP5                               67.000 ║
║ DUP6                               67.000 ║
║ DUP7                               67.000 ║
║ DUP8                               67.000 ║
║ DUP9                               67.000 ║
║ DUP10                              67.000 ║
║ DUP11                              67.000 ║
║ DUP12                              67.000 ║
║ DUP13                              65.000 ║
║ DUP14                              67.000 ║
║ DUP15                              67.000 ║
║ DUP16                              67.000 ║
║ SWAP1                              67.667 ║
║ SWAP2                              67.667 ║
║ SWAP3                              67.667 ║
║ SWAP4                              67.667 ║
║ SWAP5                              67.667 ║
║ SWAP6                              67.667 ║
║ SWAP7                              67.667 ║
║ SWAP8                              67.667 ║
║ SWAP9                              67.667 ║
║ SWAP10                             67.667 ║
║ SWAP11                             65.667 ║
║ SWAP12                             67.667 ║
║ SWAP13                             67.667 ║
║ SWAP14                             67.667 ║
║ SWAP15                             67.667 ║
║ SWAP16                             67.667 ║
║ CALL                               56.371 ║
║ STATICCALL                         53.248 ║
║ DELEGATECALL                       52.286 ║
║ CREATE                              5.046 ║
║ CREATE2                             7.066 ║
║ RETURN                              1.000 ║
║ REVERT                              1.000 ║
╠═╡ Ergs/gas (-%) ╞═╡ EVMInterpreter M3B3 ╞═╣
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞═════╡ EVMInterpreter MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                                 NaN ║
╠═╡ Cycles (-%) ╞═══╡ EVMInterpreter MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞═════╡ EVMInterpreter MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════╡ Precompiles M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════╡ Precompiles M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════╡ Precompiles M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞════════╡ Precompiles MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞══════╡ Precompiles MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞════════╡ Precompiles MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞══════════╡ Real life M3B3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞════════╡ Real life M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞══════════╡ Real life M3B3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

╔═╡ Size (-%) ╞══════════╡ Real life MzB3 ╞═╗
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Cycles (-%) ╞════════╡ Real life MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╠═╡ Ergs (-%) ╞══════════╡ Real life MzB3 ╞═╣
║ Mean                                0.000 ║
║ Best                                0.000 ║
║ Worst                               0.000 ║
║ Total                               0.000 ║
╚═══════════════════════════════════════════╝

@joonazan
Copy link
Collaborator Author

Looks like vm2 will need to be public first. Also, I have realized I have to make more changes to the VM's interface to be able to integrate into core, so I think it makes sense to postpone this a bit.

@joonazan joonazan marked this pull request as draft April 10, 2024 13:24
Copy link
Collaborator

@hedgar2017 hedgar2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joonazan sure, take your time.

hedgar2017
hedgar2017 previously approved these changes Apr 14, 2024
Base automatically changed from v1.5.0 to main May 9, 2024 15:02
@hedgar2017 hedgar2017 dismissed their stale review May 9, 2024 15:02

The base branch was changed.

Copy link
Collaborator

@hedgar2017 hedgar2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you squash your commits and force-reapply them? Unfortunately the base was changed after merging v1.5.0, and I'd like not to resolve all these conflicts manually.

@joonazan
Copy link
Collaborator Author

@hedgar2017 I just removed all your commits that were not related to vm2 and the conflicts went away. This is ok because they are in main anyway, right?

@hedgar2017
Copy link
Collaborator

@hedgar2017 I just removed all your commits that were not related to vm2 and the conflicts went away. This is ok because they are in main anyway, right?

Yes, I believe the history got broken is some way after merging v1.5.0.
Unfortunately I still can see the conflicts in this PR.

@joonazan joonazan force-pushed the jms-transient-fail branch from a24ff19 to 54e8a96 Compare May 21, 2024 15:01
@joonazan joonazan force-pushed the jms-transient-fail branch from 685c2a5 to d1fd458 Compare May 21, 2024 15:04
@hedgar2017 hedgar2017 marked this pull request as ready for review May 21, 2024 16:41
@joonazan joonazan merged commit 7190031 into main May 23, 2024
5 checks passed
@joonazan joonazan deleted the jms-transient-fail branch May 23, 2024 10:42
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.

2 participants