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: simplify stacks transaction signing #268

Merged
merged 8 commits into from
Jul 1, 2024

Conversation

djordon
Copy link
Contributor

@djordon djordon commented Jun 28, 2024

Description

Closes #262. What is left is documentation on what the flow is supposed to look like, which is what #267 is for.

This PR simplifies part of the process of signing stacks transactions. The coordinator can use the code here to generate transactions that other signers can sign and combine the signatures into a final transaction. The final transaction that will (very likely) pass verification on a stacks-core node.

Changes

  1. Add functions for generating the multi-sig stacks address of the all signers participating in a PoX cycle.
  2. Add a trait for specifying what is necessary to create a stacks contract call transaction.
  3. Add traits and functions for signing a transaction.

Testing information

There are unit tests that check that the final signed StacksTransaction will pass verification. The integration tests that check validation on a stacks node will be done in #263 and #264.

Copy link
Contributor

@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice stuff! My main consideration is how we represent the public keys in the wallet type, where I think it should be a BTreeMap of the stacks variant of the public key type in this case.

signer/src/stacks/wallet.rs Outdated Show resolved Hide resolved
signer/src/stacks/wallet.rs Show resolved Hide resolved
Copy link
Collaborator

@AshtonStephens AshtonStephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@djordon djordon force-pushed the 262-simplify-stacks-transaction-signing branch from 4af714f to 5de4d6f Compare July 1, 2024 16:42
@djordon djordon merged commit 08233d9 into main Jul 1, 2024
4 checks passed
@djordon djordon deleted the 262-simplify-stacks-transaction-signing branch July 1, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Simplify stacks transaction signing
3 participants