-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pset: add optional asset blinding factor to input and output #1329
pset: add optional asset blinding factor to input and output #1329
Conversation
17d354e pset: test input and output asset blinding factors (Leonardo Comandini) db805b3 pset: output: add asset blinding factor (Leonardo Comandini) d1dfed4 pset: input: add asset blinding factor (Leonardo Comandini) 04ab514 pset: implement (de)serialize for AssetBlindingFactor (Leonardo Comandini) Pull request description: Change corresponding to ElementsProject/elements#1329 ACKs for top commit: apoelstra: ACK 17d354e Tree-SHA512: 14c8d9d096c6412bd15fac1f597a3fbc02a43bee64e3edc8209d487b805671b6cec1fa752337e817324170178a3cf3151bbcbe98dd2646f1e92e3018cd5dceec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK bc3870a with minor comments
bc3870a
to
3908da0
Compare
3908da0
to
ee08228
Compare
Hi @delta1 , |
hey @LeoComandini, I was hoping to get another set of eyes on this. @apoelstra could you please review? |
Does anyone remember where the (very long past discussion was where I was opposed to putting raw secret data into PSETs? I think this should have an ELIP number. |
Pinged you in that chat You also reviewed and merged the same change in rust-elements, see ElementsProject/rust-elements#201 |
I had assumed that PRs to rust-elements from Blockstream employees which add PSET fields with no description or justification were implementing missing functionality. Not that they were controversial out-of-spec extensions. I'll review more carefully in the future. |
@apoelstra please share as I could not find it yet. Some quick candidates may be: |
@jsarenik I found an internal discussion about it. I'm not sure when I will have time to review it. Meanwhile probably the best way to move forward @LeoComandini is to open a ELIPs PR to add these fields so that we can move discussion into a public arena. |
@apoelstra , opened ELIP PR ElementsProject/ELIPs#18 |
Merged the ELIP. Since this is LiquiDEX-specific and a proprietary extension, I think we should close this PR and instead only implement it in rust-elements/elements-miniscript. |
Closing since this is now in rust-elements ElementsProject/rust-elements#207 @LeoComandini if you do need this in Elements then let's revisit this discussion |
In some protocols where blinding is done by different parties,
the asset surjection proof for some output might be created by:
corresponding to the output asset commitment
This, in general, is the case of LiquiDEX v1 [1], e.g.
x
of assetA
fory
of assetB
x
of assetA
with
y
of assetB
.for the output, sets the corresponding asset and value
commitment. Sets the nonce commitment. Computes and sets
the rangeproof.
and output (combined)
above:
B
and feesA
,B
and feesfrom the last one for which he uses the new inputs
contribution and the scalar offset from the proposal to
balance the tx.
A
output, note thatin general the input asset blinding factor is needed.
B
output, includingthe one from Alice, which requires the output blinding
factor. Note that Alice could not have created the
surjection proof since she did not know any
B
inputwhen she created the tx.
Input and output asset blinding factors are the last fields
needed to convert LiquiDEX v1 proposals in PSETs (and viceversa).
[1] https://leocomandini.github.io/2022/10/27/liquidexv1.html