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] P2PK transaction support #183

Closed
b-j-roberts opened this issue Aug 28, 2024 · 8 comments · Fixed by #209
Closed

[feat] P2PK transaction support #183

b-j-roberts opened this issue Aug 28, 2024 · 8 comments · Fixed by #209
Assignees
Labels
enhancement New feature or request

Comments

@b-j-roberts
Copy link
Contributor

Currently, all the opcodes for P2PK are implemented. To ensure we support all P2PK transactions/formats, we will need to create a set of tests for these transaction types and ensure all the logic and edge cases are handled properly. Also, including a P2PK transaction from mainnet as a test would be ideal.

References

learn P2PK & examples
example crypto tests

@b-j-roberts b-j-roberts added the enhancement New feature or request label Aug 28, 2024
@b-j-roberts
Copy link
Contributor Author

@ptisserand Thank you for looking into this!

@ptisserand
Copy link
Contributor

@b-j-roberts could you please assign to me ?

@mubarak23
Copy link
Contributor

@b-j-roberts let work on this since it is related to my previous issue

@ScottyDavies
Copy link

@b-j-roberts can I please be assigned this task?

@bloomingpeach
Copy link
Contributor

Hi seems @ptisserand is quite busy working on other projects, could I have a chance to work on this @b-j-roberts if it's okay. Thanks!

@b-j-roberts
Copy link
Contributor Author

@bloomingpeach Sure, feel free to take a look. Thank you!

Some changes have been made since creating this issue, I'd recommend looking at this P2PK test for direction. Feel free to let me know if it isn't fully clear.

fn test_validate_transaction() {

I'd recommend creating test cases from all the transactions mentioned in the learnmebitcoin article and a couple other random ones from mainnet. ( if / when you have time )

@bloomingpeach
Copy link
Contributor

Hi @b-j-roberts where could i learn more about the utxo_hints(https://github.com/keep-starknet-strange/shinigami/blob/6496bc124167658168f9e2835b58534967240ff3/src/tests/test_transactions.cairo#L80C5-L87C39), I don't quite see the term anywhere.

@b-j-roberts
Copy link
Contributor Author

Hi @b-j-roberts where could i learn more about the utxo_hints(https://github.com/keep-starknet-strange/shinigami/blob/6496bc124167658168f9e2835b58534967240ff3/src/tests/test_transactions.cairo#L80C5-L87C39), I don't quite see the term anywhere.

So the utxo_hint term is just a term I coined, so probably wont be info anywhere. But essentially, the utxo_hints contain all the old valid transaction utxos that will be used to process that transaction.
So for the example in the linked test, you can see the transaction has one input.
image

That input corresponds to an old output utxo from transaction 0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9.

So if you look at output 0 from that transaction that will represent the utxo_hint used to process the transaction.
image

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants