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

types: Fix PolicyTypeUnlockConditions validation #176

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

lukechampine
Copy link
Member

@lukechampine lukechampine commented Jul 3, 2024

The old implementation was broken, as evidenced by the test cases I added. Specifically, we were implementing this policy in terms of PolicyThreshold, but PolicyThreshold requires you to mask any unused public keys with PolicyOpaque, which PolicyTypeUnlockConditions can't do. We also now handle algorithms other than SpecifierEd25519 correctly. Overall, this brings validation into agreement with consensus.validateSignatures. We can't match its behavior exactly (because v1 transactions contain a list signatures that target specific inputs, while v2 transaction inputs carry their signatures with them), but that's fine; we just need to ensure that any UnlockConditions that were satisfiable in v1 are also satisfiable in v2.

@ChrisSchinnerl ChrisSchinnerl merged commit db1b4ea into master Jul 9, 2024
9 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the uc-algorithm branch July 9, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants