-
Notifications
You must be signed in to change notification settings - Fork 215
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
vat-zoe is holding a lot of 0.0 IST Payments in the recovery set #8404
Comments
It's not obvious to me how we can release these Payments. The only Purses that Zoe holds onto are the escrow Purses, and those (even the one for If this is an artifact of people never depositing zero-value payouts from contracts, we're going to have a gradual accumulation of them from many issuers. I keep trying to resolve this by having a single global instance of a zero value payment for every issuer. It wouldn't need to be added to the recovery set, and we'd have to be careful to not burn it, either when deposited or explicitly burned. Is there a reason that won't work? As long as we never burn it, nobody can learn anything from it about payments held by others. |
Are you suggesting that users would have access to this payment, and therefore be able to ask that it be deposited or burned, but that doing so does not use it up? This would be a surprising irregularity. |
Yeah, that's what I'm suggesting. I don't know if it can be made to work, but having unique objects for common values (like 0 or 1) is a common way to prevent the need to GC objects with extremely high cardinality. How about if every burned or deposited payment turned into the global zero for that issuer? (I'm brainstorming here). I think we could do that, since all the user has is a key to a weakMap we control. As long as they hold onto it, we have to keep an entry, but the value could be the shared canonical zero. |
For objects like amounts that represent immutable values, yes. But payments have an inherently mutable lifecycle, where the only mutation event is when it gets used up.
The zero amount associated with the payment could be shared. But each payment itself still needs its own unique identity and lifecycle. |
RecoverySets in vat-zoe are probably limited to the escrowPurses, which can't use I suppose we could add code to Zoe to (incrementally?) iterate the escrowPurses' recoverSets and remove zero-value payments from them. |
While investigating #8401, I noticed that v9-zoe also has 1,718 zero-balance IST
Payment
objects outstanding, kept alive by the recovery set. It looks like they appear in apayouts.Fee
property, in case that helps track them down.I vaguely remember us investigating this a while ago, and concluding that something about the wallet (perhaps the front end?) didn't bother to claim/deposit empty Payments. From an economic point of view, this makes sense (why waste transaction fees on an empty box), but to save storage space, we should find a way to deposit or burn these Payments. They currently consume 10 vatstore rows each (plus 10 IAVL rows, since vatstore lives in kvStore, and kvStore is mirrored into IAVL), and I think this amount grows over time. I don't yet know how they got here, so I can't estimate how fast we're accumulating them.
Here's an example, v9-zoe
o+d11/981
:The third row (
v9.vs.vc.6.r000..
) is thepaymentLedger
table entry, mapping this Payment object to a balance of0n
uIST. The next-to-last line (v9.vs.vom.o+D31/7744
is azoeSeatAdmin
record, which points to this Payment instate.payouts.Fee
.cc @Chris-Hibbert @erights
The text was updated successfully, but these errors were encountered: