keep-starknet-strange / shinigami

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

[feat] Implement OP_CHECKSIGADD #245

Open b-j-roberts opened 1 week ago

b-j-roberts commented 1 week ago

The last remaining opcode in the engine to be implemented is OP_CHECKSIGADD.

Description Three values are popped from the stack. The integer n is incremented by one and returned to the stack if the signature is valid for the public key and transaction. The integer n is returned to the stack unchanged if the signature is the empty vector (OP_0). In any other case, the script is invalid. This opcode is only available in tapscript.

NOTE A large part of the work for OP_CHECKSIGADD had been done as part of this PR, but was closed due to time constraints. This could be a very good start.

We will need to implement the opcode and a set of tests.

References

Jeanmichel7 commented 1 week ago

I'm interested, can I finish it?

b-j-roberts commented 1 week ago

@Jeanmichel7 Definitely, lmk if you have any questions, and good luck 🚀