vulpemventures / go-elements

Go support for Liquid/Elements transactions
MIT License
27 stars 13 forks source link

utxo range proof not added #219

Closed jackstar12 closed 11 months ago

jackstar12 commented 1 year ago

Wouldn't it make sense to call AddInUtxoRangeProof if the txout ahs one here? https://github.com/vulpemventures/go-elements/blob/2c0948ca3111529d4d57c8745489896482ebab13/psetv2/updater.go#L123-L130

I forgot to call AddInUtxoRangeProof and it took me a bit to get why the range proof was disappearing from the utxo.

altafan commented 1 year ago

@jackstar12 sorry for the late reply!

We decided to stick as much as possible with the reference spec and not hide such relevant parts. I strongly encourage anyone to read the LIP and take note of the changes compared to the BIP.

Also, consider that these proofs are quite big (4+ kb each). In real scenarios, you might want somebody else to provide such info, and having an ad hoc API gives you much more flexibility.

If you have any doubt about how to use the new psetv2 APIs, you can take a look at our integration tests. You can find many examples of txs commonly broadcasted on the Liquid network.