The direct-call scan matched any transaction reaching the DCL contract, which hosts hundreds of pools: 4,881 strangers' swaps queued in the first hour after launch, from 176 signers, each to be fetched from a rate-limited public endpoint — enough on its own to keep the market page starved. A call now counts only when it moves the asset itself or its arguments name the asset's contract, which every pool id holding it does; a buy with any token names the pool, a sell is a transfer of the asset. ref_pending keeps no arguments, so the bad entries cannot be filtered in place: migration 0016 drops every entry not signed by the relay and the scan's cursor, and the scan reads the span again from our node. Refs #39 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015pkwBsR54NRmZyU4QVhvfj
14 lines
814 B
SQL
14 lines
814 B
SQL
-- Re-read direct pool calls with the asset filter in place.
|
|
-- blackbeard/observer#39.
|
|
--
|
|
-- The first cut of the direct-call scan queued every transaction that called
|
|
-- the DCL contract, which hosts hundreds of pools: 4,151 strangers' swaps in
|
|
-- twenty minutes after launch, each waiting to be fetched from a rate-limited
|
|
-- public endpoint. ref_pending keeps no arguments, so the queue cannot be
|
|
-- filtered after the fact. Instead every entry the scan queued — anything not
|
|
-- signed by the relay, whose entries come from the intents scan and are
|
|
-- right — is dropped, and the scan's cursor is removed so it reads the same
|
|
-- span again from our node, queueing only calls about the asset.
|
|
delete from ref_pending where signer <> 'intents.near';
|
|
delete from intents_scan where asset like 'pool-calls:%';
|