-
Notifications
You must be signed in to change notification settings - Fork 133
universe: fix group key proof/leaf comparison #1788
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
Conversation
Interestingly the supply_commit_ignore_asset itest seems to fail due to this "fix." Let me take another look. |
Pull Request Test Coverage Report for Build 17604098062Details
💛 - Coveralls |
We want to return an error if the two are unequal, not equal, and the comparison requires a deep equality check.
08a64f6
to
7d913b1
Compare
Looks like the itest passes if the comparison is changed to a deep equality check, which seems to make sense, as there seems to be no reason that the Asset in the issuanceProof should be the same as that indirectly pointed to via GroupKey in the issuanceLeaf. |
Well spotted, thanks! I think this is the diff we need:
There are likely unset fields in @jtobin shall i just add a commit to #1784 and we close this PR? Then I'll have this change in WIP PR #1777 |
Yeah makes sense, and I think a direct comparison is superior. Is there a need to compare the GroupKeyVersion as well? (But otherwise, go for it. 👍) |
I don’t think so. Here we only need to ensure the issuance event fields consistently refer to the same asset group, and checking equality of the asset group’s public key is sufficient for that. I've added the patch to #1784 Thanks for looking into this! |
Found by chance while reviewing #1784 -- we want to return an error if the two are unequal, not equal.