comit-network / comit-rs

Reference implementation of COMIT, an open protocol facilitating trustless cross-blockchain applications.
GNU General Public License v3.0
191 stars 33 forks source link

Change Bitcoin HTLC to be created from miniscript-policy #1287

Closed thomaseizinger closed 5 years ago

thomaseizinger commented 5 years ago

Working on #1218 revealed the following:

The suggested way forward is (on purpose implementation-first):

  1. Change cnd to use PublicKeys instead of PubKeyHashes for the Bitcoin-identity. This requires changes on the messaging level as-well as some internal datatype changes.
  2. Finish the PoC in https://github.com/comit-network/comit-rs/tree/miniscript to compile the HTLC-hex from the policy. The problem is that we cannot (yet) re-construct the miniscript from the compiled hex and i.e. cannot use our own template. According to rust-miniscript, the mapping between miniscript and compiled script is static, hence we could embed the miniscript into the RFC instead of the hex code and roll with that.
  3. Change the Bitcoin Contract RFC to:
    • state the use of miniscript
    • include the new hex code
  4. Change the Bitcoin Ledger RFC to:
    • describe the use of public keys as identities instead of pubkey-hashes

When grooming this ticket and the team agrees to move forward with this:

thomaseizinger commented 5 years ago

Closed because it was only for gathering information for grooming.