keep-starknet-strange / shinigami

Bitcoin Script VM in Cairo
https://shinigamibtc.dev
MIT License
57 stars 56 forks source link

Fix '0 IF 0x01 0x81 ENDIF 1 ' ✅ #159

Closed jsandinoDev closed 1 month ago

jsandinoDev commented 1 month ago
  1. Add the _is_pushingopcode function in the flow.cairo file.This function is to verify if the OP_CODE has the function of pushing the next OP_CODE in the stack. (0x01-0x4b)
  2. Add if validation in the execute function of the engine.cairo file.
  3. If the OP_CODE is a pushing op_code. The verification of is_opcode_disabled is omitted because is not required.
  4. If the OP_CODE is not a pushing op_code. Continue with the verification of the is_opcode_disabled.

(After commits of Agu 22, the results continue to be the same as in the image)

Build

Screenshot 2024-08-21 at 8 14 51 PM

Test

Screenshot 2024-08-21 at 8 15 40 PM

Closes #131

Screenshot 2024-08-21 at 8 16 29 PM
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shinigami ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 2:07am
b-j-roberts commented 1 month ago

I'd recommend reading this to get a better understanding of how OP_DATA_X and OP_PUSHDATAX work https://wiki.bitcoinsv.io/index.php/Pushdata_Opcodes The current implementation isn't handling how the opcodes are used fully correctly