-
Notifications
You must be signed in to change notification settings - Fork 228
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
Unbork Emerynet: Cleanup Auctioneers, PriceAuthorities, and QuoteNotifiers #10725
Comments
@siarhei-agoric : for reference, #9483 (comment) has a lot of notes about how to find the necessary objects to terminate the old vats. And @gibson042 probably has even more ideas. |
The auctioneers are not designed to be halted, but it is straightforward to give them a long schedule. For instance a week. The issue with this approach is that it's not possible to reset the schedule to a shorter period until that time elapses. So choosing a very long time (like a year) effectively disables that auction, since if you wanted to restart it to a shorter period, you'd have to wait for that year to elapse before the auctioneer would pay attention to a shorter period. It's possible that giving them inconsistent parameters would turn the schedule off until a new set of parameters are supplied, but I haven't tested this to be sure what parameters would have this effect. If turning the schedule off were a priority, I could run some tests and likely find a workable approach. |
Based on multiple conversations with @gibson042, @mhofman, and @Chris-Hibbert, along with some digging:
Timeline (rough estimates):
|
refs: #10725 Initial set of changes to get auctioneer governors terminated.
Emerynet has halted while processing block While the halt is unexpected, it happened for everyone, and the problematic block didn't get committed. As such we can restart the network with a new version that includes the unborking proposal and the upgrade to the final u18 code. However we'll need to hack the upgrade trigger mechanism since we can't use the normal upgrade module voting flow to cause the in-consensus upgrade. Most likely we can hard code the block number (likely verifying the current chain name and upgrade plan is rc3), and manually set the upgrade info that way. The final u18 also triggered an upgrade of the vbank module, so we likely need to somehow inject an upgrade plan to trigger all expected upgrades through the upgrade module. This emerynet specific upgrade will now also require that we update the allocation limit in xsnap-worker. This is a hard coded value at 2GB that is not saved anywhere in the snapshot, and can be raised if in consensus. It's ok to use a one off specific change since we need a specific chain software for this release anyway. |
refs: #10725 Initial set of changes to get auctioneer governors terminated.
refs: #10725 This change includes: * A single-file core-eval builder-proposal to terminate governed contracts and their governors by boardID. * A bootstrap test which: ** creates an instance of a simple governed contract via its own core-eval ** confirms that the contract accessible and operational ** kill the contract instance by boardID ** confirms that the contract is no longer operational
Board ID lookup process: v39 - auctioneer
Upgrade of v38 (governor) will be required to terminate v39: get “creatorFacet” from baggage and use it to terminate v38 - governor for v39
v665 - auctioneer:
|
What is the Problem Being Solved?
Emerynet currently suffers from severe performance degradation due to multiple generations of auctioneer vats running simultaneously. This has led to the accumulation of thousands of ephemeral observers and QuoteNotifiers (QNs). Each additional price submission triggers massive computations and delays, causing push-price operations to run for hours. The problem is aggravated by old auctioneers continually waking up on timers, creating new observer chains and further inflating the backlog of QNs. This situation makes Emerynet slow, unresponsive, and difficult to use for testing and validation.
Description of the Design
The proposed solution involves a multi-step cleanup and reset process:
(Optional) Halt Auctioneer Timers (for Gen4/Gen5)
Attempt to stop timers associated with problematic auctioneers (e.g., v661 and v665) to prevent further growth of observers/QNs. If this isn't possible via existing governance tools, move directly to terminating these vats.
Terminate Old Auctioneer Vats
Use governance actions (coreProposals) to kill all old auctioneers (including gen1 through gen5) on Emerynet. Removing these vats will cascade a cleanup of their associated observers, QNs, and references in scaledPriceAuthorities and priceFeeds over time.
Submit Prices for All Denoms
Push updated prices for every denom to trigger the release and garbage collection of QN references in scaledPriceAuthorities (sPA) and priceFeeds (pf). While each price submission will take hours initially, this step eventually clears the backlog of QNs and observers.
Create a New, Clean Auctioneer
After full cleanup, instantiate a fresh auctioneer vat that references updated priceAuthorities without legacy baggage. This ensures a stable and clean testing environment going forward.
Monitor and Verify Stability
Observe Emerynet after the cleanup to ensure:
Security Considerations
Scaling Considerations
Test Plan
Measure the current backlog and record how long price submissions take.
Upgrade Considerations
Sub-Tasks:
Investigate Timer Controls for Auctioneers
Terminate Old Auctioneer Vats
Submit Prices for All Denoms
Confirm QN and Observer Cleanup
Create a New Auctioneer
Monitor Post-Cleanup Stability
Run test pushes of prices.
The text was updated successfully, but these errors were encountered: