Re-read the market registry so a delist takes effect - #75
Open
Enochthedev wants to merge 1 commit into
Open
Conversation
The keeper read the registry once, in main(), so listing or delisting a market was a transaction plus a container restart. On Sepolia the delist of a market burning 0.0475 ETH/day did not take for four minutes. Adds a second, slower ticker (KEEPER_REGISTRY_REFRESH_INTERVAL, 1m) that re-reads the registry and applies the diff. Source caches by address, so a refresh does not re-do LoadMarket's reads or reset the runtime state on a Market that has not changed. A delisted market with an unsettled round retires rather than being dropped: it stops opening rounds and keeps settling until its last one is terminal. Delisting does not pause a market, so dropping it would strand the stakes in it. A failed registry read keeps the current set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes GHO-56.
The keeper read the registry once at boot, so listing or delisting a market needed a restart. On Sepolia the delist of a market burning 0.0475 ETH/day against a 0.04 ETH wallet did not take for four minutes.
KEEPER_REGISTRY_REFRESH_INTERVAL(default1m), separate from the 10s round loop; both in one goroutine, so no lock.keeper.Sourcecaches by address — a refresh does not re-doLoadMarket's five reads plus heartbeat measurement, and does not resetcalendarDisqualified.New, skipped with one log line on refresh.9 new internal tests. Detail in ADR 0042 and runbook Part 7.49.