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

[MultiSig] Implement 2 steps (resolveMultisigIndices -> sign) #48

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

peak3d
Copy link

@peak3d peak3d commented Mar 10, 2023

Multisig / SigIndices

This PR changes the logic from automatically traversing through msig aliases on sign() in favour of a 2 step logic

Workflow of creating a MultiSig TX

  • buildUnsignedTx with providing MultiSigAlias in "from"
  • resolveMultisigAlias with the MultisigAliasSet class which:
    -- flattens the multisig alias /which could be nested from theory) into a single array of addresses
    -- if no addresses are provided, wildcard sigIndices are generated
    -- replaces the sigIndices for all inputs / auths to the new flattened list
  • create a MultiSigKeychain with all signatures and sign the transaction
  • issue TX

Caveats

In case no addresses are provided in resolveMultisigAlias step (signavault mode), the sigIndices all countain a magic number and no sourceAddress (because it was not known beforehand who signs)
To finally create the correct signatures, the original base outputowners off all input UTXOs have to be either saved or pulled from node using UTXOId to be able to re-run the resolve step and build the signatures in right order.
This is not yet implemented

@peak3d peak3d force-pushed the peak3d/msig branch 2 times, most recently from 312dd56 to 74ff020 Compare March 11, 2023 15:45
@c4t-ag c4t-ag requested a review from DerTiedemann March 11, 2023 16:35
@peak3d peak3d force-pushed the peak3d/msig branch 3 times, most recently from c3851dc to c99217a Compare March 12, 2023 08:48
Copy link

@DerTiedemann DerTiedemann left a comment

Choose a reason for hiding this comment

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

LGTM

@peak3d peak3d merged commit 4fbd2e4 into dev Mar 13, 2023
@peak3d peak3d deleted the peak3d/msig branch March 13, 2023 10:48
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.

2 participants