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

No need to create a credits with microcredits =0 #2445

Closed
0xsaya opened this issue Apr 30, 2024 · 2 comments
Closed

No need to create a credits with microcredits =0 #2445

0xsaya opened this issue Apr 30, 2024 · 2 comments
Labels
does not block mainnet For when we make decisions that this will not block mainnet.

Comments

@0xsaya
Copy link

0xsaya commented Apr 30, 2024

When a user transfers all of their microcredits to the "to" address, in addition to creating a credits record for the "to" address, a credits record with microcredits set to 0 is also created for the "from" address. Generating a large number of credits records with microcredits set to 0 can cause wastage of network resources.

https://github.com/AleoHQ/snarkVM/blob/1485bdd42a6156e09dc09066b262302df9252bf0/synthesizer/program/src/resources/credits.aleo#L792

@damons damons added the does not block mainnet For when we make decisions that this will not block mainnet. label Jun 11, 2024
@damons
Copy link

damons commented Jun 11, 2024

Need to know the impact of the "wastage." Still, wouldn't block mainnet for this.

Can you demonstrate the impact of the waste?

@raychu86
Copy link
Contributor

raychu86 commented Jul 1, 2024

These 0 balance records are necessary to preserve privacy. A transfer_private call should always have the same number of inputs and outputs in order to reveal as little information about the amounts/data as possible, even if a record is considered "wasted" due to a balance of 0.

I am closing this due because this is a desired property of our system.

@raychu86 raychu86 closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
does not block mainnet For when we make decisions that this will not block mainnet.
Projects
None yet
Development

No branches or pull requests

3 participants