keep-starknet-strange / shinigami

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

[feat] Implement P2SH tests / logic #243

Open b-j-roberts opened 1 month ago

b-j-roberts commented 1 month ago

Bitcoin has many different transaction types, one of the more popular being P2SH.

In order to support these, we will need to make sure all edge cases and some mainnet P2SH transactions can successfully be validated by Shinigami.

Since Shinigami's design is heavily inspired by btcd, I recommend looking through all pay-to-script hash logic there and replicating it inside Shinigami's engine. Also, the learnmeabitcoin link can be super helpful in understanding Bitcoin P2SH transactions in depth.

Then, using the learnmeabitcoin P2SH examples and existing Shinigami transaction tests, create a set of tests to ensure all P2SH transactions run properly.

Resources

b-j-roberts commented 1 month ago

@varun-doshi Here is the issue, please comment here

varun-doshi commented 1 month ago

Yup, I can take this up

b-j-roberts commented 1 month ago

Hey @varun-doshi , any updates on this issue? Btw bip16 flags and support were added in this PR, but we will still need the test cases from learnmeabitcoin

varun-doshi commented 1 month ago

Hey @varun-doshi , any updates on this issue? Btw bip16 flags and support were added in this PR, but we will still need the test cases from learnmeabitcoin

In progress Should have an update soon

b-j-roberts commented 4 weeks ago

If we can get this last test passing, this issue will be complete ! Thanks for the efforts so far.

varun-doshi commented 4 weeks ago

I'll get on that