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

Cover multiple instances of the same pubkey in LNPBP-1 and 2 standards #111

Open
dr-orlovsky opened this issue Jun 19, 2021 · 0 comments
Open
Labels
[DBC] Deterministic bitcoin commitments documentation Improvements or additions to documentation
Milestone

Comments

@dr-orlovsky
Copy link
Member

After @yojoe note,

A public key Pi appears multiple times in a scriptPubKey. (Although I don’t know of any example, this seems to be possible, else we wouldn’t have to talk about a list of keys which always needs to be reduced to a set in the fist place).

The question is now, what happens when Pi is selected as Po for tweaking and carrying the commitment? Do ALL occurences of Po have to be replaced in the modified scriptPubKey script afterwards? If not, we have to remember the exact postition of Po in the ETP (extra transaction proof) as well, because the nature of the script cannot be assumed to be commutative, right?

If Po appears multiple times and is replaced everywhere in the script after tweaking, it shouldn’t matter, right? I even wonder if it could break the script if Po wasn’t replaced everywhere and could make the output undspendable?

Anyway, this seems to be a significant detail to mention in the spec, shouldn’t it?

I think we need to tweak all instances of the pubkey - since we collect only unique pubkeys this would work the best. Need to add that part to the spec

@dr-orlovsky dr-orlovsky added the documentation Improvements or additions to documentation label Jun 19, 2021
@dr-orlovsky dr-orlovsky added this to the DBC: proposals milestone Jun 19, 2021
@dr-orlovsky dr-orlovsky added the [DBC] Deterministic bitcoin commitments label Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[DBC] Deterministic bitcoin commitments documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant