public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Salvatore Ingala <salvatore.ingala@gmail•com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] Merkleize All The Things
Date: Mon, 1 May 2023 23:15:20 +0200	[thread overview]
Message-ID: <CAMhCMoGdZsDO2eZYMf+G36gc5=-SB0HxHXbRSPx5OaCOjo5_Dw@mail.gmail.com> (raw)
In-Reply-To: <CAMhCMoFgto3Bu5+yEoqn1Jf8fNd+EQK-t_H3TKR2=3RXe8FdcQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]

Hi all,

I apologize for a couple of oversights in my last e-mail.

The first is that m_B can't be committed as-is in the contract's
embedded data, with the current semantics of OP_COCV, which
only allows 32-byte values. A solution could be to store its
hash SHA256(m_B), instead.

(I didn't test the Scripts, so there could be other bugs − hopefully the
general idea is clear, anyway)

On Mon, 1 May 2023 at 15:11, Salvatore Ingala <salvatore.ingala@gmail•com>
wrote:

> If the internal_pubkey is a musig-aggregated key of Alice and Bob,
> the game can be settled entirely offline after the first transaction.
> Simply, Bob communicates his move to Alice, Alice reveals her move to
> Bob, and they can settle the bet. The game would be played without
> any script being executed, therefore all transactions could look like
> any other P2TR, with the only possible fingerprinting being due to the
> input amounts.
>

This is incomplete: Alice can't trust Bob by revealing her move, as
he could then cheat on-chain and play a different move.

The fix should be straightforward, after adding the requirement that the
internal pubkey of [S1] is a musig2 of both players.
After Bob reveals his move (say, Rock), Alice will only agree to continue
the game off-chain if Bob pre-signs transactions for the state [S1] (where
m_B = Paper, and m_B = Scissors) that send all the money to Alice.
This guarantees that a cheating Bob is punished.

Best,
Salvatore Ingala

[-- Attachment #2: Type: text/html, Size: 2115 bytes --]

  reply	other threads:[~2023-05-01 21:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08  9:17 Salvatore Ingala
2022-11-08 12:01 ` ZmnSCPxj
2022-11-10  9:42   ` Salvatore Ingala
2022-11-08 23:34 ` Bram Cohen
2022-11-09 12:07   ` Peter Todd
2022-11-10  7:39 ` David A. Harding
2022-11-11 21:49 ` Antoine Riard
2022-11-12 15:04   ` Salvatore Ingala
2022-11-30 19:42     ` Rijndael
2022-11-30 22:09       ` Rijndael
2022-12-01  8:47         ` Salvatore Ingala
2022-12-13  6:59           ` Billy Tetrud
2023-04-28  8:48             ` Johan Torås Halseth
2023-05-01 13:11               ` Salvatore Ingala
2023-05-01 21:15                 ` Salvatore Ingala [this message]
2023-05-04  8:34                   ` Johan Torås Halseth
2023-05-05 21:18                     ` Salvatore Ingala
2023-05-26 11:45                       ` Johan Torås Halseth
2023-05-28 10:24                         ` Salvatore Ingala
2023-05-30  7:34                           ` Johan Torås Halseth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMhCMoGdZsDO2eZYMf+G36gc5=-SB0HxHXbRSPx5OaCOjo5_Dw@mail.gmail.com' \
    --to=salvatore.ingala@gmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox