How the marketplace discovers and warms popular collections before users search them. Per-chain prefill controllers, OrdNet/OpenSea metadata enrichment, volume thresholds, paused-chains controls, and pg_notify-driven worker dispatch.
The marketplace cannot wait for a user to type a contract address before showing them anything. The preseed queue continuously discovers popular collections across BTC, EVM, and Solana, fetches their metadata, warms their media, and seeds the index so the first user query returns rich results instantly.
The queue tracks two kinds of work:
| Kind | Source | Payload |
|---|---|---|
| EVM collections | OpenSea / popular-contracts feeds | Contract address, chain, volume metadata |
| BTC ordinal collections | OrdNet / curated lists | Ordinal slug, parent inscription, href |
Each chain has its own prefill controller that knows how to fetch its source list, dedupe candidates against already-indexed collections, and rank by configured volume thresholds.
The controller config carries a pausedChains array. Operators (and admins via the indexer admin UI) can pause specific chains independently — useful when one upstream feed is degraded or when an operator wants to focus throughput on one chain. Paused chains:
isJobChainPaused() checkThe pause flag is per-chain, per-controller — not global. Pausing ETH does not pause BTC.
Preseed jobs flow through marketplaceIndexerJobs:
pg_notify(marketplace_preseed_queued) fires so workers wake immediately instead of waiting for the next poll tickcollectionMetadata, fan out media warmup jobs, populate collectionTokenStatslastErrorStale claims (worker died mid-job) are reset by a sweeper so jobs do not get stranded.
Not every contract is worth preseeding — most have zero secondary activity. Each controller carries volume thresholds (in USD-cents) that gate which candidates make it onto the queue. Below the threshold, a collection waits until a real user manually requests it.
For Bitcoin ordinal collections, the BTC controller talks to OrdNet via fetchOrdNetCollectionDetail. This pulls inscription range, parent inscription metadata, social links, and a curated description. OrdNet acts as the upstream "discovery" layer for BTC — the marketplace caches and re-publishes the metadata under its own collection records.
The popularEthCollections module maintains a slot of curated, hand-picked EVM contracts that are always preseeded — major historical collections that any general-purpose marketplace must show. These bypass volume thresholds and are split across multiple cache modules to keep startup memory in check.
The dispatch loop runs continuously, but pg_notify lets workers wake within milliseconds of a new job arriving. The notify channel marketplace_preseed_queued carries only a count — workers re-query the queue rather than trusting the payload. This keeps the notification mechanism cheap while still scaling to many concurrent workers.
The admin UI exposes per-chain pause toggles, volume threshold overrides, and live job-status views. Operators can drain the queue, reset stuck jobs, or kick off a forced refresh of a specific contract without bouncing the node.