In 2-out-of-3 multisig to build an escrow service, we see Alice can buy a product from Bob
Question:
In 2-out-of-3 multisig to build an escrow service, we see Alice can buy a product from Bob and, if all goes well, Alice gets the product and Bob gets paid. Otherwise a judge can adjudicate the dispute. One issue with that protocol is that the judge may demand a service fee and the participants, Alice and Bob, have no choice but to pay. In this question your goal is to design an escrow system where, ahead of time, Alice and Bob agree on the set of three judges so that during adjudication they can choose any one of the three to adjudicate. We are assuming that the three judges are honest and consistent, that is, all three will always rule the same way.
a. Show how to implement a three-judge escrow system using a single standard multiset transaction to a multiset address that Alice and Bob agree on ahead of time. Your design must ensure that even if the three judges collude, they cannot steal the funds that Alice sends to Bob. Recall that if all goes well then the parties need not involve the judges. If something goes wrong, then any one of the three judges can adjudicate. Hint: You will need to use more than 5 keys in the multiset transaction. Alice and Bob will use more than one key each.
b. Your solution from part (a) uses a standard multiset transaction, but the script must list more than five public keys. Write a script to achieve the same thing where each party is only assigned one key (only five keys total are listed in the redeem script).Hint: you’ll need to use logical operations (e.g. OP_IF, OP_OR) in a non-standard script
We will be using the bitcoin script using OP codes?