Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Add core support for protocol level MultiSig #2984

Closed
wants to merge 1 commit into from

Conversation

vincenthz
Copy link
Member

Description

  • Extend AddressSpendingData to support having multiple parties computing
    an address using the hash of the participants' public key.
  • Extend TxWitness to take a list of MultisigWitness which are either the public key
    hash if not participating or as a signatory the public key and it's associated signature.

The multisig signature is valid if the number of signatures is equal or above
to the expected threshold. if any present signature is also invalid, the
overall multisig signature is considered invalid too even if the expected
number of valid signatures is met.

While the order of participants is not enforced, it is necessary to specify the
same order between the witnesses and how the address has been generated, since
the order is required to compute the expected address.

Linked issue

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • [~] If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.

Testing checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

Screenshots (if available)

* Extend AddressSpendingData to support having multiple parties computing
  an address using the hash of the participants' public key.
* Extend TxWitness to take a list of MultisigWitness which are either the public key
  hash if not participating or as a signatory the public key and it's associated signature.

The multisig signature is valid if the number of signatures is equal or above
to the expected threshold. if any present signature is also invalid, the
overall multisig signature is considered invalid too even if the expected
number of valid signatures is met.

While the order of participants is not enforced, it is necessary to specify the
same order between the witnesses and how the address has been generated, since
the order is required to compute the expected address.
@erikd
Copy link
Member

erikd commented May 24, 2018

The code here looks fine, but shouldn't there be tests as well?

@vincenthz
Copy link
Member Author

@erikd yes it should ideally, but I couldn't find any existing tests for AddressSpendingData/Witnessing

@erikd
Copy link
Member

erikd commented May 24, 2018

None of this code has enough tests, and I'd really like to avoid adding still more code without tests. As it is, my team is having to write tests in order to do some of the refactorings this code so badly needs.

@jcmincke
Copy link
Contributor

jcmincke commented Sep 6, 2018

Closed because this PR is just too old.
Does not seem relevant at the moment

@jcmincke jcmincke closed this Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants