mintlayer-core icon indicating copy to clipboard operation
mintlayer-core copied to clipboard

Translate `Destination` into script

Open iljakuklic opened this issue 1 year ago • 0 comments

The Destination type is now included directly in the script. It could be broken down into its constituent parts during translation and represented in script explicitly:

  • The Signature script primitive to just take a pubkey / signature pair, verifying just one signature, rather than a destination.
  • The multisig destination is represented using the Threshold construct

This is slightly more versatile and unifies code paths between various ways of representing multisigs. Also more suitable to place on chain with a canonical way of encoding mutisig rather than having a choice between a threshold of signle sig destinations or a destination with a multisig in it.

There is also currently duplication in witness lookup by the signature verification function and the witness included in the script. This awkwardness would be resolved by having a canonical way of doing signature checks.

iljakuklic avatar Jun 15 '24 21:06 iljakuklic