Skip to content
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

[rpc]blindrawtransaction accepts more commitments #674

Merged
merged 2 commits into from
Jul 23, 2019

Conversation

AkioNak
Copy link
Contributor

@AkioNak AkioNak commented Jul 8, 2019

In #510 / #550 a requirement that the blinding commitments were equal in amount to the inputs was introduced. This requirement is correct for the final case, but not for partial transactions (e.g. where party 1 blinds their inputs before even handing the transaction over to party 2 to add theirs). In order to hide party 1's input amounts from party 2, blindrawtransaction must allow >= the inputs, since the commitments are shared beforehand (if not, the blinding fails; this may need further investigating).

This PR restores the functionality to allow blinding commitments more than or equal to the amount of inputs, which makes the confidential assets demo https://github.com/ElementsProject/confidential-assets-demo functional again.

@instagibbs
Copy link
Collaborator

If we re-give this ability it should be documented in the RPCs that use it. It was hidden functionality IIRC.

@kallewoof
Copy link
Contributor

@instagibbs Without this, people have to provide placeholder inputs before they can start blinding stuff, and people have to know which entries to replace. How is that better?

@instagibbs
Copy link
Collaborator

instagibbs commented Jul 9, 2019 via email

@instagibbs
Copy link
Collaborator

e.g., rawblindrawtransaction

@kallewoof
Copy link
Contributor

Oh, I misunderstood. Sorry about that. You are saying the rawblindtransaction RPC docs need to be updated?

@instagibbs
Copy link
Collaborator

Actually this is used in blindrawtransaction, currently text says

"An array of input asset generators. If provided, this list must be empty, or match the final input commitment list, including ordering, to make a valid surjection proof. This list does not include generators for issuances, as these assets are inherently unblinded."

I suppose this is technically correct but might want to make it even more explicit that this "final list" can include inputs not given in hexstring.

@instagibbs instagibbs merged commit d584b65 into ElementsProject:master Jul 23, 2019
instagibbs added a commit that referenced this pull request Jul 23, 2019
d584b65 [test]decrese num of inputs on partial blind test (Akio Nakamura)
254b166 [rpc]blindrawtransaction accepts more commitments (Akio Nakamura)

Pull request description:

  In #510 / #550 a requirement that the blinding commitments were equal in amount to the inputs was introduced. This requirement is correct for the final case, but not for partial transactions (e.g. where party 1 blinds their inputs before even handing the transaction over to party 2 to add theirs). In order to hide party 1's input amounts from party 2, blindrawtransaction must allow >= the inputs, since the commitments are shared beforehand (if not, the blinding fails; this may need further investigating).

  This PR restores the functionality to allow blinding commitments more than or equal to the amount of inputs, which makes the confidential assets demo https://github.com/ElementsProject/confidential-assets-demo functional again.

Tree-SHA512: 11c7e1c648aea26be2f4cb47606cd8e9b40d9e0d736a7eeb1989d6fad10f8f06528fd90766cb95e304c9b2c371278b20d7ef61099cb8b6e18b281a260e5de92d
@instagibbs
Copy link
Collaborator

I'll touch up the help myself, ACK d584b65

@AkioNak
Copy link
Contributor Author

AkioNak commented Jul 24, 2019

@instagibbs Oh, I'm sorry to bother you.

@instagibbs
Copy link
Collaborator

instagibbs commented Jul 24, 2019 via email

@AkioNak AkioNak deleted the blindrawtransaction branch July 28, 2019 05:52
apoelstra added a commit to apoelstra/elements that referenced this pull request Nov 3, 2020
apoelstra added a commit to apoelstra/elements that referenced this pull request Nov 9, 2020
apoelstra added a commit to apoelstra/elements that referenced this pull request Nov 10, 2020
gwillen pushed a commit that referenced this pull request Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants