Skip to content

Re-read the market registry so a delist takes effect - #75

Open
Enochthedev wants to merge 1 commit into
mainfrom
wavedidwhat/gho-56-the-keeper-reads-the-registry-once-so-listing-a-market-still
Open

Re-read the market registry so a delist takes effect#75
Enochthedev wants to merge 1 commit into
mainfrom
wavedidwhat/gho-56-the-keeper-reads-the-registry-once-so-listing-a-market-still

Conversation

@Enochthedev

Copy link
Copy Markdown
Collaborator

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.

  • Second ticker on KEEPER_REGISTRY_REFRESH_INTERVAL (default 1m), separate from the 10s round loop; both in one goroutine, so no lock.
  • keeper.Source caches by address — a refresh does not re-do LoadMarket's five reads plus heartbeat measurement, and does not reset calendarDisqualified.
  • A delisted market with an unsettled round retires rather than dropping: stops opening, keeps settling. Delisting does not pause a market, so dropping it would strand the stakes in it.
  • A failed registry read keeps the current set — "empty listing" and "RPC hiccup" must not be the same thing.
  • Validation is fatal in New, skipped with one log line on refresh.

9 new internal tests. Detail in ADR 0042 and runbook Part 7.49.

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.
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

GHO-56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant