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

Add Explicit Balance Violation Test #240

Open
bhgomes opened this issue Sep 6, 2022 · 1 comment
Open

Add Explicit Balance Violation Test #240

bhgomes opened this issue Sep 6, 2022 · 1 comment
Labels
A-cryptography Area: Issues and PRs related to Cryptography A-security Area: Issues and PRs related to Security A-testing Area: Testing-related Issues and PRs P-medium Priority: Medium

Comments

@bhgomes
Copy link
Contributor

bhgomes commented Sep 6, 2022

The reason we need to do bounds checking on asset balances is to prevent overflowing balances to increase the total balance of the UTXO Set. The explicit test would be something like:

$a + b \mapsto a + b + p \mapsto (a + b + k) + (p - k)$

Such re-balance should be impossible for all $k \ne 0$.

@bhgomes bhgomes added A-security Area: Issues and PRs related to Security P-high Priority: High A-cryptography Area: Issues and PRs related to Cryptography A-testing Area: Testing-related Issues and PRs labels Sep 6, 2022
@bhgomes bhgomes added this to the v1.0.0 milestone Sep 6, 2022
@bhgomes
Copy link
Contributor Author

bhgomes commented Sep 7, 2022

This test cannot be really implemented until we can separate the proof generation phase into separate circuit compilation and witness assignment phases.

@bhgomes bhgomes added P-medium Priority: Medium and removed P-high Priority: High labels Sep 7, 2022
@bhgomes bhgomes removed this from the v1.0.0 milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cryptography Area: Issues and PRs related to Cryptography A-security Area: Issues and PRs related to Security A-testing Area: Testing-related Issues and PRs P-medium Priority: Medium
Projects
None yet
Development

No branches or pull requests

2 participants