Closed Alleysira closed 3 weeks ago
@Alleysira Thank you for your meticulous review and feedback. Your submitted issues have made SealEVM more robust!
Regarding the issues you mentioned this time, after carefully reading and testing the code, I also discovered many other boundary issues in mathematical calculations. All issues related to mathematical calculations, including the one you raised, have been fixed in this commit.
Welcome to continue following the development of SealEVM! Thanks♪(・ω・)ノ
Hello @AKACoder, I found another opcode bug in the SealEVM repository at https://github.com/SealSC/SealEVM/blob/1ee9b6d4149aa32d3d079a1b0e6dc9f71f60700c/evmInt256/evmInt256.go#L213-L216
Thanks for your time and patience!
Bug description
When executing the opcode 0x0a
EXP
, SealEVM will wait forever without outputting result.Source
Check the implementation in SealEVM at:
https://github.com/SealSC/SealEVM/blob/1ee9b6d4149aa32d3d079a1b0e6dc9f71f60700c/instructions/arithmetic.go#L176-L194
and in the function
Exp
implementation at:https://github.com/SealSC/SealEVM/blob/1ee9b6d4149aa32d3d079a1b0e6dc9f71f60700c/evmInt256/evmInt256.go#L213-L216
It seems that the execution of this line fails:
How to reproduce
Set deployed bytecode
Simply pull the latest version of the SealEVM and enter the
example
dir.Change the
var deployCode
inexample/code.go
to bytecode6ce1fd12a42ec6dc66e9702e565a6f6ed801f2f2984c5805d1b92423f24d720a60005260406000f3
Where
6ce1fd12a42ec6dc66e9702e565a6f6ed801f2f2984c5805d1b92423f24d720a60005260406000f3
are the opcodes as shown below:Result
You can see that the SealEVM stucks and return nothing .
But if I change the module in
Exp() in evmInt256.go
to another number, for example:The opcode EXP can be executed successfully.
Here is the result from
geth/evm 1.14.9-unstable-6eb42a6b-20240815
. Geth and other EVM returned0
.