Problem using multiple raw transactions with multisignature

+1 vote

We are working on a use case with a lot of parties and each two of them own a single multisig-addrress.

We use "createrawsendfrom" to create raw transactions that are signed by one party. After a while also the other party signes the transaction and the this transaction is put into the blockchain.

Unfortunately we are facing some problems here:

1. If a multisignature creates several raw transactions that are on hold (not in the blockchain yet) it seems that these transactions may use the same utxo. Then after the first of these transaction is put into the blockchain, all the other transactions get invalid (otherwise this would be double spending).

2. If we use "lock" on "createrawsendfrom" we have the problem that no further transaction can be created from the same multisig ("No unspent outputs are available. Please send a transaction, with zero amount, to this node or address first and wait for its confirmation")


My questions:

1. Is there a good solution for this problem, having more than one rawtransaction for a single multisig address in transit?

2. Does multichain still depend on the utxo concept or is it just a bitcoin leftover?



asked Oct 24, 2018 by Alexoid

1 Answer

0 votes

The answer in this case is to conduct some UTXO management / pre-planning to ensure that there are sufficient UTXOs belonging to this multisig to allow createrawsendfrom to be used with lock multiple times in parallel.  For example you can use preparelockunspentfrom or more general raw transactions (use appendrawtransaction to build up multiple outputs going to the same address).

As to the broader question, UTXOs are indeed used throughout MultiChain, but moving away from that would not make much difference. Instead you would have transaction sequence numbers and a later number would not be accepted before the first. Blockchains needs one method or the other to prevent replay attacks.

Another alternative is use Smart Filters in MultiChain 2.0 (alphas) to build your own multisignature logic, where each stage of the signature can take place on-chain. Essentially replace a 2-of-2 multisig with a 1-of-2 multisig and use inline metadata to represent and propagate the signing states and intended destinations.

answered Oct 24, 2018 by MultiChain