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

Make Pedersen commitments commit to Contract id #181

Closed
dr-orlovsky opened this issue Oct 21, 2023 · 1 comment
Closed

Make Pedersen commitments commit to Contract id #181

dr-orlovsky opened this issue Oct 21, 2023 · 1 comment
Assignees
Labels
*consensus* Issues affecting distributed concensus enhancement New feature or request *security* Issues affecting safety/security (include undefined behaviours)
Milestone

Comments

@dr-orlovsky
Copy link
Member

secp256k1-zkp API assumes that Pedersen commitments commits not just to value and blinding factor, but also to some asset or contract id, which is a 32-byte hash. Right now for that purpose we just use fixed value which is a hash of uncompressed generator point G, but it makes much more sense to use Contract Id, which will in future allow better cross-contract interaction and batch verification.

From my understanding this change should not break backward compatibility since today none of contracts can have more than one asset. Shifting the "asset id" from one value (constant) to another (contract id) must still fulfill the sum(inputs) = sum(outputs) requirement of Pedersen commitments due to homomorphic properties.

@dr-orlovsky dr-orlovsky added enhancement New feature or request *consensus* Issues affecting distributed concensus *security* Issues affecting safety/security (include undefined behaviours) labels Oct 21, 2023
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Oct 21, 2023
@dr-orlovsky dr-orlovsky self-assigned this Oct 21, 2023
@dr-orlovsky
Copy link
Member Author

Closed in #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*consensus* Issues affecting distributed concensus enhancement New feature or request *security* Issues affecting safety/security (include undefined behaviours)
Projects
No open projects
Development

No branches or pull requests

1 participant