elements icon indicating copy to clipboard operation
elements copied to clipboard

Add a failing test case for reissuance from an unblinded output (#259)

Open shesek opened this issue 2 years ago • 3 comments

A failing test case for #259.

@instagibbs mentioned that it would be good to have a test for this, hopefully this might nudge someone to give this issue some more thought :-)

(To give some context, I ran into this while experimenting with 'scripted assets', where the reissuance token is under an 'anyone can spend if you follow the rules' covenant rather than managed by an issuing entity. It seems that not blinding the token makes more sense for this use-case?)

shesek avatar Jun 12 '22 00:06 shesek

To the best of my knowledge, this is not possible to do. The workaround for my use-case was to use blinding, but fix the blinding factors and assert that the blinded asset is some fixed asset. There is more nuance to this as the input and output confidential assets cannot be the same according to elements consensus rules. So, it required oscillating between two fixed confidential assets with initially decided blinding factors.

If something like this is of interest, I can elaborate more.

sanket1729 avatar Aug 10 '22 10:08 sanket1729

It may be slightly related, but I can't make a (blinded) re-issuance in the same tx where I am issuing a control asset.

Also this useful in covenant scripts :)

https://github.com/ElementsProject/elements/issues/1103

tiero avatar Aug 18 '22 15:08 tiero

@tiero my understanding is that your other issue is caused by the blindrawtransaction RPC doing dumb stuff and not having enough flexibility. The PSET also has these problems :) but with PSET we're actively developing and have the ability to basically add arbitrary extra fields to handle new requirements. So that one I hope we can address just by making PSET more powerful.

The problem in this issue unfortunately seems to be caused by bad consensus logic, and there's nothing we can do about that.

apoelstra avatar Aug 19 '22 19:08 apoelstra