mintlayer / mintlayer-core

Mintlayer Core: The central repository housing the essential components to operate a Mintlayer node. It encompasses the node and wallet functionalities necessary for seamless operation, alongside an additional API server designed to facilitate applications.
https://www.mintlayer.org
MIT License
43 stars 25 forks source link

Translate `Destination` into script #1780

Open iljakuklic opened 3 months ago

iljakuklic commented 3 months ago

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:

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.