Skip to content

Circuit: Fix balance violation#78

Merged
ConstanceBeguier merged 5 commits intozsa1from
fix_balance_violation
Jul 24, 2023
Merged

Circuit: Fix balance violation#78
ConstanceBeguier merged 5 commits intozsa1from
fix_balance_violation

Conversation

@ConstanceBeguier
Copy link
Collaborator

@ConstanceBeguier ConstanceBeguier commented Jul 6, 2023

To prevent balance violations, we have replaced the constraint "(v_old = 0 and split_flag = 0) or (root = anchor)"
with the constraint "(v_old = 0 and is_native_asset = 1) or (root = anchor)".
Previously, an adversary could use a zero-valued ZSA note to violate balance by setting v_old=0, v_new!=0, is_native_asset=0, split_flag=0.

Limit the version of dashmap (< 5.5) because recent dashmap versions required rust version 1.64 or newer
Limit the version of hashbrown (<0.13) because recent hashbrown versions required rust version 1.64 or newer

@ConstanceBeguier ConstanceBeguier requested a review from PaulLaux July 6, 2023 08:33
@QED-it QED-it deleted a comment from what-the-diff bot Jul 6, 2023
@ConstanceBeguier ConstanceBeguier merged commit 081513b into zsa1 Jul 24, 2023
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.

2 participants