LNP-BP / nodes

Complete LNP/BP protocol daemons suite
MIT License
18 stars 8 forks source link

Broadcasted witness tx has different txId than the one specified as anchor in consignment. #16

Closed adambor closed 2 years ago

adambor commented 2 years ago

Hello, I have an issue when following the demo-rgb.sh.

When I finish creating the consignment, with the transfer finalized by executing: rgb-cli -n testnet transfer finalize --endseal ${TXOB} ${PSBT} ${CONSIGNMENT} And then I sign and finalize the transaction:

btc-hot sign ${PSBT} ${DIR}/testnet
btc-cold finalize --publish testnet ${PSBT}

The resulting txId is different than the one specified in consignment, so the consignment never validates. Any idea why that might be the case?

Tx is broadcasted and mined on testnet here: https://blockstream.info/testnet/tx/6796b0ef9cd3128c43159081dd6bf11ff1afe474bb6bf3e96aa33b038f5af6b0 + attaching the consignment, transfer, and psbt in a zip file. rgb-tx.zip

Looking forward to your reply!

dr-orlovsky commented 2 years ago

Hi! Thank you for reporting. Can you please move the issue to https://github.com/RGB-WG/rgb-core/ where it should belong to?

Next, the answer is simple: indeed the commitment modifies txid, thus if you'd like to store assets in the same witness transaction (which contains commitment) you need not to provide txid and a special form of single-use-seal is used (called 'witness-based', referencing only the output number)

dr-orlovsky commented 2 years ago

Must be closed with https://github.com/LNP-BP/client_side_validation/pull/103