Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Implement P2SH tests / logic #243

Open
b-j-roberts opened this issue Oct 4, 2024 · 6 comments
Open

[feat] Implement P2SH tests / logic #243

b-j-roberts opened this issue Oct 4, 2024 · 6 comments
Assignees
Labels

Comments

@b-j-roberts
Copy link
Contributor

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
Copy link
Contributor Author

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

@varun-doshi
Copy link
Contributor

Yup, I can take this up

@b-j-roberts
Copy link
Contributor Author

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
Copy link
Contributor

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

@varun-doshi varun-doshi mentioned this issue Oct 21, 2024
3 tasks
b-j-roberts added a commit that referenced this issue Oct 29, 2024
<!-- enter the gh issue after hash -->

- [x] issue
#243
- [x] follows contribution
[guide](https://github.com/keep-starknet-strange/shinigami/blob/main/CONTRIBUTING.md)
- [x] code change includes tests

<!-- PR description below -->

Run the tests using the following command:
```
scarb test -vv -p shinigami_tests -f test_p2sh_transaction_1
```
for 1...5

Test 4 fails to deserialize. Figuring this out

---------

Co-authored-by: Brandon Roberts <[email protected]>
@b-j-roberts
Copy link
Contributor Author

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

@varun-doshi
Copy link
Contributor

I'll get on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants