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 participant wallets send protection #466

Open
r4mmer opened this issue Aug 7, 2024 · 0 comments
Open

MultiSig participant wallets send protection #466

r4mmer opened this issue Aug 7, 2024 · 0 comments

Comments

@r4mmer
Copy link
Member

r4mmer commented Aug 7, 2024

Issue description

There is a common mistake some devs make when configuring the MultiSig wallet, they either send the incorrect pubkey for the other participants or start the incorrect wallet as multisig.
We should implement some protections on the headless against these mistakes so the user is more informed on why the error is happening.

Solutions

Starting a MultiSig wallet

We can derive the multisig pubkey and check that the seed/privkey of the started wallet is part of the configured multisig.
So the user will receive an error when starting an incorrect wallet.

Protection on /wallet/p2sh/tx-proposal/get-my-signatures

This API receives a transaction (hex encoded) and signs all inputs from the wallet.
We should return an error if no inputs from the wallet are found, meaning the transaction has no impact on the wallet.

Protection on /wallet/p2sh/tx-proposal/sign and /wallet/p2sh/tx-proposal/sign-and-push

These APIs receive the transaction and signatures from the participants and builds the complete transaction.
We should check that the signatures are from the participants of the current multisig wallet, meaning that if the other participants use an incorrect wallet to sign, we can detect it and return an error.

We can also add another protection against sending signatures from the same wallet twice, currently we overwrite the signatures but checking that signatures from the same wallet were sent twice makes it less likely for participants to make mistakes on the number of signatures sent.

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

No branches or pull requests

1 participant