-
Notifications
You must be signed in to change notification settings - Fork 207
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
Zoe drop empty payments from escrow purses #8686
Comments
@erights and I discussed this. The relevant recoverSet is for the IST escrow purse, so the issuer is local, and the query to find the balance of each payment is local. Zoe can incrementally walk through the recovery set, looking for empty payments. Each time it does so, it can delete up to 10 (or some other number) payments. If it finds fewer than 10, it can remember that it's done. The recoverySet is a SetStore, which can be iterated using We're planning to filter out empty payments when constructing the return value for |
Better IIRC
|
No sorry, that's not correct as well. At least we can hold onto the iterator in the heap and keep pulling on it until it becomes invalid. |
Since we're trying to transition to a world in which payments with empty amounts are not in any recovery sets, I'd prefer this emptying logic be encapsulated within ERTP if possible. Or as much as possible. |
#9013 ensures that empty payments aren't added to recovery sets going forward. I think these payments are held within the IST mint inside Zoe's vat (vat9). There shouldn't be any external references to them, so deleting them all shouldn't cascade to the kernel or other vats. It's theoretically possible that other vats are holding some uncollectable empty payments, but the cardinality is probably very low. I don't think we need general support in ERTP for cautious deletion. ERTP gives the owner of a purse the ability ( I'm going to investigate in A3P whether I can count and deposit all the empty payments, and see if the cascading effects (or lack thereof) are visible in the slog file and sqlite db. |
What is the Problem Being Solved?
According to #8404, Zoe is holding onto empty Payments in recovery sets.
Description of the Design
The only purses that Zoe has are the escrow Purses. My presumption, if there are empty payments in the recovery set, is that those are mostly payouts that clients didn't bother to collect because they are empty. #8498 has a fix that will keep us from adding more empty payments to the recoverySets, but the existing ones will never go away unless they are purged from the EscrowPurses.
We can do that with one-time code, added in an upgrade (and removed later) that can iterate the recoverySets and drop empty payments.
Security Considerations
Be careful when dealing with Zoe's escrow purses.
Scaling Considerations
The scaling issues are resolved by the fix mentioned above the keeps the problem from getting worse. We should still clean up dead objects when reasonable.
Test Plan
Verify that the empty payments are removed. Doesn't have to be done in an actual chain or a docker test.
Upgrade Considerations
It's all about cleaning up dead objects via upgrade.
The text was updated successfully, but these errors were encountered: