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

post-audit circuit fixes part 2 #2925

Merged
merged 16 commits into from
Aug 14, 2023
Merged

post-audit circuit fixes part 2 #2925

merged 16 commits into from
Aug 14, 2023

Conversation

redshiftzero
Copy link
Member

Followup fixes to the circuits from the ZKS audit

Note that two of the issues found in the ZKS audit in the fixed-point multiplication and addition were fixed already as part of #2911

@redshiftzero redshiftzero temporarily deployed to smoke-test August 14, 2023 15:05 — with GitHub Actions Inactive
| Undelegate claim | 14,776 | 722ms
| Swap | 25,700 | 1.21s
| SwapClaim | 37,061 | 1.83s
| Nullifier derivation | 394 | 59ms
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a high level, why did these circuit costs change?

  • Spend: Slight increase
    • Due to adding missing constraints around the handling of the IVK
  • Output: Significant decrease
    • Due to optimization of the balance commitment calculation
  • Delegator vote: Slight increase
    • Due to adding missing constraints around the handling of the IVK (same issue as spend)
  • Undelegate claim: Significant decrease
    • Due both to optimization of the balance commitment calculation and AmountVar division
  • Swap: Significant decrease
    • Due to optimization of the balance commitment calculation
  • Swap claim: Slight decrease
    • Due to optimization of the U128x128Var computations used in the pro rata batch output calculation

@redshiftzero redshiftzero merged commit c6ef945 into main Aug 14, 2023
@redshiftzero redshiftzero deleted the audit-fixes-circuits-2 branch August 14, 2023 17:00
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.

1 participant