fvictorio / evm-puzzles

A collection of EVM puzzles
798 stars 157 forks source link

invalid reverts in puzzle 10 #4

Open charles-cooper opened 2 years ago

charles-cooper commented 2 years ago

In https://github.com/fvictorio/evm-puzzles/blob/c98de5c51062648680cc55d6dac84bc6792b40dc/puzzles/puzzle_10.json#L2, there are several REVERT instructions, but since there aren't enough items on the stack, they don't actually revert, I think they trigger an exceptional halting state (same as 0xFE INVALID). For clarity, maybe these instructions should be changed to 0xFE - or start the code with MSIZE MSIZE so that the REVERT opcodes will have enough stack items to consume!

fvictorio commented 2 years ago

Oops, you're right, I should've used 0xFE. I'll change that, thank you!