Closed 0xsaya closed 4 months ago
Need to know the impact of the "wastage." Still, wouldn't block mainnet for this.
Can you demonstrate the impact of the waste?
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.
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